Skip to content

Commit f7fc8a1

Browse files
committed
chore(deps): update dev dependencies and refresh snapshots
Bump dev dependencies to their latest versions where compatible, refresh the Jest snapshots to match the new minifier outputs, 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. In CI, filter out tests whose minimizers can't run on the matrix's Node version using Jest's `-t` flag: `swcMinify`/`htmlMinifierTerser` on Node 10/12 and `esbuildMinify` on Node 14/16.
1 parent 39fd982 commit f7fc8a1

17 files changed

Lines changed: 10245 additions & 8982 deletions

.cspell.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@
4646
"lightningcss",
4747
"sourcefile",
4848
"stringifier",
49-
"sourcesContent"
49+
"sourcesContent",
50+
"esac"
5051
],
5152
"ignorePaths": [
5253
"CHANGELOG.md",

.github/workflows/nodejs.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,24 @@ jobs:
123123
run: npm i webpack@${{ matrix.webpack-version }}
124124

125125
- name: Run tests for webpack version ${{ matrix.webpack-version }}
126-
run: npm run test:coverage -- --ci
126+
# Skip tests whose minimizers can't run on the current Node version
127+
# (`-t` is a Jest test-name pattern with a negative lookahead).
128+
# `swcMinify`/`swcMinifyHtml`/`swcMinifyCss` need @swc/* binaries that
129+
# aren't available on Node 10/12; `htmlMinifierTerser` requires Node
130+
# 14.13+; `esbuildMinify`/`esbuildMinifyCss` require Node 18+.
131+
shell: bash
132+
run: |
133+
case "${{ matrix.node-version }}" in
134+
10.x|12.x)
135+
npm run test:coverage -- --ci -t '^(?!.*(swcMinify|esbuildMinify|htmlMinifierTerser)).*$'
136+
;;
137+
14.x|16.x)
138+
npm run test:coverage -- --ci -t '^(?!.*esbuildMinify).*$'
139+
;;
140+
*)
141+
npm run test:coverage -- --ci
142+
;;
143+
esac
127144
128145
- name: Submit coverage data to codecov
129146
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0

.husky/pre-commit

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
#!/bin/sh
2-
. "$(dirname "$0")/_/husky.sh"
3-
41
npx --no-install lint-staged

0 commit comments

Comments
 (0)