Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to NodeJS LTS 20 "Iron" #9171

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.19.0
20.18.1
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.19.0
20.18.1
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG NODE_VERSION=18.19.0
ARG NODE_VERSION=20.18.1
FROM node:${NODE_VERSION} AS base

ENV HOME '.'
Expand Down
6 changes: 3 additions & 3 deletions TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ In general, we recommend four tiers of tests:


# Requirements
* Install the latest NodeJS, [NPM](https://www.npmjs.com/get-npm) and [Yarn](https://classic.yarnpkg.com/en/docs/install/#mac-stable)
* `nvm install v18.19.0`
* Install the specified NodeJS, [NPM](https://www.npmjs.com/get-npm) and [Yarn](https://classic.yarnpkg.com/en/docs/install/#mac-stable)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why would we require a "specific" version of Node.js for testing?

Copy link
Contributor Author

@hashworks hashworks Jan 10, 2025

Choose a reason for hiding this comment

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

If you install the latest NodeJS version (v23) it won't build.

Copy link
Member

Choose a reason for hiding this comment

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

nit: we may want to advise users to simply run nvm install so that they always get the version defined in our .nvmrc in the case these docs get outdated.

Not needed for this change though.

* `nvm install v20.18.1`
* `npm install -g yarn`

# Running tests
Expand Down Expand Up @@ -122,4 +122,4 @@ sudo apt-get install -y --allow-downgrades /tmp/chrome.deb
Although Jest is the standard for this project, there are a few Mocha tests that still exist. You can run these tests by running:
`yarn test:mocha`

However, these tests will eventually be migrated; please avoid writing new Mocha tests. For further questions or to check the status, please see this [issue](https://github.com/opensearch-project/OpenSearch-Dashboards/issues/215).
However, these tests will eventually be migrated; please avoid writing new Mocha tests. For further questions or to check the status, please see this [issue](https://github.com/opensearch-project/OpenSearch-Dashboards/issues/215).
3 changes: 3 additions & 0 deletions changelogs/fragments/9171.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
security:
- Bump NodeJS to 20.18.1 "Iron" due to pending NodeJS v18 "Hydrogen" EOL (April '25) ([#9171](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/9171))
- Bump elastic-apm-node to 4.10.0 to support NodeJS v20 ([#9171](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/9171))
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
"deep-freeze-strict": "^1.1.1",
"del": "^6.1.1",
"dns-sync": "npm:@amoo-miki/dns-sync@^0.2.1",
"elastic-apm-node": "^3.43.0",
"elastic-apm-node": "^4.10.0",
"elasticsearch": "^16.7.0",
"execa": "^4.0.2",
"expiry-js": "0.1.7",
Expand Down Expand Up @@ -503,7 +503,7 @@
"zlib": "^1.0.5"
},
"engines": {
"node": ">=14.20.1 <19",
"node": ">=14.20.1 <21",
"yarn": "^1.22.10"
}
}
399 changes: 252 additions & 147 deletions yarn.lock

Large diffs are not rendered by default.

Loading