build firepit with node 24#10666
Conversation
Wiz Scan Summary
To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension. |
There was a problem hiding this comment.
Code Review
This pull request updates the firepit-builder Dockerfile to use Node 24 and npm 11.13, and upgrades @yao-pkg/pkg to version 6.20.0 in the standalone package. Feedback on the Dockerfile suggests using the active LTS version, Node 22, instead of Node 24 for better stability, and pinning npm to major version 11 rather than a specific minor/patch version to avoid potential build failures.
| @@ -1,4 +1,4 @@ | |||
| FROM node:20 | |||
| FROM node:24 | |||
There was a problem hiding this comment.
Using Node 24 (which is a non-LTS/Current release, or potentially unreleased depending on the current date) is not recommended for stable production builds. It is highly recommended to use the current active LTS version, Node 22, to ensure stability, compatibility, and that the Docker image is readily available on Docker Hub. Using an unreleased or non-LTS version can lead to build failures or unexpected runtime issues.
FROM node:22
| # Upgrade npm to 9. | ||
| RUN npm install --global npm@9.5 | ||
| # Upgrade npm to 11. | ||
| RUN npm install --global npm@11.13 |
There was a problem hiding this comment.
Pinning to a specific minor/patch version of npm like 11.13 that may not be released or stable yet can cause build failures. It is safer to either use the default stable npm version bundled with the Node.js image (e.g., npm 10 with Node 22) or pin to the major version npm@11 to get the latest stable minor updates automatically.
RUN npm install --global npm@11
Description
Updates the ff:
Node: 20 -> 24
yao-pgk/pgk: 6.4.1 -> 6.20.0
npm: 9 -> 11
Scenarios Tested
Ran the build script
node ./pipeline.js --package="/PATH/firebase-tools", then tested the build. TIL you can find out which version of Node.js was bundled in firepit by usingis:nodeand forcing an error:Sample Commands