Pin dependency hash with lockfile & test with lockfile-lint

This commit is contained in:
Faisal Salman 2023-04-13 05:04:16 +07:00
parent c2f17004b8
commit 432a2ee72d
4 changed files with 1818 additions and 6 deletions

View File

@ -18,7 +18,7 @@ jobs:
node-version: 'lts/*' node-version: 'lts/*'
- name: Run the test - name: Run the test
run: | run: |
npm install npm ci
npm run build npm run build
npx playwright install npx playwright install
npm run test-ci npm run test-ci

1
.npmrc
View File

@ -1 +0,0 @@
package-lock=false

1813
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -164,16 +164,16 @@
], ],
"scripts": { "scripts": {
"build": "uglifyjs src/ua-parser.js -o dist/ua-parser.min.js --comments '/^ UA/' && uglifyjs src/ua-parser.js -o dist/ua-parser.pack.js --comments '/^ UA/' --compress --mangle && node script/build-module.js", "build": "uglifyjs src/ua-parser.js -o dist/ua-parser.min.js --comments '/^ UA/' && uglifyjs src/ua-parser.js -o dist/ua-parser.pack.js --comments '/^ UA/' --compress --mangle && node script/build-module.js",
"test": "jshint src && mocha -R nyan test/mocha*js && npx playwright test", "test": "jshint src && mocha -R nyan test/mocha*js && npx playwright test && npx lockfile-lint -p package-lock.json",
"test-ci": "jshint src && mocha -R spec test/mocha*js && npx playwright test" "test-ci": "jshint src && mocha -R spec test/mocha*js && npx playwright test && npx lockfile-lint -p package-lock.json"
}, },
"devDependencies": { "devDependencies": {
"@babel/parser": "7.15.8", "@babel/parser": "7.15.8",
"@babel/traverse": "7.15.4", "@babel/traverse": "7.15.4",
"@playwright/test": "^1.32.2", "@playwright/test": "~1.32.2",
"jshint": "~2.12.0", "jshint": "~2.12.0",
"mocha": "~8.2.0", "mocha": "~8.2.0",
"requirejs": "^2.3.2", "requirejs": "2.3.2",
"safe-regex": "^2.1.1", "safe-regex": "^2.1.1",
"uglify-js": "~3.12.0" "uglify-js": "~3.12.0"
}, },