Skip to content

fix(pagination): reject fractional pagination flags#40

Open
JerryNee wants to merge 1 commit into
TestSprite:mainfrom
JerryNee:fix/pagination-integer-flags
Open

fix(pagination): reject fractional pagination flags#40
JerryNee wants to merge 1 commit into
TestSprite:mainfrom
JerryNee:fix/pagination-integer-flags

Conversation

@JerryNee

Copy link
Copy Markdown

What

--page-size and --max-items are documented as integer pagination values, but shared pagination validation accepted fractional numbers like 1.5 and 2.5.

Why

Fractional pagination parameters are invalid per CLI docs/error wording and can produce surprising API requests. Local validation should reject them before credentials or network work.

Changes

  • Require Number.isInteger for pageSize and maxItems.
  • Add regression tests for fractional pageSize and maxItems.

Verification

  • npx vitest run src/lib/pagination.test.ts src/commands/project.test.ts src/commands/test.test.ts
  • npm run typecheck
  • npm run lint
  • npm run format:check
  • npm test
  • npm run build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant