Skip to content

Commit 370498d

Browse files
committed
Downgrade nyc to ^11.0.0
nyc 12 requires Node 6. On Node 4 it causes the following error: Transformation error for /home/travis/build/kevinoid/git-branch-is/bin/git-branch-is.js ; return original code Unexpected token ... Transformation error for /home/travis/build/kevinoid/git-branch-is/index.js ; return original code Unexpected token ... Due to use of the spread operator in the instrumentation code, which results in lack of instrumentation and incorrect coverage info (and a test failure due to unexpected stderr output). Stick to 11 as long as this package supports Node v4 and disable David and Greenkeeper warnings. Signed-off-by: Kevin Locke <[email protected]>
1 parent 13c2bff commit 370498d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"lint-js": "eslint . && echo ESLint passed.",
3333
"postpublish": "git -C doc push && git push --follow-tags origin master gh-pages && echo Remember to update GitHub Releases from CHANGELOG.md && echo until skywinder/github-changelog-generator#56 is fixed.",
3434
"postversion": "rimraf doc && git clone -b gh-pages -l -q . doc && npm run doc && git -C doc add . && git -C doc commit -n -m \"Docs for v$npm_package_version\"",
35-
"preversion": "depcheck --ignore-dirs doc && david && node ./bin/git-branch-is.js master && travis-status -b master -c -wx && appveyor-status -b master -c -w -p kevinoid/git-branch-is && nyc check-coverage --lines 95",
35+
"preversion": "depcheck --ignore-dirs doc && david -i nyc && node ./bin/git-branch-is.js master && travis-status -b master -c -wx && appveyor-status -b master -c -w -p kevinoid/git-branch-is && nyc check-coverage --lines 95",
3636
"test": "npm run lint && npm run test-unit",
3737
"test-cov": "npm run lint && npm run test-unit-cov",
3838
"test-unit": "mocha --recursive test",
@@ -54,14 +54,19 @@
5454
"jsdoc": "^3.4.1",
5555
"mocha": "^5.0.0",
5656
"nodecat": "^1.0.0",
57-
"nyc": "^12.0.0",
57+
"nyc": "^11.0.0",
5858
"pify": "^3.0.0",
5959
"rimraf": "^2.2.0"
6060
},
6161
"engines": {
6262
"node": ">=4",
6363
"npm": ">=1.3.7"
6464
},
65+
"greenkeeper": {
66+
"ignore": [
67+
"nyc"
68+
]
69+
},
6570
"nyc": {
6671
"exclude": [
6772
"test",

0 commit comments

Comments
 (0)