fix(linkedin-search): reject fractional numeric flags (#371) (#393)

parseInt truncated values before validation, so --jobage 0.5 became 0 and silently omitted LinkedIn's freshness filter. Require whole numbers of at least 1 for every numeric search flag and guard the behavior with CLI regression tests.
This commit is contained in:
Ayobami Adegoke
2026-09-02 20:08:26 +02:00
committed by GitHub
parent 284dc4c2d0
commit c42806674b
3 changed files with 44 additions and 30 deletions
+8
View File
@@ -41,6 +41,14 @@ per-file diff commands.
### Fixed
- **`linkedin-search` rejects fractional numeric flags instead of silently changing
the query** (#371) - bare `parseInt` truncated values before validation, so
`--jobage 0.5` became `0` and silently omitted LinkedIn's `f_TPR` freshness filter
while the CLI reported no argument error. `--jobage`, `--jobage-minutes`, `--page`,
and `--limit` now accept whole numbers >= 1 only and reject fractions and zero with
the stderr-JSON `BAD_ARG` contract, matching the other portal CLIs. Pinned by eight
cases verified to fail on the unfixed CLI. Reported by @Meet6338-X.
- **`linkedin-search detail` accepts LinkedIn job URLs with trailing slashes** (#411) -
passing a job URL with a trailing slash (e.g., `https://www.linkedin.com/jobs/view/<id>/`
or a slugged variant with or without query strings) failed validation and exited 1 with