Add nsp scanning after lint step

- Also separate lint from test npm script and call separately in CircleCI

Issue #34
This commit is contained in:
Les Orchard 2018-05-08 16:54:11 -04:00
Родитель d1c88be4ca
Коммит 2593746676
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 6DA657B1385DFCAE
3 изменённых файлов: 1299 добавлений и 765 удалений

Просмотреть файл

@ -1,23 +1,24 @@
version: 2
jobs:
test:
docker:
- image: circleci/node:8.11.1@sha256:0ac63bc3d5a224deac83654a322a995332809c9f535434dfd195c26e7310ec3e
working_directory: ~/repo
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
- v1-dependencies-
- run: npm install
- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
- run: npm test
workflows:
version: 2
test:
jobs:
- test
version: 2
jobs:
test:
docker:
- image: circleci/node:8.11.1@sha256:0ac63bc3d5a224deac83654a322a995332809c9f535434dfd195c26e7310ec3e
working_directory: ~/repo
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
- v1-dependencies-
- run: npm install
- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
- run: npm run lint
- run: npm test
workflows:
version: 2
test:
jobs:
- test

2004
package-lock.json сгенерированный

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -4,13 +4,17 @@
"description": "Rate limiting proxy for watchdog requests",
"scripts": {
"deploy": "serverless deploy",
"lint": "eslint functions lib test",
"lint": "npm-run-all lint:*",
"lint:js": "eslint functions lib test",
"logs": "serverless logs",
"postlint": "nsp check -o summary",
"nsp": "nsp check",
"remove": "serverless remove",
"test": "npm-run-all lint test:js",
"test": "npm-run-all test:*",
"test:js": "mocha --recursive test",
"watch": "onchange -v -i \"{functions,lib,test}/**/*.js\" -- npm run test",
"watch:deploy": "onchange -v \"functions/*.js\" \"lib/*.js\" -- npm run deploy"
"watch": "npm-run-all --parallel watch:*",
"watch:lint": "onchange -v -i \"{functions,lib,test}/**/*.js\" -- npm run lint",
"watch:test": "onchange -v -i \"{functions,lib,test}/**/*.js\" -- npm run test"
},
"homepage": "https://github.com/mozilla/watchdog-proxy/",
"repository": {
@ -27,6 +31,7 @@
"eslint-plugin-no-unsanitized": "3.0.0",
"mocha": "5.1.1",
"npm-run-all": "4.1.3",
"nsp": "3.2.1",
"onchange": "4.0.0",
"serverless": "1.27.2",
"serverless-s3-remover": "0.4.1",