-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Suggest npm ci in main readme #103
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
Conversation
Stricter and faster install command meant for CI environments.
The thing is that |
That’s a good point that I’ve missed. I think that it’s still a good idea to use Going the other way around, from install to ci is less easily discoverable. |
Furthermore, |
|
npm has created package-lock files by default for a number of years now, I think it's safe to default these to on. Anyone who is turning them off knows what they're doing. |
I never use package-lock.json file for libraries. I would like to suggest checking lock file like this. - name: Install
run: |
if [ -f package-lock.json ]; then
npm ci
else
npm install
fi |
Agreed |
The suggested conditional makes sense in the implementation of some automated action, but this PR talks about the documentation for the users, code samples to copy and paste. Conditional there makes the sample too big and misleads our users’ teammates as to why the lock file is sometimes there. Seeing how there is no interest in merging this, closing. |
I still believe this would be useful. I personally read the docs and thought, "wait, npm ci isn't best practice anymore?" and spent half an hour finding out.
I believe this is very true, add another year since this issue was closed. |
Running Anyhow, I'll stop ranting now. I'm with the original author of this post that the documentation should be updated to suggest Side note: I usually use tl;dr. Please update the documentation to state |
Great insight @arabold, thanks a lot! ❤️ |
This is actually false. |
I've opened up a PR under #326 to improve the documentation with these sensible defaults (also for Yarn and PNPM). |
…ions#103) Bumps [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) from 3.1.4 to 3.2.0. - [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases) - [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/master/CHANGELOG.md) - [Commits](prettier/eslint-plugin-prettier@v3.1.4...v3.2.0) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Stricter and faster install command meant for CI environments. Forgive me if this has already been considered, a cursory search in the issue tracker did not find anything related.