Skip to content
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

Make dependency installation more deterministic #35

Merged
merged 2 commits into from
Apr 14, 2023

Conversation

bryanenders
Copy link
Contributor

@bryanenders bryanenders commented Apr 14, 2023

Fixes #34

Why

Although npm install --no-save doesn’t alter package-lock.json, it doesn’t honor package-lock.json any more than npm install. The clean install npm ci is time-consuming and should only be run if package-lock.json has changed.

How

  • Create conditional-npm-ci
  • Use conditional-npm-ci for Dialog, Hubs Admin, and Hubs Client

Why
---
Although `npm install --no-save` doesn’t alter `package-lock.json`, it
doesn’t honor `package-lock.json` any more than `npm install`.  The
clean install `npm ci` is time-consuming and should only be run if
`package-lock.json` has changed.

How
---
* Create `conditional-npm-ci`
* Use `conditional-npm-ci` for Dialog, Hubs Admin, and Hubs Client
Copy link
Contributor

@johnshaughnessy johnshaughnessy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it important to avoid rerunning npm ci when people only need to run this script once?

@bryanenders
Copy link
Contributor Author

@johnshaughnessy You may want to run bin/init when you change service dependencies. I often run $ bin/services-update && bin/init.

@johnshaughnessy
Copy link
Contributor

Oh, I see. That makes sense. Thanks!

@bryanenders
Copy link
Contributor Author

Thanks for asking! I added a line to the README.

@bryanenders bryanenders merged commit 3f9b332 into main Apr 14, 2023
@bryanenders bryanenders deleted the reproduce-dependencies branch April 14, 2023 15:29
@bryanenders bryanenders mentioned this pull request Apr 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

init script ignores package-lock.json
2 participants