-
-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use "--omit=dev" internally on newer npm version #86
Use "--omit=dev" internally on newer npm version #86
Conversation
Update the behaviour when the `--production` flag is used on the CLI of this project to, instead of just using '--production', do: 1. get the version of npm being used, 2. check the version against a version range, 3. use '--production' for older npm version, or 4. use '--omit=dev' for newer npm version. Two notes regarding point 2: 1. The version range is probably incorrect as is. I based it on the GitHub issue with the idea to either let it evolve over time as reports come in, or adjust it after this commit if it's preferred that the range is (likely) correct before this is released. 2. To perform the version range check I added a new runtime dependency, namely "semver". See: https://www.npmjs.com/package/semver Lastly, while I updated the tests, the tests as they are now are not ood. The current test suite assumes you're running them with a newer version of npm. It would be better if the tests are somehow run with a controlled version of npm instead, or better yet, with various versions of npm.
thank you @ericcornelissen! I'm sorry I couldn't merge this in as your repo is in an archived state. I've made your changes and added you to the contributors list. Thank you again for your contribution! |
No problem, I didn't know that was the case (good to know!). Glad to see these changes landing as well as the activity on the project 😃 |
Hey Eric, no worries at all, and I'm really happy to see your changes land in the project! By the way, I noticed you've been pretty active and engaged in Github — would you be interested in becoming a collaborator for this project? I’m a bit short on time these days and could definitely use some extra hands to keep things moving. If you’re up for it, I’d love to have you on board. Let me know what you think! |
I'll have a look at a reviewing some issues and PRs, and possibly making some contributions, for a while and I'll let you know how I feel then. |
Sounds perfect, Eric! Take your time, and no pressure at all. Just let me know whenever you're ready. Thanks again for all your contributions—really appreciate it! |
Closes #81
Update the behaviour when the
--production
flag is used on the CLI of this project to, instead of just using--production
when invokingnpm audit
, do:Note that this change is not a breaking change for this project.
While I updated the tests, the tests as they are now are not good. The current test suite assumes you're running them with a newer version of npm. It would be better if the tests are somehow run with a controlled version of npm instead, or better yet, with various versions of npm.
Footnotes
The version range is probably incorrect as is. I based it on the GitHub issue with the idea to either let it evolve over time as reports come in, or adjust it after this commit if it's preferred that the range is (likely) correct before this is released. ↩
To perform the version range check I added a new runtime dependency, namely "semver". See: https://www.npmjs.com/package/semver ↩