Skip to content

[SP-15258] Upgrade remaining flagged and stale dependencies - #91

Open
anaptfox wants to merge 1 commit into
masterfrom
upgrade-remaining-dependencies
Open

[SP-15258] Upgrade remaining flagged and stale dependencies#91
anaptfox wants to merge 1 commit into
masterfrom
upgrade-remaining-dependencies

Conversation

@anaptfox

@anaptfox anaptfox commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

What

  • Bump losant-rest 2.14.1 -> 3.0.0 and jsonwebtoken -> ^9.0.3. losant-rest 3.0.0 carries a patched axios (^1.10.0), clearing ~24 Dependabot alerts (SSRF, prototype pollution, DoS, credential leaks) from the old vendored 0.21.4/0.31.x. Stayed on 3.x rather than latest 4.x, which is ESM-only ("type": "module") and would break our CommonJS require('losant-rest') in lib/get-api.js.
  • Bump dev-only tooling: mocha 10 -> 11, sinon 15 -> 22, husky 8 -> 9, lint-staged 13 -> 17. None ship to users. Migrated .husky/pre-commit and the prepare script to husky v9's simplified hook format.
  • Bump inquirer 8 -> 14 and update-notifier 5 -> 7 — both real runtime dependencies whose newer majors are ESM-only. Bridged via dynamic import() rather than converting the whole CLI to ESM:
    • lib/inquirer.js — a small cached-import wrapper; every call site still does require('./inquirer').prompt(...), unchanged. Tests that sinon.stub(inquirer, 'prompt') now require the wrapper too, so they stub the same object the source uses.
    • bin/losant.jsupdate-notifier's single call site becomes a fire-and-forget dynamic import at the bottom of the file; doesn't block or affect command parsing above it.
  • Add pnpm-workspace.yaml overrides forcing serialize-javascript (RCE + DoS) and diff (DoS) past patched thresholds. Both are transitive-only via mocha, which still pins ^6.0.2/^7.0.0 itself (below the patched 7.0.5/8.0.3) — no mocha release fixes this yet, so a version bump alone can't reach it.
  • Fix .gitignore's blanket *.yaml rule, which was silently ignoring the new pnpm-workspace.yaml until excepted.

Testing

  • pnpm lint — passing
  • pnpm test — 55/55 passing
  • pnpm audit — no known vulnerabilities found
  • Manual smoke test: node bin/losant.js --version / --help, and a live (non-mocked) inquirer.prompt() call to confirm the dynamic import resolves at runtime, not just under test mocks
  • GitHub Actions (Linter + Run Tests) — pending on push

@spacetc62
spacetc62 force-pushed the upgrade-remaining-dependencies branch from 8595236 to ab5dc38 Compare August 10, 2026 16:15
@anaptfox
anaptfox force-pushed the upgrade-remaining-dependencies branch from ab5dc38 to f1d4502 Compare August 10, 2026 16:18
Comment thread package.json
"jsonwebtoken": "^9.0.2",
"losant-rest": "2.14.1",
"jsonwebtoken": "^9.0.3",
"losant-rest": "3.0.0",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eeerin do you recall why losant-rest was pinned to an exact version?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No but should it be 4.2.1?

@anaptfox
anaptfox marked this pull request as ready for review August 10, 2026 16:28
Base automatically changed from remove-unused-deps to master August 10, 2026 16:54
- losant-rest 2.14.1 -> 3.0.0, jsonwebtoken -> 9.0.3 (clears ~24
  Dependabot alerts from losant-rest's vendored axios)
- mocha 10 -> 11, sinon 15 -> 22, husky 8 -> 9, lint-staged 13 -> 17
  (dev-only, migrate husky hook format to v9)
- inquirer 8 -> 14 and update-notifier 5 -> 7, both ESM-only majors --
  bridged via dynamic import (lib/inquirer.js, bin/losant.js) since the
  rest of the codebase is CommonJS
- pnpm-workspace.yaml: override serialize-javascript/diff past mocha's
  own stale transitive pins (mocha hasn't bumped them upstream yet)
- fix .gitignore's blanket *.yaml rule silently ignoring the new
  pnpm-workspace.yaml
@eeerin
eeerin force-pushed the upgrade-remaining-dependencies branch from f1d4502 to 71e5bb9 Compare August 10, 2026 16:54
@spacetc62
spacetc62 requested a review from eeerin August 10, 2026 18:27
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.

3 participants