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 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 :
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
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
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
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
Original file line number Diff line number Diff 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 - 9 a - f ] { 32 } $ /
2023 } ;
2124 }
Original file line number Diff line number Diff line change @@ -952,9 +952,9 @@ webpack x.x.x compiled successfully in X ms"
952952
953953exports [` 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)
956956runtime modules 1.72 KiB 5 modules
957- hidden modules 123 bytes 2 modules
957+ hidden modules 99 bytes 2 modules
958958cacheable modules 119 bytes
959959 ./index.js 77 bytes [built] [code generated]
960960 ./a.txt 42 bytes [built] [code generated]
Original file line number Diff line number Diff line change @@ -18,6 +18,9 @@ module.exports = {
1818 {
1919 test : / \. j s o n / ,
2020 loader : "file-loader" ,
21+ options : {
22+ name : "[sha256:hash:8].[ext]"
23+ } ,
2124 type : "javascript/auto"
2225 }
2326 ]
Original file line number Diff line number Diff line change 11const fs = require ( "fs" ) ;
22const path = require ( "path" ) ;
3- const crypto = require ( "crypto " ) ;
3+ const createHash = require ( "../../../lib/util/createHash " ) ;
44
55const 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 ) ;
You can’t perform that action at this time.
0 commit comments