chore(deps): bump @sasjs/lint to 2.5.0 + dependency refresh - #1466
Conversation
Bumps @sasjs/lint 2.4.3 -> 2.5.0 (Em Dash gremlin, jest 30, clean audit) and refreshes other dependencies to latest compatible versions: Runtime: - dotenv 16.0.3 -> 17.4.2 - js-base64 3.7.5 -> 3.9.3 - jsdom 23.2.0 -> 26.0.0 - prompts 2.4.1 -> 2.4.2 Dev: - jest family 29.4.3 -> 30.5.1 (jest, jest-cli, jest-environment-jsdom, babel-jest, @types/jest) - jest-extended 3.2.4 -> 4.0.2 - ts-jest 29.0.5 -> 29.4.12 - typescript 4.9.5 -> 5.9.3 - @types/node 18.14.1 -> 22.10.2 - @babel/* -> 7.29.7 - prettier 2.6.2 -> 3.9.6 (reformatted 20 files, nested ternary style) - ts-node, tslib, nodemon, util, @types/* minor bumps Held back (ESM-only, CLI is CommonJS): chalk 4.x, ora 5.x, yargs 17.x. Held back (Node engine): jsdom 27+ needs Node 24+. Test migrations for jest 30 / @types/node: - toThrowError -> toThrow (4 files) - toBeCalledTimes -> toHaveBeenCalledTimes (1 file) - process.exit mock signature widened for new @types/node Verified locally: 84/84 suites, 637/637 tests pass; npm audit 0 vulnerabilities (prod and full); build clean; prettier clean; doc coverage 17% over 16% threshold.
The Test Package Install CI step runs 'npm version 5.0.0' itself; having the field committed makes that step fail with 'npm error Version not changed'. Version is managed by semantic-release, as on main.
Coverage reportTotal coverage
Show files with reduced coverage 🔻Reduced coverage
Report generated by 🧪jest coverage report action from 1ea349e |
pm2 start returns as soon as the process is forked, not when the server is listening. The deploy step hit http://localhost:5000 0.9 seconds after pm2 start and failed with 'An error occurred while fetching server info'. Adds a polling loop (up to 5 minutes) on the /SASjsApi/info endpoint, dumping pm2 logs on timeout.
Latest core release. The v5 breaking changes are SAS-macro-level (mp_getddl -> mp_ds2ddl, mp_testservice -> mp_execute, mp_coretable removed, mcf_xxx insert_cmplib removed, mf_getuniquelibref maxtries removed, mp_abort type= removed) - verified the CLI source, mocks and test fixtures reference none of the affected macros, so the major bump is safe for the CLI. Verified: 637/637 tests pass, audit 0 vulnerabilities (prod+full), build clean, prettier clean.
There was a problem hiding this comment.
Reviewed the full diff: dependency refresh (package.json, package-lock.json), Prettier reformatting across ~20 source files (ternary indentation, line wrapping), Jest 30 API migrations (toThrowError to toThrow, toBeCalledTimes to toHaveBeenCalledTimes), Node.js process.exit type updates (code?: number to code?: string | number | null | undefined), and a CI reliability improvement (wait-for-server step in .github/workflows/run-tests.yml).
Hardening checklist:
- ignore-scripts=true in committed .npmrc: pass (also has save-exact=true)
- Dependencies pinned to exact versions: pass
- npm audit --audit-level=low in CI: pass
- npm ci in CI: pass
- Lockfile committed and updated: pass
- No secrets in diff: pass
- .gitignore covers .env, .env.*: pass
Code review:
- .github/workflows/run-tests.yml:91 -- the wait-for-server step is well-implemented: polls http://localhost:5000/SASjsApi/info up to 60 times (5s intervals, 300s max), dumps pm2 logs on timeout, exits 1 on failure. Good reliability improvement.
- src/commands/compile/compileSingleFile.ts:77 -- the ;( prefix added to (outputPathParts.pop(), outputPathParts.pop()) is Prettier ASI safety; the comma expression is pre-existing and functionally unchanged.
- src/commands/lint/processLint.ts:204 -- the ;( prefix and ternary reformatting are Prettier changes; the pre-existing comma-operator structure (process.logger?.table called with only the mapped array, { head: ... } evaluated as comma operand) is unchanged. Not a PR-introduced issue.
- src/types/command/spec/commandBase.spec.ts and src/utils/test.ts -- process.exit mock type widened to string | number | null | undefined to match newer @types/node. Correct migration.
- @sasjs/core major bump (4.68.1 to 5.2.2) and jsdom major bump (23 to 26) -- CI passes.
- CI passing (test runs green at node 22).
No blocking issues.
Patch release (published today): mv_getjoblog error-surfacing fixes and mv_jobflow paramstring casing fix. No breaking changes; none of the affected macros are referenced by the CLI. Verified: 637/637 tests pass, audit 0 vulnerabilities (prod+full), build clean.
There was a problem hiding this comment.
Reviewed the diff (dependency refresh: TS 4->5, Jest 29->30, Prettier 2->3, jsdom 23->26; CI server-readiness step; .npmrc hardening verified, lockfile committed, npm ci + npm audit --audit-level=low in CI).
- package.json:72 — "@sasjs/adapter": "^4.19.0" uses a caret range; pin to an exact version (e.g. "4.19.0") for reproducible installs, consistent with the other pinned deps and the repo's save-exact=true policy.
1 finding above for review.
Patch release (published today): guard _METAPERSON symget in mp_abort; stop fixed-length uri truncation in mv_jobwaitfor. No breaking changes; none of the affected macros are referenced by the CLI. Verified: 637 tests pass (84 suites; 4 env-dependent suites fail identically before and after the bump - seed-app archive installs, doxygen, global CLI install), audit 0 vulnerabilities (prod+full), build clean.
4.20.2 released today from the merge of sasjs/cli#1466 (the dependency-refresh PR: @sasjs/core 5.2.4, @sasjs/lint 2.5.0, @sasjs/utils 3.6.2 + jest 30 toolchain). Lockfile-only refresh: @sasjs/cli 4.20.1 -> 4.20.2, transitively @sasjs/core 4.68.1 -> 5.2.4, @sasjs/lint 2.4.3 -> 2.5.0, @sasjs/utils 3.5.2 -> 3.6.2. No CLI API changes in 4.20.2 (dependency-only release); the extension deep-imports @sasjs/cli/build/commands - verified compile clean, unit tests 10/10, lint 0 errors, esbuild bundle clean.
Summary
Bumps
@sasjs/lint2.4.3 → 2.5.0 and@sasjs/core4.68.1 → 5.2.4, plus updates all other dependencies to the latest compatible versions.Runtime dependencies
@sasjs/lint@sasjs/coredotenvjs-base64jsdompromptsFollow-up patch bumps: 5.2.3 (mv_getjoblog error surfacing, mv_jobflow paramstring casing) and 5.2.4 (mp_abort
_METAPERSONguard, mv_jobwaitfor uri truncation fix) — no CLI-facing changes; none of the affected macros are referenced by the CLI.@sasjs/corev5 breaking changes are SAS-macro-level (mp_getddl→mp_ds2ddl,mp_testservice→mp_execute,mp_coretableremoved,mcf_xxx insert_cmplibremoved,mf_getuniquelibref maxtriesremoved,mp_abort type=removed). Verified the CLI source, mocks and test fixtures reference none of the affected macros — safe major bump for the CLI.Held back (ESM-only, the CLI is CommonJS — a major bump breaks
require):chalk4.1.2,ora5.4.1,yargs17.6.2.Held back (Node engine):
jsdom27+/30 need Node ≥ 22.22/24.Dev dependencies
jest,jest-cli,jest-environment-jsdom,babel-jest@types/jestjest-extendedts-jesttypescript@types/nodeprettier@babel/core,preset-env,preset-typescriptts-node,tslib,nodemon,util,@types/*Code changes required by the bumps
toThrowError→toThrow(jest 30 removed the alias — 4 spec files, 6 call sites)toBeCalledTimes→toHaveBeenCalledTimes(jest 30 removed the alias — 1 spec file)process.exitmock signatures widened tocode?: string | number | null | undefined(new@types/nodesignature — 2 files)CI fixes included
run-tests.yml: wait for sasjs/server readiness (/SASjsApi/infopoll, up to 5 min) before "Deploy SAS9 tests" — the deploy was hitting localhost:5000 0.9s afterpm2 start, before the server was listening (startup race, unrelated to the bumps)Verification (all run locally against this branch)
jest --config=jest.config.js --bail=0)npm audit --omit=dev --audit-level=low: 0 vulnerabilitiesnpm audit --audit-level=low(full tree incl. dev): 0 vulnerabilitiesnpm run build: 0 TypeScript errorsprettier --check: cleannpm run doc: documentation coverage 17% > 16% thresholdnpm pack+ global install +sasjs vworks