Add "npm ci" support to npm module & state #67425
Replies: 4 comments
-
@ralish Thanks, Looking forward to seeing your PR. :) |
Beta Was this translation helpful? Give feedback.
-
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue. |
Beta Was this translation helpful? Give feedback.
-
Please keep open. This is an important feature request and one I'd like to work on eventually. |
Beta Was this translation helpful? Give feedback.
-
Thank you for updating this issue. It is no longer marked as stale. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Description of Issue/Question
For installing Node.js modules Salt provides the
npm
state which provides support for installing packages via apackage.json
file. Internally this results in Salt callingnpm install
. Recent versions ofnpm
include thenpm ci
command which is far better suited to continuous integration and deployment scenarios as it ensures reproducible builds.Introducing support should be relatively straightforward as the semantics are (near?) identical to
npm install
. For thenpm
state I propose adding a boolean option to thebootstrap
function which will trigger usage ofnpm ci
(and fail the state if it returns non-zero). In thenpm module
an equivalent boolean option should be implemented in theinstall
function for the state to use.I'm happy to take a stab at implementing support when I find some spare time if someone else doesn't beat me to it.
References:
npm ci
for faster, more reliable buildsBeta Was this translation helpful? Give feedback.
All reactions