diff --git a/.node-version b/.node-version index 285152276014..f46d5e394243 100644 --- a/.node-version +++ b/.node-version @@ -1 +1 @@ -14.20.1 +14.21.3 diff --git a/.nvmrc b/.nvmrc index 285152276014..f46d5e394243 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -14.20.1 +14.21.3 diff --git a/CHANGELOG.md b/CHANGELOG.md index fa50fdd53d18..274f5ec6fe02 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/package.json b/package.json index f7f6979371b7..3c09f3d392ca 100644 --- a/package.json +++ b/package.json @@ -466,7 +466,7 @@ "zlib": "^1.0.5" }, "engines": { - "node": "14.20.1", + "node": "^14.20.1", "yarn": "^1.22.10" } } diff --git a/src/dev/node_versions_must_match.test.ts b/src/dev/node_versions_must_match.test.ts index 7ddaa54b121c..c97557072078 100644 --- a/src/dev/node_versions_must_match.test.ts +++ b/src/dev/node_versions_must_match.test.ts @@ -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([ @@ -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); }); });