Skip to content

chore(deps): clear audit advisories, bump ESLint 10, drop Node 18 - #20

Merged
danieloceno merged 1 commit into
mainfrom
chore/13-deps-drop-node18
Nov 15, 2026
Merged

danieloceno merged 1 commit into
mainfrom
chore/13-deps-drop-node18

Conversation

@danieloceno

Copy link
Copy Markdown
Contributor

Closes #13

What changed

  • npm audit fix (without --force) clears both high advisories, which were dev-only. brace-expansion moves from 1.1.16 to 5.0.13. js-yaml 4.3.0 leaves the tree: only @eslint/eslintrc required it, and ESLint 10 no longer installs that package.
  • Runtime dependencies, minor and patch only: acorn 8.17.0 to 8.19.0 (^8.19.0) and yaml 2.9.0 to 2.9.1 (^2.9.1). No other runtime entry in package-lock.json changed.
  • Dev tooling on the latest majors: eslint ^10.15.0, @eslint/js ^10.0.1, globals ^17.14.0. eslint.config.mjs needed no change. ESLint 10 adds preserve-caught-error to eslint:recommended. It flagged three rethrows in tests, which now pass { cause: e } (test/filter.mjs twice, test/gate.mjs once); no test logic changed.
  • engines.node is >=20 in package.json and in the lockfile root. The CI matrix moves from 18, 20, 22 to 20, 22, 24, 26. Per the Node.js release schedule, 26 has been the Active LTS since 2026-10-28 and 24 has been in maintenance since 2026-10-20.
  • The Node badges in README.md and docs/index.html now read ≥20. CHANGELOG.md gets an [Unreleased] entry.

Proof per acceptance criterion

  • npm audit --audit-level=high: on main, 2 high (brace-expansion, js-yaml) and exit 1; on this branch, found 0 vulnerabilities and exit 0.
  • npm run lint && npm test pass on Node 22 and 24 (see Gate). Golden and determinism tests are unchanged: git diff --stat origin/main -- test/ lists only test/filter.mjs and test/gate.mjs, the three { cause: e } arguments above.
  • The lowest Node version in the CI matrix is "20", and node -p "require('./package.json').engines.node" prints >=20.

Gate

npm ci && npm run lint && npm test at 217f7ee:

  • Node v22.23.4 (npm 10.9.9): exit 0. eslint reports nothing; all 20 suites end N passed, 0 failed.
  • Node v24.22.1 (npm 11.19.1): exit 0, same result.

Node 20 and 26 are not installed locally; this PR's CI runs them.

Notes

  • Node 20 itself reached end of life on 2026-04-30. The issue sets the floor at >=20, so this PR follows it. Raising the floor to 22 would be a separate decision.
  • ESLint 10 requires Node ^20.19.0 || ^22.13.0 || >=24. ApiGate itself runs on any Node 20, but npm run lint needs 20.19 or later. CI's "20" resolves to the newest 20.x.
  • No package in the new lockfile has an install script (grep -c '"hasInstallScript": true' package-lock.json prints 0).
  • .github/workflows/publish.yml is unchanged and keeps Node 22. No version bump.

Suggested labels: enhancement

@danieloceno

Copy link
Copy Markdown
Contributor Author

Second-model review

  1. info, package.json (devDependencies): ESLint 10 requires Node ^20.19.0 || ^22.13.0 || >=24, so a contributor on Node 20.0 to 20.18 can run ApiGate but not npm run lint. CI is not affected, because its "20" resolves to the newest 20.x, and the PR body states the limit. Fix: none needed now.
  2. info, package.json:11 and .github/workflows/ci.yml:17: Node 20 is past end of life (2026-04-30) but stays the floor, because the issue sets >=20. Fix: none in this PR; raising the floor is a separate decision.
  3. info, .github/workflows/ci.yml:17: Node 26 was not run locally; this PR's CI covers it.
  4. Verified: npm ci && npm run lint && npm test exits 0 on Node v22.23.4, and on Node v24.22.1 in an earlier review round, with all 20 suites 0 failed. npm audit --audit-level=high reports found 0 vulnerabilities and exits 0. engines.node is >=20 in package.json and in the lockfile root (packages[""]), and the lowest CI matrix entry is "20". Runtime bumps stay within minor and patch (acorn 8.19.0, yaml 2.9.1), and npm audit fix ran without --force. The only test edits are three { cause: e } arguments in test/filter.mjs and test/gate.mjs, which ESLint 10's new preserve-caught-error rule requires; no golden or determinism file changed. CHANGELOG.md has the new [Unreleased] entry with a blank line after the heading, and [0.3.4] is untouched. publish.yml is untouched and there is no version bump. Earlier review rounds found two problems, both fixed before this PR opened: the lockfile root still said >=18, and the CHANGELOG lacked the blank line after ## [Unreleased].
  5. Security: no concerns. No runtime code changed, and no package in the new lockfile has an install script.

Verdict: approve.

In plain English

ApiGate's development tools carried two known security warnings, and its tests still ran on Node 18, which no longer gets security fixes. This change updates those tools, clears both warnings, and makes Node 20 the oldest supported version, with tests now running on Node 20, 22, 24 and 26. The scanner's own behavior does not change. One caveat remains: Node 20 has also been out of support since April 2026, so a later change may raise the minimum again.

@danieloceno
danieloceno merged commit 31f3627 into main Nov 15, 2026
4 checks passed
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.

Clear dev-dependency advisories and drop Node 18

1 participant