Allow specifying the NPM version via a marker or environment variable. #24
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.
This is an attempt to solve #22. A npm version can be set either via the
NPM_VERSION_URL
environment variable or by setting the.openshift/NPM_VERSION_URL
marker.Two things might be worth discussing:
I also allow setting the npm version via an environment variable. This is a direct result of Problem with auto scaling #23, not sure whether you want to include this.
In theory there is no need to use a semver.io URL, npm install could resolve the version. So instead of setting an URL we could just allow setting the version and npm would handle something like
npm install -g [email protected]
. The reason I chose the URL approach anyway are:a) It is consistent on how the node version gets resolved
b) It is more flexible, e.g. I could run my own service where I can configure the node and npm version to use for all my gears