Skip to content
This repository has been archived by the owner on Mar 15, 2024. It is now read-only.

Commit

Permalink
chore: Remove support for Node 14
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Support for Node 14 has been removed.
Official support ended more than two months ago.
  • Loading branch information
dividedmind committed Aug 4, 2023
1 parent 9d6ff47 commit 66739e6
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

Supported platforms:
* Mainstream os: Linux distros, macOS, and Windows.
* Node.js: any up-to-date major versions that is not in end-of-life -- ie: 14, 16, 18, and 19.
* Node.js: any up-to-date major versions that is not in end-of-life -- ie: 16, 18, and 19.
* Express.js: 4.
* git is highly recommended.
* mocha >= 8.0.0 is required for recording AppMaps from test cases (earlier versions do not support required root hooks).
Expand Down
6 changes: 1 addition & 5 deletions components/status/node/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,7 @@ export const run = (root) => {

const mocha_info = externals.lsPackage(root, "mocha");
const package_json = parseJSON(mocha_info);
// It's possible we'll be run in a pre-14 Node VM, so don't use the
// optional-chaining operator here.
const deps = package_json.dependencies;
const mocha = deps && deps.mocha;
const mocha_version = mocha && mocha.version;
const mocha_version = package_json.dependencies?.mocha?.version;
if (mocha_version) {
if (!semver.satisfies(mocha_version, ">= 8")) {
errors.push({
Expand Down
4 changes: 2 additions & 2 deletions components/status/node/status.spec.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ describe("the status command", () => {
externals.getPlatform = sinon.stub().returns("darwin");
externals.lsPackage = sinon.stub().returns("{}");
externals.showResults = sinon.stub();
externals.getNodeVersion = sinon.stub().returns("14.19.0");
externals.getNodeVersion = sinon.stub().returns("16.18.1");

// Make sure we got them all, notCalled will be undefined if the function
// hasn't been replaced.
Expand All @@ -40,7 +40,7 @@ describe("the status command", () => {

describe("run", () => {
it("fails for unsupported node", () => {
const node_version = "13.0";
const node_version = "14.19.0";
externals.getNodeVersion = sinon.stub().returns(node_version);
const result = JSON.parse(run(process));
assert(externals.getNodeVersion.calledOnce);
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"main": "lib/node/recorder-api.mjs",
"license": "MIT",
"engines": {
"node": "14.x.x || 16.x.x || 17.x.x || 18.x.x || 19.x.x"
"node": "16.x.x || 17.x.x || 18.x.x || 19.x.x"
},
"licence": "MIT",
"keywords": [
Expand Down

0 comments on commit 66739e6

Please sign in to comment.