[MM-68052] Upgrade plugin to Node.js 24.11#1141
Conversation
- Updated Node.js version in .nvmrc and package.json files to 24.x. - Upgraded @types/node dependency to version 22.x in package-lock.json and package.json for e2e, standalone, and webapp. - Updated undici-types dependency to version 6.21.0 in relevant package-lock.json files. - Adjusted npm engine requirements to version 11 in standalone and webapp package.json files. - Minor updates to test descriptions in utils.test.ts for consistency.
📝 WalkthroughWalkthroughUpdated Node version configuration to 24.14 across the repository (.nvmrc and package engine fields). e2e/package.json also received an engines field and multiple devDependency upgrades (TypeScript/ESLint tooling and related types). Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
e2e/package.json (1)
13-13: Align@types/nodewith the Node 24 runtime.All three package.json files currently declare
@types/node@^22.0.0. For consistency with Node 24.11, update to@types/node@^24.0.0to avoid type mismatches with newer Node APIs.♻️ Proposed update
- "@types/node": "^22.0.0", + "@types/node": "^24.0.0",🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@e2e/package.json` at line 13, Update the `@types/node` dependency in the e2e package.json from "^22.0.0" to "^24.0.0" to match the Node 24 runtime; locate the dependency entry "@types/node" and change its version string accordingly so the package aligns with Node 24.11 types.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@standalone/package.json`:
- Around line 4-5: Update the Node engine and related type dependency
constraints to match the tested baseline: change the "node" engine from "^24" to
">=24.11.0 <25" and restrict "npm" to the tested range if needed; also align
`@types/node` (dependency key "@types/node") to a version compatible with Node 24
(e.g., a 24.x-aligned range instead of ^22.0.0) so the package.json engine and
types match the .nvmrc-tested Node 24.11 baseline and prevent accidental use of
older/next major runtimes.
---
Nitpick comments:
In `@e2e/package.json`:
- Line 13: Update the `@types/node` dependency in the e2e package.json from
"^22.0.0" to "^24.0.0" to match the Node 24 runtime; locate the dependency entry
"@types/node" and change its version string accordingly so the package aligns
with Node 24.11 types.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: ee608de9-731a-4a71-807d-229688ed6844
⛔ Files ignored due to path filters (3)
e2e/package-lock.jsonis excluded by!**/package-lock.jsonstandalone/package-lock.jsonis excluded by!**/package-lock.jsonwebapp/package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (5)
.nvmrce2e/package.jsonstandalone/package.jsonwebapp/package.jsonwebapp/src/utils.test.ts
|
/update-branch |
|
Error trying to update the PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1141 +/- ##
==========================================
- Coverage 24.13% 24.10% -0.03%
==========================================
Files 237 237
Lines 13537 13540 +3
Branches 1611 1611
==========================================
- Hits 3267 3264 -3
- Misses 9961 9966 +5
- Partials 309 310 +1 🚀 New features to boost your workflow:
|
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (4)
webapp/package.json (1)
64-64:@types/nodeversion inconsistent withe2e/package.jsonand Node 24 runtime.Same issue as in
standalone/package.json:@types/node: ^22.0.0does not align with the Node 24 runtime specified in engines. Thee2e/package.jsonuses@types/node: ^25.5.0. Consider aligning all packages to the same@types/nodeversion that properly supports Node 24.♻️ Suggested alignment
- "@types/node": "^22.0.0", + "@types/node": "^25.5.0",🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@webapp/package.json` at line 64, Update the `@types/node` dependency in webapp's package.json to match the version used in e2e (e.g., change the "@types/node" entry from "^22.0.0" to "^25.5.0") so it aligns with the Node 24 runtime specified in engines; locate the "@types/node" entry in package.json and update the version string, then run install to regenerate lockfile.e2e/package.json (2)
1-7: Consider addingenginesconstraint for consistency.Unlike
standalone/package.jsonandwebapp/package.json, this file does not define anenginesfield. Adding consistent engine constraints would prevent running e2e tests with incompatible Node/npm versions.♻️ Suggested addition
{ "private": true, + "engines": { + "node": "^24", + "npm": "^11" + }, "scripts": {🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@e2e/package.json` around lines 1 - 7, Add a top-level "engines" field to this e2e package.json (the same object containing "private" and "scripts") to match the constraints used in standalone/package.json and webapp/package.json; specify the Node and npm version ranges used elsewhere (e.g., "node" and "npm" semver strings) so e2e tests enforce the same runtime, and ensure package managers will warn or refuse incompatible versions.
8-25: Dependencies are compatible and appropriate for Node.js 24.The devDependency upgrades are sound:
@babel/core7.29.0 and@babel/eslint-parser7.28.6 are compatible (7.28.6 requires@babel/core^7.11.0)@babel/eslint-parser7.28.6 supports ESLint 8.33.0 (requires eslint ^7.5.0 || ^8.0.0 || ^9.0.0)typescript^5.6.3 aligns with modern toolingNote that
@types/node^25.5.0 here targets Node.js 20–24, whereasstandalone/package.jsonandwebapp/package.jsonuse ^22.0.0 (Node.js 20–22). Consider updating those packages to ^25.5.0 for consistency with Node.js 24 support.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@e2e/package.json` around lines 8 - 25, Update the `@types/node` version used across the repo to match the e2e devDependency (change the `@types/node` entry in other package.json files to ^25.5.0) so all packages target Node.js 24 consistently; locate the devDependencies blocks (look for the `@types/node` key in standalone/package.json and webapp/package.json) and bump their version string to ^25.5.0, then run a clean install to verify no type/tooling breakages.standalone/package.json (1)
54-54: Align@types/nodeversion with Node 24 runtime.
@types/node: ^22.0.0targets Node 22 and does not include type definitions for Node 24–specific APIs. Update to@types/node: ^24.0.0or^25.5.0to match the Node 24 runtime (engines: node ^24). This also resolves the inconsistency withe2e/package.json, which uses@types/node: ^25.5.0.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@standalone/package.json` at line 54, Update the `@types/node` dependency from "@types/node": "^22.0.0" to a version that matches the Node 24 runtime (for example "^24.0.0" or "^25.5.0"); modify the package.json dependency entry for "@types/node" accordingly so the type definitions include Node 24 APIs and align with the engines: node ^24 and the e2e/package.json choice ("@types/node": "^25.5.0").
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.nvmrc:
- Line 1: Update the Node version string in .nvmrc from "24.11" to "24.14.1" to
pick up the latest Node 24 LTS; search for the literal "24.11" in the repo (the
.nvmrc entry) and replace it with "24.14.1", and also ensure any CI/node-setup
steps or README mentions that reference the old "24.11" are updated to remain
consistent.
---
Nitpick comments:
In `@e2e/package.json`:
- Around line 1-7: Add a top-level "engines" field to this e2e package.json (the
same object containing "private" and "scripts") to match the constraints used in
standalone/package.json and webapp/package.json; specify the Node and npm
version ranges used elsewhere (e.g., "node" and "npm" semver strings) so e2e
tests enforce the same runtime, and ensure package managers will warn or refuse
incompatible versions.
- Around line 8-25: Update the `@types/node` version used across the repo to match
the e2e devDependency (change the `@types/node` entry in other package.json files
to ^25.5.0) so all packages target Node.js 24 consistently; locate the
devDependencies blocks (look for the `@types/node` key in standalone/package.json
and webapp/package.json) and bump their version string to ^25.5.0, then run a
clean install to verify no type/tooling breakages.
In `@standalone/package.json`:
- Line 54: Update the `@types/node` dependency from "@types/node": "^22.0.0" to a
version that matches the Node 24 runtime (for example "^24.0.0" or "^25.5.0");
modify the package.json dependency entry for "@types/node" accordingly so the
type definitions include Node 24 APIs and align with the engines: node ^24 and
the e2e/package.json choice ("@types/node": "^25.5.0").
In `@webapp/package.json`:
- Line 64: Update the `@types/node` dependency in webapp's package.json to match
the version used in e2e (e.g., change the "@types/node" entry from "^22.0.0" to
"^25.5.0") so it aligns with the Node 24 runtime specified in engines; locate
the "@types/node" entry in package.json and update the version string, then run
install to regenerate lockfile.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 3c6f3f7f-12dc-4dbb-8eb5-7434fa0692b0
⛔ Files ignored due to path filters (3)
e2e/package-lock.jsonis excluded by!**/package-lock.jsonstandalone/package-lock.jsonis excluded by!**/package-lock.jsonwebapp/package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (4)
.nvmrce2e/package.jsonstandalone/package.jsonwebapp/package.json
e2e/package.json
Outdated
| "@playwright/test": "^1.51.1", | ||
| "@types/node": "^20.10.4", | ||
| "@typescript-eslint/eslint-plugin": "5.49.0", | ||
| "@types/node": "^25.5.0", |
There was a problem hiding this comment.
nit: this (and the ones below for standalone and webapp) should probably match your 24 version, if only to to reduce dev issues
(and I agree with coderabbit below -- we should try to target lts versions, or prefferrably match the webapp node version)
There was a problem hiding this comment.
Agreed. done that.
…e-lock.json files across standalone and webapp. Added 'clean' script to package.json in both standalone and webapp for easier cleanup of node_modules and dist directories.
… and webapp package.json and package-lock.json files. Upgrade undici-types to version 7.16.0 in relevant package-lock.json files for improved compatibility.
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
e2e/package.json (1)
1-7: Consider addingenginesfield for consistency.Unlike
standalone/package.jsonandwebapp/package.json, this file lacks anenginesfield to enforce Node/npm version requirements. Adding it would ensure consistent tooling enforcement across all packages.♻️ Proposed addition
{ "private": true, + "engines": { + "node": "^24", + "npm": "^11" + }, "scripts": {🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@e2e/package.json` around lines 1 - 7, Add an "engines" field to this package.json to match the Node/npm version constraints used in standalone/package.json and webapp/package.json; modify the top-level package.json (alongside the existing "scripts" object) to include an "engines" object specifying the same "node" and "npm" version ranges used in the other packages so tooling and CI enforce consistent versions across the repo.webapp/package.json (1)
4-5: Consider tightening the engine constraint.The
"node": "^24"constraint allows any Node 24.x version, but.nvmrcpins to 24.14. Consider using">=24.14.0 <25"to ensure the minimum permitted version matches your tested baseline and reduce environment drift.♻️ Proposed constraint
"engines": { - "node": "^24", + "node": ">=24.14.0 <25", "npm": "^11" },🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@webapp/package.json` around lines 4 - 5, Update the package.json engines entry so the Node engine constraint matches the tested baseline (.nvmrc) by replacing the loose "^24" range with a stricter range like ">=24.14.0 <25" (leave or adjust the "npm" field as desired); locate the "engines" object in package.json and change the "node" value to the new range to enforce the minimum Node version used in CI/local development.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@e2e/package.json`:
- Around line 1-7: Add an "engines" field to this package.json to match the
Node/npm version constraints used in standalone/package.json and
webapp/package.json; modify the top-level package.json (alongside the existing
"scripts" object) to include an "engines" object specifying the same "node" and
"npm" version ranges used in the other packages so tooling and CI enforce
consistent versions across the repo.
In `@webapp/package.json`:
- Around line 4-5: Update the package.json engines entry so the Node engine
constraint matches the tested baseline (.nvmrc) by replacing the loose "^24"
range with a stricter range like ">=24.14.0 <25" (leave or adjust the "npm"
field as desired); locate the "engines" object in package.json and change the
"node" value to the new range to enforce the minimum Node version used in
CI/local development.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 13c3f6f4-15b6-4ed5-b9ed-32aa28f91add
⛔ Files ignored due to path filters (3)
e2e/package-lock.jsonis excluded by!**/package-lock.jsonstandalone/package-lock.jsonis excluded by!**/package-lock.jsonwebapp/package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (4)
.nvmrce2e/package.jsonstandalone/package.jsonwebapp/package.json
…ge.json and package-lock.json files across e2e, standalone, and webapp projects for improved compatibility.
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
…package-lock.json files across e2e, standalone, and webapp projects for improved compatibility.
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
standalone/package.json (1)
18-18: Consider using a cross-platform clean approach.The
rm -rfcommand is Unix-specific and will fail on Windows without a Unix shell emulator. If Windows development is supported, consider usingrimrafornpx rimraf.♻️ Cross-platform alternative
- "clean": "rm -rf node_modules dist", + "clean": "npx rimraf node_modules dist",🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@standalone/package.json` at line 18, The "clean" npm script currently uses a Unix-specific command ("rm -rf") which fails on Windows; update the "clean" script in package.json (the "clean" entry) to use a cross-platform tool such as rimraf (e.g., install rimraf as a devDependency and call "rimraf node_modules dist" or use "npx rimraf node_modules dist") so the clean step works reliably on Windows, macOS, and Linux.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@standalone/package.json`:
- Line 18: The "clean" npm script currently uses a Unix-specific command ("rm
-rf") which fails on Windows; update the "clean" script in package.json (the
"clean" entry) to use a cross-platform tool such as rimraf (e.g., install rimraf
as a devDependency and call "rimraf node_modules dist" or use "npx rimraf
node_modules dist") so the clean step works reliably on Windows, macOS, and
Linux.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 78be420d-3651-40c5-b70d-3b3e8a18d623
⛔ Files ignored due to path filters (3)
e2e/package-lock.jsonis excluded by!**/package-lock.jsonstandalone/package-lock.jsonis excluded by!**/package-lock.jsonwebapp/package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (4)
.nvmrce2e/package.jsonstandalone/package.jsonwebapp/package.json
Summary
^24.14and npm to^11in.nvmrc,standalone/package.json,standalone/package-lock.json,webapp/package.json, ande2e/package.json@types/nodeto24.12.0in all relevantpackage.jsonandpackage-lock.jsonfiles to match the new Node.js version.Ticket Link
Fixes https://mattermost.atlassian.net/browse/MM-68052