Skip to content

Commit

Permalink
Relax Node.js version to ^14.20.1 and bump .nvmrc to v14.21.3 (#…
Browse files Browse the repository at this point in the history
…3463) (#3479)

* `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`

Signed-off-by: Miki <miki@amazon.com>
(cherry picked from commit 4d1a531)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] committed Feb 22, 2023
1 parent 82c45c1 commit d67e1fd
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
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: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@
"zlib": "^1.0.5"
},
"engines": {
"node": "14.20.1",
"node": "^14.20.1",
"yarn": "^1.21.1"
}
}
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);
});
});

0 comments on commit d67e1fd

Please sign in to comment.