Skip to content

fix(build): upgrade npm to 11.18.0 - #14181

Open
subhwastaken wants to merge 9 commits into
openfoodfacts:mainfrom
subhwastaken:fix/issue-14139-npm
Open

fix(build): upgrade npm to 11.18.0#14181
subhwastaken wants to merge 9 commits into
openfoodfacts:mainfrom
subhwastaken:fix/issue-14139-npm

Conversation

@subhwastaken

Copy link
Copy Markdown

Summary

  • upgrade the frontend build image to npm 11.18.0
  • install npm with lifecycle scripts disabled before dependency installation

Why

The repository's frontend build reports that npm 10.9.4 is outdated and should be upgraded to 11.18.0.

Fixes #14139

@codecov-commenter

codecov-commenter commented Aug 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 55.17%. Comparing base (4117733) to head (88ebdf8).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #14181      +/-   ##
==========================================
+ Coverage   49.93%   55.17%   +5.23%     
==========================================
  Files         102      103       +1     
  Lines       26315    26373      +58     
  Branches     6292     6301       +9     
==========================================
+ Hits        13140    14550    +1410     
+ Misses      11427     9907    -1520     
- Partials     1748     1916     +168     
Flag Coverage Δ
integration-test-group-1 13.08% <ø> (?)
integration-test-group-2 9.19% <ø> (?)
integration-test-group-3 9.36% <ø> (?)
integration-test-group-4 33.27% <ø> (?)
integration-test-group-5 28.66% <ø> (?)
integration-test-group-6 9.13% <ø> (?)
integration-test-group-7 9.61% <ø> (?)
integration-test-group-8 28.22% <ø> (?)
integration-test-group-9 26.52% <ø> (?)
unit-test-group-1 25.51% <ø> (ø)
unit-test-group-2 30.28% <ø> (ø)
unit-test-group-3 32.77% <ø> (ø)
unit-test-group-4 21.81% <ø> (ø)
unit-test-group-5 28.08% <ø> (ø)
unit-test-group-6 21.62% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hangy

hangy commented Aug 4, 2026

Copy link
Copy Markdown
Member

Thanks for the suggestion @subhwastaken! I think this gets us halfway there. IMHO, we should probably set the packageManager property in package.json, so that GitHub Actions also use the configured version. Potentially, this could also be used in Dockerfile.frontend, so that there's one centrally configured npm version. Do you want to take a stab at this?

@subhwastaken

Copy link
Copy Markdown
Author

Thanks for the suggestion! I'll look into centralizing the npm version via the packageManager field and wiring it up for both GitHub Actions and the Dockerfile.

@teolemon teolemon moved this from To discuss and validate to In Progress in 🍊 Open Food Facts Server issues Aug 5, 2026
@github-actions github-actions Bot added the dependencies Pull requests that update a dependency file label Aug 5, 2026
@subhwastaken

Copy link
Copy Markdown
Author

@hangy I've updated the PR to add the packageManager field to package.json to declare the npm version in a central location.

I also looked through the current GitHub Actions workflows and Dockerfile.frontend. The workflows already use actions/setup-node, while the Docker build still installs npm@11.18.0 explicitly. I couldn't find an existing mechanism in the repository to reuse the packageManager value from package.json during the Docker build. If you have a preferred approach for that part, I'd be happy to update the PR accordingly.

@sonarqubecloud

Copy link
Copy Markdown

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

Labels

dependencies Pull requests that update a dependency file

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

Upgrade our version of npm

4 participants