Skip to content

[chore]Update node to 22.21.1#11126

Draft
wanglam wants to merge 2 commits intoopensearch-project:feature/node-22-webpack-5from
wanglam:feature/update-node-22
Draft

[chore]Update node to 22.21.1#11126
wanglam wants to merge 2 commits intoopensearch-project:feature/node-22-webpack-5from
wanglam:feature/update-node-22

Conversation

@wanglam
Copy link
Collaborator

@wanglam wanglam commented Jan 5, 2026

Description

This PR upgrades Node.js from version 20.18.3 to 22.21.1 to keep OpenSearch Dashboards aligned with the latest LTS Node.js version. The upgrade includes updating version files (.node-version, .nvmrc) and adjusting the Node.js engine requirement in package.json from <21 to <23.

To ensure compatibility with Node.js 22, several changes were made: updated stream destroy() method signatures to properly invoke callbacks as required by Node.js 22, suppressed new deprecation warnings (MODULE_TYPELESS_PACKAGE_JSON and fs.Stats constructor), updated test snapshots to account for Node.js 22 output changes, and added ch to Mocha's global variables whitelist. All existing tests pass with the new Node.js version.

Issues Resolved

A part of #11080

Changelog

  • chore: [chore]Update node to 22.21.1

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

Signed-off-by: Lin Wang <wonglam@amazon.com>
@coderabbitai
Copy link

coderabbitai bot commented Jan 5, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


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

@wanglam wanglam changed the title Update node to 22.21.1 [chore]Update node to 22.21.1 Jan 5, 2026
@codecov
Copy link

codecov bot commented Jan 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.37%. Comparing base (f5266df) to head (c8fe154).

Additional details and impacted files
@@                    Coverage Diff                     @@
##           feature/node-22-webpack-5   #11126   +/-   ##
==========================================================
  Coverage                      60.36%   60.37%           
==========================================================
  Files                           4591     4591           
  Lines                         126396   126397    +1     
  Branches                       21183    21183           
==========================================================
+ Hits                           76295    76307   +12     
+ Misses                         44687    44675   -12     
- Partials                        5414     5415    +1     
Flag Coverage Δ
Linux_1 26.36% <100.00%> (+<0.01%) ⬆️
Linux_2 38.27% <0.00%> (ø)
Linux_3 39.80% <ø> (-0.01%) ⬇️
Linux_4 33.31% <ø> (ø)
Windows_1 26.38% <100.00%> (+0.01%) ⬆️
Windows_2 38.25% <0.00%> (ø)
Windows_3 39.81% <ø> (ø)
Windows_4 33.31% <ø> (ø)

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

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

🚀 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.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant