chore(deps): update dev dependencies and refresh snapshots#681
chore(deps): update dev dependencies and refresh snapshots#681alexander-akait wants to merge 2 commits into
Conversation
|
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #681 +/- ##
=======================================
Coverage 96.11% 96.11%
=======================================
Files 3 3
Lines 592 592
Branches 203 203
=======================================
Hits 569 569
Misses 21 21
Partials 2 2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Bump dev dependencies to their latest versions where compatible, refresh the Jest snapshots, and migrate to the husky v9 install flow. `del` and `copy-webpack-plugin` are pinned to the last CJS-compatible majors so the test suite still loads on Node 10, and the runtime `jest-worker` dep stays on v27 for the same reason. CI: install an older jest for the legacy Node rows (jest@30 needs Node >=18.14) by rewriting the jest devDependency before install so npm resolves a consistent @jest/* tree, and filter out tests whose minimizers can't run on the matrix's Node version via Jest's `-t` flag (`swcMinify`/ `htmlMinifierTerser` on Node 10/12, `esbuildMinify` on Node 14/16). `-u` accompanies the filter so Jest doesn't fail over snapshots orphaned by the filter in non-TTY mode; strict snapshot validation still runs on Node 18+.
ad40070 to
28facfb
Compare
There was a problem hiding this comment.
Pull request overview
This PR updates the project’s development toolchain (notably Jest and Husky), refreshes Jest snapshots to match the updated formatter output, and adjusts CI to keep the test matrix working across legacy Node versions by pinning Jest and selectively filtering tests.
Changes:
- Bump dev dependencies (including Jest) and update the Husky install/prepare flow.
- Refresh Jest snapshots to match the new snapshot formatting/output.
- Update GitHub Actions test workflow to pin older Jest on legacy Node versions and skip incompatible minimizer tests per Node version.
Reviewed changes
Copilot reviewed 14 out of 18 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| test/snapshots/worker.test.js.snap | Snapshot refresh for updated Jest formatting/output. |
| test/snapshots/validate-options.test.js.snap | Snapshot header update consistent with refreshed Jest snapshots. |
| test/snapshots/test-option.test.js.snap | Snapshot refresh reflecting updated serializer/string formatting. |
| test/snapshots/terserOptions-option.test.js.snap | Snapshot refresh for updated Jest formatting/output. |
| test/snapshots/swc-html-minify-option.test.js.snap | Snapshot refresh for updated Jest formatting/output. |
| test/snapshots/parallel-option.test.js.snap | Snapshot refresh for updated Jest formatting/output. |
| test/snapshots/minimizerOptions-option.test.js.snap | Snapshot refresh for updated Jest formatting/output. |
| test/snapshots/include-option.test.js.snap | Snapshot refresh for updated Jest formatting/output. |
| test/snapshots/exclude-option.test.js.snap | Snapshot refresh for updated Jest formatting/output. |
| test/snapshots/css-minify-option.test.js.snap | Snapshot refresh for updated Jest formatting/output. |
| package.json | Dev dependency bumps; migrate prepare script to Husky v9 flow. |
| .husky/pre-commit | Update Husky hook content (but currently missing a shebang). |
| .github/workflows/nodejs.yml | CI updates: pin Jest for old Node versions; filter tests by Node compatibility. |
| .cspell.json | Add esac to dictionary for shell-script spelling checks. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| #!/bin/sh | ||
| . "$(dirname "$0")/_/husky.sh" | ||
|
|
||
| npx --no-install lint-staged |
memfs@4 ships nullish-coalescing/optional-chaining syntax and isn't transpiled by babel-jest (node_modules is ignored), so every test suite that imports it via test/helpers/getCompiler.js failed to parse on Node 10/12 with "SyntaxError: Unexpected token ?". v3 (3.6.0) still supports legacy Node, matching the del/copy-webpack-plugin pins.
Summary
update deps
What kind of change does this PR introduce?
chore
Did you add tests for your changes?
Existing
Does this PR introduce a breaking change?
No
If relevant, what needs to be documented once your changes are merged or what have you already documented?
Nothing
Use of AI
Claude