chore: update dependencies - #221
Conversation
Everything that can move without breaking a job moves: - `ajv` 8.20.0, `ajv-formats` 3.0.1 and `@types/json-schema` 7.0.15 - `ajv-formats` 3 only moves `ajv` to a peer dependency, the formats are unchanged and the suite passes unmodified - `eslint` 10, `@commitlint/*` 21, `lint-staged` 17, `del` 8, `del-cli` 7, `@types/node` 26, `husky` 9, and the latest patches of `@babel/*`, `prettier`, `webpack` and `eslint-config-webpack` `husky` 9 drops `husky install` and the sourcing preamble in the hooks, so `prepare` calls `husky` and the hooks are plain scripts. `.husky/_` now carries its own ignore file, so the one in `.husky` is gone. Held back, each because it would break something: - `@babel/*` 8 needs Node `^22.18 || >=24.11`, but the Node 10 to 18 jobs run `build:code` - `jest` and `babel-jest` 30 need Node `^18.14 || ^20 || ^22 || >=24`, and the same jobs run the tests - `prettier-2` is what `jest.config.js` points `prettierPath` at, so it stays on 2 while `jest` stays on 27 - `typescript` 7 is outside the `>=4.8.4 <7.0.0` peer range of `eslint-config-webpack` - `@changesets/get-github-info` 1 renames the exports the changelog generator uses, and the release path cannot be exercised here without a token, so it and `@changesets/cli` stay where they were just proven `@commitlint/*` 21, `lint-staged` 17 and `eslint` 10 raise the Node needed to develop the package to 22.12, 22.22 and 20.19 - the package itself still supports `>= 10.13.0` and every test job still runs. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013wqLmVHkAGBsWQgXknEQCK
The changelog comes from the changesets now, not from the commit messages, so conventional commits are no longer load bearing. `less-loader`, whose release setup this repository just adopted, does not have `commitlint` either. Removed the `commitlint` script, both `@commitlint` dev dependencies, `commitlint.config.js`, the `commit-msg` hook and the `Check commit message` step of the lint job. `pre-commit` still runs `lint-staged`. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013wqLmVHkAGBsWQgXknEQCK
`eslint-config-webpack` still caps `typescript` below 7, so 6 is as far as it goes for now. Two things in `tsconfig.json` had to move with it: - `rootDir` is set explicitly. TypeScript 6 no longer infers the common source directory (TS5011), and without it the declarations were emitted to `declarations/src` instead of `declarations`, which is where `types` points - `moduleResolution` `node` is deprecated in 6 and stops working in 7, so it and `module` are `node16`, which is what this package is - CommonJS resolved by Node The emitted declarations are byte for byte the ones already committed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013wqLmVHkAGBsWQgXknEQCK
The dev dependencies now require an active LTS release of Node.js, the package itself still supports Node.js 10.13.0 and above. `@babel/core` 8 runs on Node.js `^22.18.0 || >=24.11.0` and `babel-jest` needs it, which in turn needs Jest 30, so CI installs Babel 7 and Jest 27 on the versions of Node.js that cannot run them and runs the same test suite there - the same thing it already did for TypeScript and `del-cli`. Node.js 20 joins them, `@babel/core` 8 does not support it either. Jest 29 changed the defaults of `snapshotFormat`, so they are set explicitly for both to write the same snapshots. The snapshots are reformatted accordingly - `src` is untouched, so the messages themselves are unchanged. Babel 8 keeps ECMAScript modules when the caller does not say what it supports, which `@babel/cli` does not, so `modules` is set to `commonjs` explicitly. Without it `dist` is published as ECMAScript modules. Jest 30 no longer needs Prettier 2 for inline snapshots, so `prettier-2` is gone. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013wqLmVHkAGBsWQgXknEQCK
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #221 +/- ##
=======================================
Coverage 95.78% 95.78%
=======================================
Files 9 9
Lines 949 949
Branches 386 387 +1
=======================================
Hits 909 909
Misses 36 36
Partials 4 4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
npm 6, which Node.js 10, 12 and 14 ship, resolves the downgrade to Babel 7 and Jest 27 without complaint, but npm 7 and above refuse it - the lockfile pins Babel 8 and they report an `ERESOLVE` peer conflict against it instead of replacing it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013wqLmVHkAGBsWQgXknEQCK
Updates the dependencies as far as they go. The package still supports Node.js 10.13.0 and above,
enginesis unchanged - the dev dependencies now require an active LTS release, and CI installs older ones for the versions of Node.js that cannot run them.Runtime dependencies
ajvto8.20.0,ajv-formatsto3.0.1,@types/json-schemato7.0.15.ajv-formats3 only movesajvto a peer dependency, the formats themselves are unchanged. Covered by a changeset.TypeScript 6
rootDirhas to be set now, TypeScript 6 no longer infers it and emitted the declarations todeclarations/src/(TS5011). The emitted declarations are byte identical.Babel 8 and Jest 30
@babel/core8 runs on Node.js^22.18.0 || >=24.11.0andbabel-jestneeds it, which in turn needs Jest 30, so neither runs on the older versions of Node.js the package supports. CI installs Babel 7 and Jest 27 there and runs the same test suite - the same thing it already did for TypeScript anddel-cli:Node.js 20 joins that group,
@babel/core8 does not support it either. The test matrix itself is unchanged, every version from 10 to 26 still runs the full suite on all three operating systems.Two things were needed to make that work:
@babel/clidoes not, somodulesis set tocommonjsexplicitly. Without itdistis published as ECMAScript modules and fails to load withSyntaxError: Unexpected identifier.snapshotFormat, so Jest 27 and Jest 30 disagreed on 78 snapshots. They are set explicitly for both to write the same ones. The snapshots in this PR are reformatted accordingly -srcis untouched in that commit, so the messages themselves are unchanged.Jest 30 no longer needs Prettier 2 for inline snapshots, so
prettier-2is gone.Housekeeping
commitlintand its hook are removed, changesets covers the changelog now.Testing
Verified against a real Node.js 10.24.1 runtime, replaying the CI steps from a clean checkout with npm 6: install,
npm run build:codewith Babel 7, thennpm run test:coverage -- --ci- 444 tests and 332 snapshots pass, and the snapshot files are byte identical afterwards, so nothing is silently rewritten. Jest 30 on Node.js 22 passes the same 444 and 332 with the same files. Lint,tscand the declarations check are clean.🤖 Generated with Claude Code
https://claude.ai/code/session_013wqLmVHkAGBsWQgXknEQCK
Generated by Claude Code