Skip to content

Commit 42b4ffb

Browse files
authored
Merge pull request #14594 from webpack/ci/node-17
run CI on node 17
2 parents 1992e9c + c2b6f78 commit 42b4ffb

File tree

5 files changed

+22
-14
lines changed

5 files changed

+22
-14
lines changed

.github/workflows/test.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ jobs:
2121
- name: Use Node.js
2222
uses: actions/setup-node@v2
2323
with:
24-
node-version: 16.x
25-
cache: 'yarn'
24+
node-version: 17.x
25+
cache: "yarn"
2626
- run: yarn --frozen-lockfile
2727
- uses: actions/cache@v1
2828
with:
@@ -37,8 +37,8 @@ jobs:
3737
- name: Use Node.js
3838
uses: actions/setup-node@v2
3939
with:
40-
node-version: 16.x
41-
cache: 'yarn'
40+
node-version: 17.x
41+
cache: "yarn"
4242
- run: yarn --frozen-lockfile
4343
- run: yarn link --frozen-lockfile || true
4444
- run: yarn link webpack --frozen-lockfile
@@ -54,8 +54,8 @@ jobs:
5454
- name: Use Node.js
5555
uses: actions/setup-node@v2
5656
with:
57-
node-version: 16.x
58-
cache: 'yarn'
57+
node-version: 17.x
58+
cache: "yarn"
5959
- run: yarn --frozen-lockfile
6060
- run: yarn link --frozen-lockfile || true
6161
- run: yarn link webpack --frozen-lockfile
@@ -75,9 +75,12 @@ jobs:
7575
fail-fast: false
7676
matrix:
7777
os: [ubuntu-latest, windows-latest, macos-latest]
78-
node-version: [10.x, 16.x]
78+
node-version: [10.x, 17.x]
7979
part: [a, b]
8080
include:
81+
- os: ubuntu-latest
82+
node-version: 16.x
83+
part: a
8184
- os: ubuntu-latest
8285
node-version: 14.x
8386
part: a
@@ -91,7 +94,7 @@ jobs:
9194
uses: actions/setup-node@v2
9295
with:
9396
node-version: ${{ matrix.node-version }}
94-
cache: 'yarn'
97+
cache: "yarn"
9598
- run: yarn --frozen-lockfile
9699
- run: yarn link --frozen-lockfile || true
97100
- run: yarn link webpack --frozen-lockfile

test/WasmHashes.unittest.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ const wasmHashes = {
1515
const createMd4Hash = require("../lib/util/hash/md4");
1616
return {
1717
createHash: createMd4Hash,
18-
createReferenceHash: async () => createHash("md4"),
18+
createReferenceHash:
19+
parseInt(process.version.slice(1), 10) < 17
20+
? async () => createHash("md4")
21+
: createMd4Hash,
1922
regExp: /^[0-9a-f]{32}$/
2023
};
2124
}

test/__snapshots__/StatsTestCases.basictest.js.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -952,9 +952,9 @@ webpack x.x.x compiled successfully in X ms"
952952

953953
exports[`StatsTestCases should print correct stats for exclude-with-loader 1`] = `
954954
"hidden assets 34 bytes 1 asset
955-
asset bundle.js 5.28 KiB [emitted] (name: main)
955+
asset bundle.js 5.25 KiB [emitted] (name: main)
956956
runtime modules 1.72 KiB 5 modules
957-
hidden modules 123 bytes 2 modules
957+
hidden modules 99 bytes 2 modules
958958
cacheable modules 119 bytes
959959
./index.js 77 bytes [built] [code generated]
960960
./a.txt 42 bytes [built] [code generated]

test/statsCases/exclude-with-loader/webpack.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ module.exports = {
1818
{
1919
test: /\.json/,
2020
loader: "file-loader",
21+
options: {
22+
name: "[sha256:hash:8].[ext]"
23+
},
2124
type: "javascript/auto"
2225
}
2326
]

test/statsCases/real-content-hash/test.config.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const fs = require("fs");
22
const path = require("path");
3-
const crypto = require("crypto");
3+
const createHash = require("../../../lib/util/createHash");
44

55
const hashedFiles = {
66
"file.jpg": a => a.name.endsWith(".jpg"),
@@ -31,8 +31,7 @@ module.exports = {
3131
const asset = statsData.assets.find(hashedFiles[name]);
3232
expect(asset).not.toBe(undefined);
3333
const content = fs.readFileSync(path.resolve(__dirname, "a", name));
34-
const hash = crypto
35-
.createHash("md4")
34+
const hash = createHash("md4")
3635
.update(content)
3736
.digest("hex")
3837
.slice(0, 20);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy