Need the ability to use npm ci and a package-lock file. #621

Open
opened 2026-01-29 16:44:18 +00:00 by claunia · 0 comments
Owner

Originally created by @Delpire on GitHub (Jan 21, 2021).

Originally assigned to: @GregorBiswanger on GitHub.

I believe it is a good practice to use the npm ci command when building from your continuous integration pipeline.
https://docs.npmjs.com/cli/v6/commands/npm-ci

My understanding is that one major benefit is that it will fail builds if the package.json does not match the package-lock.json file. This is important when you want to keep track of your dependencies, especially for security audits as well as ensuring you are following license agreements correctly.

This brings me to the second aspect of this feature, which is that we should be using a package-lock file and checking it into our source control. There are messages about this during the build, and it is what is recommended by npm. Currently there does not seem to be any way to tell Electron .NET about a package-lock.json.

I believe the Electron .NET CLI tool, especially the build command, should have a flag to specify using npm ci rather than npm install and we should have an argument similar to /package-json but for the package-lock.json instead. Currently if you pass the package lock into /package-json, the build fails.

Originally created by @Delpire on GitHub (Jan 21, 2021). Originally assigned to: @GregorBiswanger on GitHub. I believe it is a good practice to use the `npm ci` command when building from your continuous integration pipeline. https://docs.npmjs.com/cli/v6/commands/npm-ci My understanding is that one major benefit is that it will fail builds if the package.json does not match the package-lock.json file. This is important when you want to keep track of your dependencies, especially for security audits as well as ensuring you are following license agreements correctly. This brings me to the second aspect of this feature, which is that we should be using a package-lock file and checking it into our source control. There are messages about this during the build, and it is what is recommended by npm. Currently there does not seem to be any way to tell Electron .NET about a package-lock.json. I believe the Electron .NET CLI tool, especially the build command, should have a flag to specify using `npm ci` rather than `npm install` and we should have an argument similar to `/package-json` but for the package-lock.json instead. Currently if you pass the package lock into `/package-json`, the build fails.
claunia added the Feature label 2026-01-29 16:44:18 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Electron.NET#621