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

Enable running npm ci instead of install #15579

Closed
caalador opened this issue Dec 29, 2022 · 6 comments · Fixed by #15986
Closed

Enable running npm ci instead of install #15579

caalador opened this issue Dec 29, 2022 · 6 comments · Fixed by #15986

Comments

@caalador
Copy link
Contributor

Describe your motivation

CI builds would benefit of the possibility to install the npm packages using npm ci instead of npm install (or for pnpm use pnpm install --frozen-lockfile) to install the exact versions in the lock file.

Describe the solution you'd like

Add a system variable (vaadin.ci.build?) that would order TaskRunNpmInstall to use ci instead of install.

Additional context

the vaadin maven plugin executes "npm install" instead of "npm ci" in build flow, and that can potentially overwrite package/package-lock.json.

@mshabarov
Copy link
Contributor

mshabarov commented Jan 18, 2023

Targets Vaadin 24.1 and Vaadin 14.10.

@caalador caalador moved this from Product backlog to Ready To Go in OLD Vaadin Flow ongoing work (Vaadin 10+) Feb 8, 2023
@tepi tepi self-assigned this Feb 10, 2023
tepi added a commit that referenced this issue Feb 22, 2023
mshabarov pushed a commit that referenced this issue Mar 3, 2023
Adds possibility to install the npm packages using npm ci instead of npm install (or for pnpm: pnpm install --frozen-lockfile) to install the exact versions in the lock file. Can be enabled with ci.build parameter when executing a production mode frontend build.

Fixes #15579
OLD Vaadin Flow ongoing work (Vaadin 10+) automation moved this from Ready To Go to Done - pending release Mar 3, 2023
Vaadin Flow enhancements backlog (Vaadin 10+) automation moved this from Next for Dev. Team to Done / Pending Release Mar 3, 2023
tepi added a commit that referenced this issue Mar 3, 2023
@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 14.10.0.alpha2 and is also targeting the upcoming stable 14.10.0 version.

@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 24.1.0.alpha1 and is also targeting the upcoming stable 24.1.0 version.

@TobiasSagmeister
Copy link

How can we configure this feature to use it in build?

@tepi
Copy link
Contributor

tepi commented Mar 31, 2023

The feature is only out in alpha versions so far. You can enable it by setting ciBuild parameter to true for vaadin-maven-plugin in your pom xml, or by providing -Dci.build=true if building from command line.

mshabarov pushed a commit that referenced this issue Nov 6, 2023
Adds possibility to install the npm packages using npm ci instead of npm install (or for pnpm: pnpm install --frozen-lockfile) to install the exact versions in the lock file. Can be enabled with ci.build parameter when executing a production mode frontend build.

Fixes #15579

(cherry picked from commit 5607864)
tepi added a commit that referenced this issue Nov 8, 2023
* feat: Enable running npm ci mode (#15579) (#15986)

Adds possibility to install the npm packages using npm ci instead of npm install (or for pnpm: pnpm install --frozen-lockfile) to install the exact versions in the lock file. Can be enabled with ci.build parameter when executing a production mode frontend build.

Fixes #15579

(cherry picked from commit 5607864)

* Fix npm ci test

---------

Co-authored-by: Teppo Kurki <teppo.kurki@vaadin.com>
@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 23.4.0.alpha1 and is also targeting the upcoming stable 23.4.0 version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment