Commit 009cb50 1 parent febbba9 commit 009cb50 Copy full SHA for 009cb50
File tree 3 files changed +24
-0
lines changed
3 files changed +24
-0
lines changed Original file line number Diff line number Diff line change 6
6
- image : circleci/node:16.13.0
7
7
steps :
8
8
- checkout
9
+ - run : npm run ci:precheck
9
10
- restore_cache :
10
11
keys :
11
12
# When lock file changes, use increasingly general patterns to
29
30
- image : circleci/node:16.13.0
30
31
steps :
31
32
- checkout
33
+ - run : npm run ci:precheck
32
34
- restore_cache :
33
35
keys :
34
36
# When lock file changes, use increasingly general patterns to
Original file line number Diff line number Diff line change
1
+ const {
2
+ lockfileVersion,
3
+ } = require ( "../package-lock.json" ) ;
4
+
5
+ const expectedVersion = 2 ;
6
+
7
+ if ( typeof lockfileVersion !== "number" ||
8
+ lockfileVersion < expectedVersion ) {
9
+ throw new Error (
10
+ `Old lockfileVersion (${
11
+ lockfileVersion
12
+ } ) found in package-lock.json (expected ${
13
+ expectedVersion
14
+ } or later)`
15
+ ) ;
16
+ }
17
+
18
+ console . log ( "ok" , {
19
+ lockfileVersion,
20
+ expectedVersion,
21
+ } ) ;
Original file line number Diff line number Diff line change 40
40
"prepdist" : " node ./config/prepareDist.js" ,
41
41
"resolve" : " ts-node-script config/resolveModuleIds.ts" ,
42
42
"clean" : " rimraf -r dist coverage lib temp" ,
43
+ "ci:precheck" : " node config/precheck.js" ,
43
44
"test" : " jest --config ./config/jest.config.js" ,
44
45
"test:debug" : " BABEL_ENV=server node --inspect-brk node_modules/.bin/jest --config ./config/jest.config.js --runInBand --testTimeout 99999" ,
45
46
"test:ci" : " npm run test:coverage && npm run test:memory" ,
You can’t perform that action at this time.
0 commit comments