Skip to content

[MM-68052] Upgrade plugin to Node.js 24.11#1141

Open
M-ZubairAhmed wants to merge 10 commits intomainfrom
MM-68052
Open

[MM-68052] Upgrade plugin to Node.js 24.11#1141
M-ZubairAhmed wants to merge 10 commits intomainfrom
MM-68052

Conversation

@M-ZubairAhmed
Copy link
Copy Markdown
Member

@M-ZubairAhmed M-ZubairAhmed commented Mar 25, 2026

Summary

  • Updated the required Node.js version to ^24.14 and npm to ^11 in .nvmrc, standalone/package.json, standalone/package-lock.json, webapp/package.json, and e2e/package.json
  • Upgraded @types/node to 24.12.0 in all relevant package.json and package-lock.json files to match the new Node.js version.

Ticket Link

Fixes https://mattermost.atlassian.net/browse/MM-68052

- 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.
@M-ZubairAhmed M-ZubairAhmed marked this pull request as ready for review March 25, 2026 20:23
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 25, 2026

📝 Walkthrough

Walkthrough

Updated 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

Cohort / File(s) Summary
Node version file
​.nvmrc
Bumped Node version from 20.11 to 24.14.
Package engines
standalone/package.json, webapp/package.json
Updated engines.node^24.14 and engines.npm^11; updated devDependencies.@types/node to 24.12.0.
e2e devDependencies & engines
e2e/package.json
Added engines (node: ^24.14, npm: ^11); upgraded/added devDependencies including @babel/*, @mattermost/types11.4.0, @types/node^24.12.0, @typescript-eslint/*6.21.0, typescript^5.6.3, and ESLint plugin updates.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title mentions Node.js 24.11 but the actual changes upgrade to Node.js 24.14, creating a discrepancy between the stated version and implemented version. Update the title to accurately reflect the actual Node.js version being upgraded to: '[MM-68052] Upgrade plugin to Node.js 24.14'.
✅ Passed checks (2 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The pull request description clearly relates to the changeset, describing the Node.js version upgrades across multiple configuration files and the corresponding dependency updates.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch MM-68052

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
e2e/package.json (1)

13-13: Align @types/node with 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.0 to 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

📥 Commits

Reviewing files that changed from the base of the PR and between 78f8827 and e29aab6.

⛔ Files ignored due to path filters (3)
  • e2e/package-lock.json is excluded by !**/package-lock.json
  • standalone/package-lock.json is excluded by !**/package-lock.json
  • webapp/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (5)
  • .nvmrc
  • e2e/package.json
  • standalone/package.json
  • webapp/package.json
  • webapp/src/utils.test.ts

@M-ZubairAhmed
Copy link
Copy Markdown
Member Author

/update-branch

@mattermost-build
Copy link
Copy Markdown
Contributor

Error trying to update the PR.
Please do it manually.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 24.10%. Comparing base (78f8827) to head (9712d21).
⚠️ Report is 1 commits behind head on main.

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     

see 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@M-ZubairAhmed
Copy link
Copy Markdown
Member Author

@coderabbitai full review

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 26, 2026

✅ Actions performed

Full review triggered.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (4)
webapp/package.json (1)

64-64: @types/node version inconsistent with e2e/package.json and Node 24 runtime.

Same issue as in standalone/package.json: @types/node: ^22.0.0 does not align with the Node 24 runtime specified in engines. The e2e/package.json uses @types/node: ^25.5.0. Consider aligning all packages to the same @types/node version 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 adding engines constraint for consistency.

Unlike standalone/package.json and webapp/package.json, this file does not define an engines field. 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/core 7.29.0 and @babel/eslint-parser 7.28.6 are compatible (7.28.6 requires @babel/core ^7.11.0)
  • @babel/eslint-parser 7.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 tooling

Note that @types/node ^25.5.0 here targets Node.js 20–24, whereas standalone/package.json and webapp/package.json use ^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/node version with Node 24 runtime.

@types/node: ^22.0.0 targets Node 22 and does not include type definitions for Node 24–specific APIs. Update to @types/node: ^24.0.0 or ^25.5.0 to match the Node 24 runtime (engines: node ^24). This also resolves the inconsistency with e2e/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

📥 Commits

Reviewing files that changed from the base of the PR and between 78f8827 and bf65020.

⛔ Files ignored due to path filters (3)
  • e2e/package-lock.json is excluded by !**/package-lock.json
  • standalone/package-lock.json is excluded by !**/package-lock.json
  • webapp/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (4)
  • .nvmrc
  • e2e/package.json
  • standalone/package.json
  • webapp/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",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@M-ZubairAhmed M-ZubairAhmed added 2: Dev Review Requires review by a core committer 2: QA Review Requires review by a QA tester labels Mar 26, 2026
@M-ZubairAhmed
Copy link
Copy Markdown
Member Author

@coderabbitai full review

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 26, 2026

✅ Actions performed

Full review triggered.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (2)
e2e/package.json (1)

1-7: Consider adding engines field for consistency.

Unlike standalone/package.json and webapp/package.json, this file lacks an engines field 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 .nvmrc pins 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

📥 Commits

Reviewing files that changed from the base of the PR and between 78f8827 and f516b75.

⛔ Files ignored due to path filters (3)
  • e2e/package-lock.json is excluded by !**/package-lock.json
  • standalone/package-lock.json is excluded by !**/package-lock.json
  • webapp/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (4)
  • .nvmrc
  • e2e/package.json
  • standalone/package.json
  • webapp/package.json

…ge.json and package-lock.json files across e2e, standalone, and webapp projects for improved compatibility.
@M-ZubairAhmed
Copy link
Copy Markdown
Member Author

@coderabbitai full review

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 26, 2026

✅ Actions performed

Full review triggered.

…package-lock.json files across e2e, standalone, and webapp projects for improved compatibility.
@M-ZubairAhmed
Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 26, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
standalone/package.json (1)

18-18: Consider using a cross-platform clean approach.

The rm -rf command is Unix-specific and will fail on Windows without a Unix shell emulator. If Windows development is supported, consider using rimraf or npx 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

📥 Commits

Reviewing files that changed from the base of the PR and between 78f8827 and 9bff656.

⛔ Files ignored due to path filters (3)
  • e2e/package-lock.json is excluded by !**/package-lock.json
  • standalone/package-lock.json is excluded by !**/package-lock.json
  • webapp/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (4)
  • .nvmrc
  • e2e/package.json
  • standalone/package.json
  • webapp/package.json

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

Labels

2: Dev Review Requires review by a core committer 2: QA Review Requires review by a QA tester

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants