Use Installer when packaging git dependencies #189
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When installing git dependencies, the config options:
dry-run
andignore-scripts
are being lost if set as cli arguments causing theprepare
script to always run. We found this issue while doing an install that only needs to get lockfile changes. You can work around this by setting these settings in a.npmrc
file.We've also found an issue with proxying npm config to the cli when a large
cafile
has been set. The contents ofcafile
is expanded into theca
config key which get passed as a cli argument to install. When this file is big (e.g. including a custom cert + all system certs) it causes a kernel exception on Linux (E2BIG: Argument list too long).The current implementation requires
prepublish
to be fully deprecated because I couldn't figure out a way to only set theignore-prepublish
config setting for the git install. Setting it withnpm.config.set('ignore-prepublish', true)
before the install doesn't seem to be picked up in thenpm-lifecycle
package when running theprepublish
stage.I imagine it will be a pain to deprecated
prepublish
without breaking a bunch of packages, is this still something you're planning or should I find a workaround?