From 361f83e5acd814881c82add3e1bd06ce9ded777c Mon Sep 17 00:00:00 2001 From: Matheus Marchini Date: Wed, 1 Apr 2020 14:07:14 -0700 Subject: [PATCH] feat(deps): replace cover/istanbul with nyc (#1823) `istanbul` is not supported anymore, and the last version of `cover` was released seven years ago. `cover` also depends on a vulnerable package (which makes `npm audit` noisy). Since `make cover` was not working anymore, replacing it with `nyc` (`istanbul`'s successor) should be straightforward. Signed-off-by: Matheus Marchini --- .gitignore | 5 +++-- Makefile | 5 ++--- package.json | 3 +-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 883db1f28..2a7cba92c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,3 @@ -.coverage_data -cover_html node_modules docs/*.html docs/pkg @@ -14,3 +12,6 @@ deps/javascriptlint deps/jsstyle package-lock.json benchmark/results +.nyc_output/ +coverage/ +cover_html/ diff --git a/Makefile b/Makefile index 932b8b2b6..122a2096d 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,7 @@ ESLINT := ./node_modules/.bin/eslint DOCUMENTATION := ./node_modules/.bin/documentation NODEUNIT := ./node_modules/.bin/nodeunit MOCHA := ./node_modules/.bin/mocha -NODECOVER := ./node_modules/.bin/cover +NODECOVER := ./node_modules/.bin/nyc DOCS_BUILD := ./tools/docsBuild.js NPM := npm NODE := node @@ -52,8 +52,7 @@ $(NODECOVER): | $(NPM_EXEC) .PHONY: cover cover: $(NODECOVER) @rm -fr ./.coverage_data - $(NODECOVER) run $(NODEUNIT) ./test/*.js - $(NODECOVER) report html + $(NODECOVER) --reporter=html --reporter=text-summary --reporter=lcov $(NODEUNIT) ./test/*.js CLEAN_FILES += $(TAP) ./node_modules/nodeunit diff --git a/package.json b/package.json index ba90e83a7..05c1d1fc2 100644 --- a/package.json +++ b/package.json @@ -122,7 +122,6 @@ "autocannon": "^4.0.0", "autocannon-compare": "^0.4.0", "chai": "^4.2.0", - "cover": "^0.2.9", "coveralls": "^3.0.3", "documentation": "^11.0.0", "eslint": "^5.16.0", @@ -131,10 +130,10 @@ "eslint-plugin-prettier": "^3.1.0", "glob": "^7.1.4", "inquirer": "^3.3.0", - "istanbul": "^0.4.5", "mkdirp": "^0.5.1", "mocha": "^7.1.1", "nodeunit": "^0.11.3", + "nyc": "^15.0.0", "ora": "^1.3.0", "pre-commit": "^1.2.2", "prettier": "^1.17.1",