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

Relax Node.js version to ^14.20.1 and bump .nvmrc to v14.21.3 #3463

Merged
Merged
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 @@
14.20.1
14.21.3
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.20.1
14.21.3
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Bumps `re2` and `supertest` ([3018](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3018))
- Bump `vega-tooltip` version from ^0.24.2 to ^0.30.0 ([#3358](https://github.com/opensearch-project/OpenSearch-Dashboards/issues/3358))
- Allow relaxing the Node.js runtime version requirement ([3402](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3402))
- Relax the Node.js requirement to `^14.20.1` ([3463](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3463))
- Bump the version of Node.js installed by `nvm` to `14.21.3` ([3463](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3463))

### 🪛 Refactoring

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@
"zlib": "^1.0.5"
},
"engines": {
"node": "14.20.1",
"node": "^14.20.1",
"yarn": "^1.22.10"
}
}
4 changes: 3 additions & 1 deletion src/dev/node_versions_must_match.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,13 @@
*/

import fs from 'fs';
import semver from 'semver';
import { engines } from '../../package.json';
import { promisify } from 'util';
const readFile = promisify(fs.readFile);
import expect from '@osd/expect';

// ToDo: `.node-version` seems to exist for no good reason; find out if we can get rid of it and this test.
describe('All configs should use a single version of Node', () => {
it('should compare .node-version and .nvmrc', async () => {
const [nodeVersion, nvmrc] = await Promise.all([
Expand All @@ -48,6 +50,6 @@ describe('All configs should use a single version of Node', () => {
const nodeVersion = await readFile('./.node-version', {
encoding: 'utf-8',
});
expect(nodeVersion.trim()).to.be(engines.node);
expect(semver.satisfies(nodeVersion.trim(), engines.node)).to.be(true);
});
});