feat(plugin): Refactor NPM plugin
Metadata
Current evaluation
Merged NPM plugin refactoring. Adds NVM-style version support, moves Node.js downloads to pull phase, verifies SHA256 checksums, updates npm-install for v10+, sets NODE_ENV=production, and adds docs. Resolved #717.
Suggested action: —
No scores available.
Issue body
- [X] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
-----
This pull request refactors the NPM plugin and contains the following changes:
* npm-node-version option now accepts an NVM-style version identifier
* Move Node.js download to pull commands
* Verify SHA256 checksums after the Node.js download
* Use new-style npm-install commands if `npm` version is newer than ~~8.x~~ 10.x
* Set `NODE_ENV` to production by default
* Add documentation
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged NPM plugin refactoring. Adds NVM-style version support, moves Node.js downloads to pull phase, verifies SHA256 checksums, updates npm-install for v10+, sets NODE_ENV=production, and adds docs. Resolved #717. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged refactoring of the NPM plugin. Updates include NVM-style version support, moving Node.js downloads to the pull phase, SHA256 verification, updated npm commands for v10+, default NODE_ENV=production, and added documentation. Review comments addressed and issue #717 resolved. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #736 Release 1.31.0 | craft-parts | merged | Merged release 1.31.0 after two approvals and passing CI. Refactors npm plugin for NVM-style versions, SHA256 verification, and production NODE_ENV defaults. Updates documentation for various build systems and fixes docs. | |
| #936 nodejs plugin: install during pull to support npm run | snapcraft | merged | Merged a nodejs plugin update that installs dependencies during pull operations. This resolves npm run command failures by ensuring required packages are available. Approved by one reviewer and modified five files. |