Skip to content

List flags: JSON only when bracket-wrapped; exit 5 on a bad JSON list (1.2.25) - #11

Merged
vprudnikoff merged 1 commit into
mainfrom
fix/list-flag-followups
Nov 4, 2026
Merged

vprudnikoff merged 1 commit into
mainfrom
fix/list-flag-followups

Conversation

@vprudnikoff

Copy link
Copy Markdown
Member

Follow-up to #10 from an independent post-release review of 1.2.24 (three low findings).

  • A literal value starting with [ – e.g. company [24]7.ai – was parsed as JSON and failed. Now only a value both starting with [ and ending with ] is read as a JSON array; [24]7.ai and [24]7.ai,Google split as plain comma lists again.
  • An invalid JSON list (e.g. [1]) threw a plain Error, so oclif exited 1. It now raises a CLIError with EXIT_CODE.VALIDATION (5), matching the README's exit-code table and the --term/--url guard.
  • Return types on the new callbacks (CODESTYLE §2.5).

Version 1.2.25. Checks: typecheck, eslint, build; probed the built helper ([24]7.ai → plain, JSON array → parsed, [1] → CLIError exit 5) and linkedin jobs search --term engineer --companies '[1]' exits 5.

…on a bad JSON list

1.2.24 parsed any value starting with [ as JSON, so a literal such as "[24]7.ai" failed; now only a value both starting with [ and ending with ] is JSON. An invalid JSON list exits with the validation code 5 instead of the general 1, and the new callbacks carry return types. Found by a post-release review of 1.2.24.
@vprudnikoff
vprudnikoff merged commit 4e1ae38 into main Nov 4, 2026
2 checks passed
@vprudnikoff
vprudnikoff deleted the fix/list-flag-followups branch November 4, 2026 16:23
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