File tree Expand file tree Collapse file tree 5 files changed +22
-14
lines changed Expand file tree Collapse file tree 5 files changed +22
-14
lines changed Original file line number Diff line number Diff line change 21
21
- name : Use Node.js
22
22
uses : actions/setup-node@v2
23
23
with :
24
- node-version : 16 .x
25
- cache : ' yarn'
24
+ node-version : 17 .x
25
+ cache : " yarn"
26
26
- run : yarn --frozen-lockfile
27
27
- uses : actions/cache@v1
28
28
with :
37
37
- name : Use Node.js
38
38
uses : actions/setup-node@v2
39
39
with :
40
- node-version : 16 .x
41
- cache : ' yarn'
40
+ node-version : 17 .x
41
+ cache : " yarn"
42
42
- run : yarn --frozen-lockfile
43
43
- run : yarn link --frozen-lockfile || true
44
44
- run : yarn link webpack --frozen-lockfile
54
54
- name : Use Node.js
55
55
uses : actions/setup-node@v2
56
56
with :
57
- node-version : 16 .x
58
- cache : ' yarn'
57
+ node-version : 17 .x
58
+ cache : " yarn"
59
59
- run : yarn --frozen-lockfile
60
60
- run : yarn link --frozen-lockfile || true
61
61
- run : yarn link webpack --frozen-lockfile
75
75
fail-fast : false
76
76
matrix :
77
77
os : [ubuntu-latest, windows-latest, macos-latest]
78
- node-version : [10.x, 16 .x]
78
+ node-version : [10.x, 17 .x]
79
79
part : [a, b]
80
80
include :
81
+ - os : ubuntu-latest
82
+ node-version : 16.x
83
+ part : a
81
84
- os : ubuntu-latest
82
85
node-version : 14.x
83
86
part : a
91
94
uses : actions/setup-node@v2
92
95
with :
93
96
node-version : ${{ matrix.node-version }}
94
- cache : ' yarn'
97
+ cache : " yarn"
95
98
- run : yarn --frozen-lockfile
96
99
- run : yarn link --frozen-lockfile || true
97
100
- run : yarn link webpack --frozen-lockfile
Original file line number Diff line number Diff line change @@ -15,7 +15,10 @@ const wasmHashes = {
15
15
const createMd4Hash = require ( "../lib/util/hash/md4" ) ;
16
16
return {
17
17
createHash : createMd4Hash ,
18
- createReferenceHash : async ( ) => createHash ( "md4" ) ,
18
+ createReferenceHash :
19
+ parseInt ( process . version . slice ( 1 ) , 10 ) < 17
20
+ ? async ( ) => createHash ( "md4" )
21
+ : createMd4Hash ,
19
22
regExp : / ^ [ 0 - 9 a - f ] { 32 } $ /
20
23
} ;
21
24
}
Original file line number Diff line number Diff line change @@ -952,9 +952,9 @@ webpack x.x.x compiled successfully in X ms"
952
952
953
953
exports [` StatsTestCases should print correct stats for exclude-with-loader 1` ] = `
954
954
"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)
956
956
runtime modules 1.72 KiB 5 modules
957
- hidden modules 123 bytes 2 modules
957
+ hidden modules 99 bytes 2 modules
958
958
cacheable modules 119 bytes
959
959
./index.js 77 bytes [built] [code generated]
960
960
./a.txt 42 bytes [built] [code generated]
Original file line number Diff line number Diff line change @@ -18,6 +18,9 @@ module.exports = {
18
18
{
19
19
test : / \. j s o n / ,
20
20
loader : "file-loader" ,
21
+ options : {
22
+ name : "[sha256:hash:8].[ext]"
23
+ } ,
21
24
type : "javascript/auto"
22
25
}
23
26
]
Original file line number Diff line number Diff line change 1
1
const fs = require ( "fs" ) ;
2
2
const path = require ( "path" ) ;
3
- const crypto = require ( "crypto " ) ;
3
+ const createHash = require ( "../../../lib/util/createHash " ) ;
4
4
5
5
const hashedFiles = {
6
6
"file.jpg" : a => a . name . endsWith ( ".jpg" ) ,
@@ -31,8 +31,7 @@ module.exports = {
31
31
const asset = statsData . assets . find ( hashedFiles [ name ] ) ;
32
32
expect ( asset ) . not . toBe ( undefined ) ;
33
33
const content = fs . readFileSync ( path . resolve ( __dirname , "a" , name ) ) ;
34
- const hash = crypto
35
- . createHash ( "md4" )
34
+ const hash = createHash ( "md4" )
36
35
. update ( content )
37
36
. digest ( "hex" )
38
37
. slice ( 0 , 20 ) ;
You can’t perform that action at this time.
0 commit comments