Closed AndyOGo closed 6 years ago
Anyone facing this issue, make sure to use npm run test
, not only test
.
correct package.json
{
"scripts": {
"test": "parallelshell 'npm run test-eslint' 'npm run test-stylelint'",
"test-eslint": "eslint src/",
"test-stylelint": "stylelint 'src/**/*.scss'",
"bump-major": "npm run test && npmversion --increment major",
"bump-minor": "npm run test && npmversion --increment minor",
"bump-patch": "npm run test && npmversion --increment patch",
"bump-major-beta": "npm run test && npmversion --increment major --preid beta"
}
}
Hi
Many thanks for your feedback
I will check what can I do, but I think this error is occured before the npmversion tool is called.
However, I will make some tests, because maybe we can face to this issue if we use the pre- and post- npm run scripts around npmversion.
I know that Eslint always return a 0 status code when an error is occured. And for CI, this is quiet annoyed, because the build fails and do not propagate the reports.
So, I often do the following stuff (which works on all platforms):
{
"scripts": {
"checkstyle": "node node_modules/eslint/bin/eslint.js --config=.eslintrc --output-file ./target/eslint-reporter-checkstyle.xml --format checkstyle ./app/**/*.js || exit 0"
}
}
In all cases, I will check what can I do to prevent that.
Many thanks again
Regards
@rochejul
Thanks for you quick answer.
I already fixed the issue, it was caused by running the test
script without npm run
before.
It's wrong in your Readme.md at those lines or my npm version (3.10.10
) doesn't support that shorter syntax:
https://github.com/rochejul/npmversion/blame/master/README.md#L97-L101
https://github.com/rochejul/npmversion/blame/master/README.md#L123-L127
https://github.com/rochejul/npmversion/blame/master/README.md#L163-L167
Ok I will update the documentation too
Regards
First thanks for this awesome really needed fix for missing
--preid
support ofnpm version
.May I'm wrong here.
Though my
eslint
andstylelint
tests exits both with0
exist code. And run both combined within an npmtest
scripts exits with0
too.But running them together before
npmversion
fails byELIFECYCLE
error with exit code of1
:It's super wierd, really works alone 🤔
package.json