Skip to content

Commit 80c7abb

Browse files
opensearch-trigger-bot[bot]github-actions[bot]joshuarrrr
authored
Relax Node.js version to ^14.20.1 and bump .nvmrc to v14.21.3 (#3463) (#3479) (#3486)
* `engines.node` is relaxed from `14.20.1` to `^14.20.1`: yarn and OSD will allow versions 14.20.1 or greater, but less than 15, to be used but do not impose upgrading to avoid being a breaking change. Users will be able to install any version of Node.js that satisfies `^14.20.1`, moving ahead without waiting for a change in OSD when new versions are released. * `.nvmrc` is bumped to the latest security patch: `14.21.3` (cherry picked from commit 4d1a531) Signed-off-by: Miki <miki@amazon.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Josh Romero <rmerqg@amazon.com>
1 parent a144974 commit 80c7abb

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

.node-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
14.20.1
1+
14.21.3

.nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
14.20.1
1+
14.21.3

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@
468468
"zlib": "^1.0.5"
469469
},
470470
"engines": {
471-
"node": "14.20.1",
471+
"node": "^14.20.1",
472472
"yarn": "^1.21.1"
473473
}
474474
}

src/dev/node_versions_must_match.test.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,13 @@
2929
*/
3030

3131
import fs from 'fs';
32+
import semver from 'semver';
3233
import { engines } from '../../package.json';
3334
import { promisify } from 'util';
3435
const readFile = promisify(fs.readFile);
3536
import expect from '@osd/expect';
3637

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

0 commit comments

Comments
 (0)