Migrate project runtime from Node 18 to Node 24
This commit is contained in:
parent
67180d90a5
commit
37c65ee4be
2
.github/workflows/dependency-review.yml
vendored
2
.github/workflows/dependency-review.yml
vendored
@ -44,7 +44,7 @@ jobs:
|
|||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: '18'
|
node-version: 24
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
|
|||||||
2
.github/workflows/master.yml
vendored
2
.github/workflows/master.yml
vendored
@ -18,7 +18,7 @@ jobs:
|
|||||||
- name: Set node version
|
- name: Set node version
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 18
|
node-version: 24
|
||||||
registry-url: "https://registry.npmjs.org"
|
registry-url: "https://registry.npmjs.org"
|
||||||
|
|
||||||
- name: Install
|
- name: Install
|
||||||
|
|||||||
2
.github/workflows/pull_requests.yml
vendored
2
.github/workflows/pull_requests.yml
vendored
@ -17,7 +17,7 @@ jobs:
|
|||||||
- name: Set node version
|
- name: Set node version
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 18
|
node-version: 24
|
||||||
registry-url: "https://registry.npmjs.org"
|
registry-url: "https://registry.npmjs.org"
|
||||||
|
|
||||||
- name: Install
|
- name: Install
|
||||||
|
|||||||
6
.github/workflows/releases.yml
vendored
6
.github/workflows/releases.yml
vendored
@ -24,7 +24,7 @@ jobs:
|
|||||||
- name: Set node version
|
- name: Set node version
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 18
|
node-version: 24
|
||||||
registry-url: "https://registry.npmjs.org"
|
registry-url: "https://registry.npmjs.org"
|
||||||
|
|
||||||
- name: Install
|
- name: Install
|
||||||
@ -104,7 +104,7 @@ jobs:
|
|||||||
- name: Set node version
|
- name: Set node version
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 18
|
node-version: 24
|
||||||
registry-url: "https://registry.npmjs.org"
|
registry-url: "https://registry.npmjs.org"
|
||||||
|
|
||||||
- name: Install
|
- name: Install
|
||||||
@ -116,7 +116,7 @@ jobs:
|
|||||||
- name: Reset node version ready for publish
|
- name: Reset node version ready for publish
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 24.5
|
node-version: 24
|
||||||
registry-url: "https://registry.npmjs.org"
|
registry-url: "https://registry.npmjs.org"
|
||||||
|
|
||||||
- name: Publish to NPM
|
- name: Publish to NPM
|
||||||
|
|||||||
2
.github/workflows/security-auto-fix.yml
vendored
2
.github/workflows/security-auto-fix.yml
vendored
@ -44,7 +44,7 @@ jobs:
|
|||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: '18'
|
node-version: 24
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
|
|
||||||
- name: Cache node modules
|
- name: Cache node modules
|
||||||
|
|||||||
11
package.json
11
package.json
@ -193,16 +193,16 @@
|
|||||||
"start": "npx grunt dev",
|
"start": "npx grunt dev",
|
||||||
"build": "npx grunt prod",
|
"build": "npx grunt prod",
|
||||||
"node": "npx grunt node",
|
"node": "npx grunt node",
|
||||||
"repl": "node --experimental-modules --experimental-json-modules --experimental-specifier-resolution=node --no-experimental-fetch --no-warnings src/node/repl.mjs",
|
"repl": "node --no-experimental-fetch --no-warnings src/node/repl.mjs",
|
||||||
"test": "npx grunt configTests && node --experimental-modules --experimental-json-modules --no-warnings --no-deprecation --openssl-legacy-provider --no-experimental-fetch tests/node/index.mjs && node --experimental-modules --experimental-json-modules --no-warnings --no-deprecation --openssl-legacy-provider --no-experimental-fetch --trace-uncaught tests/operations/index.mjs",
|
"test": "npx grunt configTests && node --no-warnings --no-deprecation --openssl-legacy-provider --no-experimental-fetch tests/node/index.mjs && node --no-warnings --no-deprecation --openssl-legacy-provider --no-experimental-fetch --trace-uncaught tests/operations/index.mjs",
|
||||||
"testnodeconsumer": "npx grunt testnodeconsumer",
|
"testnodeconsumer": "npx grunt testnodeconsumer",
|
||||||
"testui": "npx grunt testui",
|
"testui": "npx grunt testui",
|
||||||
"testuidev": "npx nightwatch --env=dev",
|
"testuidev": "npx nightwatch --env=dev",
|
||||||
"lint": "npx grunt lint",
|
"lint": "npx grunt lint",
|
||||||
"lint:grammar": "cspell ./src",
|
"lint:grammar": "cspell ./src",
|
||||||
"postinstall": "npx grunt exec:fixCryptoApiImports && npx grunt exec:fixSnackbarMarkup && npx grunt exec:fixJimpModule",
|
"postinstall": "npx grunt exec:fixCryptoApiImports && npx grunt exec:fixSnackbarMarkup && npx grunt exec:fixJimpModule",
|
||||||
"newop": "node --experimental-modules --experimental-json-modules src/core/config/scripts/newOperation.mjs",
|
"newop": "node src/core/config/scripts/newOperation.mjs",
|
||||||
"minor": "node --experimental-modules --experimental-json-modules src/core/config/scripts/newMinorVersion.mjs",
|
"minor": "node src/core/config/scripts/newMinorVersion.mjs",
|
||||||
"getheapsize": "node -e 'console.log(`node heap limit = ${require(\"v8\").getHeapStatistics().heap_size_limit / (1024 * 1024)} Mb`)'",
|
"getheapsize": "node -e 'console.log(`node heap limit = ${require(\"v8\").getHeapStatistics().heap_size_limit / (1024 * 1024)} Mb`)'",
|
||||||
"setheapsize": "export NODE_OPTIONS=--max_old_space_size=2048",
|
"setheapsize": "export NODE_OPTIONS=--max_old_space_size=2048",
|
||||||
"security:audit": "npm audit",
|
"security:audit": "npm audit",
|
||||||
@ -211,5 +211,8 @@
|
|||||||
"security:triage": "node scripts/vulnerability-triage.js",
|
"security:triage": "node scripts/vulnerability-triage.js",
|
||||||
"security:triage:json": "node scripts/vulnerability-triage.js --json",
|
"security:triage:json": "node scripts/vulnerability-triage.js --json",
|
||||||
"security:check": "npm run security:triage && npm run lint"
|
"security:check": "npm run security:triage && npm run lint"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=24"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import Chef from "./Chef.mjs";
|
import Chef from "./Chef.mjs";
|
||||||
import OperationConfig from "./config/OperationConfig.json" assert {type: "json"};
|
import OperationConfig from "./config/OperationConfig.json" with { type: "json" };
|
||||||
import OpModules from "./config/modules/OpModules.mjs";
|
import OpModules from "./config/modules/OpModules.mjs";
|
||||||
import loglevelMessagePrefix from "loglevel-message-prefix";
|
import loglevelMessagePrefix from "loglevel-message-prefix";
|
||||||
|
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
* @license Apache-2.0
|
* @license Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import OperationConfig from "./config/OperationConfig.json" assert {type: "json"};
|
import OperationConfig from "./config/OperationConfig.json" with { type: "json" };
|
||||||
import OperationError from "./errors/OperationError.mjs";
|
import OperationError from "./errors/OperationError.mjs";
|
||||||
import Operation from "./Operation.mjs";
|
import Operation from "./Operation.mjs";
|
||||||
import DishError from "./errors/DishError.mjs";
|
import DishError from "./errors/DishError.mjs";
|
||||||
|
|||||||
@ -20,7 +20,7 @@ const dir = path.join(process.cwd() + "/src/core/config/");
|
|||||||
if (!fs.existsSync(dir)) {
|
if (!fs.existsSync(dir)) {
|
||||||
console.log("\nCWD: " + process.cwd());
|
console.log("\nCWD: " + process.cwd());
|
||||||
console.log("Error: generateConfig.mjs should be run from the project root");
|
console.log("Error: generateConfig.mjs should be run from the project root");
|
||||||
console.log("Example> node --experimental-modules src/core/config/scripts/generateConfig.mjs");
|
console.log("Example> node src/core/config/scripts/generateConfig.mjs");
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -17,7 +17,7 @@ const dir = path.join(process.cwd() + "/src/core/config/");
|
|||||||
if (!fs.existsSync(dir)) {
|
if (!fs.existsSync(dir)) {
|
||||||
console.log("\nCWD: " + process.cwd());
|
console.log("\nCWD: " + process.cwd());
|
||||||
console.log("Error: generateOpsIndex.mjs should be run from the project root");
|
console.log("Error: generateOpsIndex.mjs should be run from the project root");
|
||||||
console.log("Example> node --experimental-modules src/core/config/scripts/generateOpsIndex.mjs");
|
console.log("Example> node src/core/config/scripts/generateOpsIndex.mjs");
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -18,7 +18,7 @@ const dir = path.join(process.cwd() + "/src/core/config/");
|
|||||||
if (!fs.existsSync(dir)) {
|
if (!fs.existsSync(dir)) {
|
||||||
console.log("\nCWD: " + process.cwd());
|
console.log("\nCWD: " + process.cwd());
|
||||||
console.log("Error: newMinorVersion.mjs should be run from the project root");
|
console.log("Error: newMinorVersion.mjs should be run from the project root");
|
||||||
console.log("Example> node --experimental-modules src/core/config/scripts/newMinorVersion.mjs");
|
console.log("Example> node src/core/config/scripts/newMinorVersion.mjs");
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -20,7 +20,7 @@ const dir = path.join(process.cwd() + "/src/core/operations/");
|
|||||||
if (!fs.existsSync(dir)) {
|
if (!fs.existsSync(dir)) {
|
||||||
console.log("\nCWD: " + process.cwd());
|
console.log("\nCWD: " + process.cwd());
|
||||||
console.log("Error: newOperation.mjs should be run from the project root");
|
console.log("Error: newOperation.mjs should be run from the project root");
|
||||||
console.log("Example> node --experimental-modules src/core/config/scripts/newOperation.mjs");
|
console.log("Example> node src/core/config/scripts/newOperation.mjs");
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import OperationConfig from "../config/OperationConfig.json" assert {type: "json"};
|
import OperationConfig from "../config/OperationConfig.json" with { type: "json" };
|
||||||
import Utils, { isWorkerEnvironment } from "../Utils.mjs";
|
import Utils, { isWorkerEnvironment } from "../Utils.mjs";
|
||||||
import Recipe from "../Recipe.mjs";
|
import Recipe from "../Recipe.mjs";
|
||||||
import Dish from "../Dish.mjs";
|
import Dish from "../Dish.mjs";
|
||||||
|
|||||||
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
import NodeDish from "./NodeDish.mjs";
|
import NodeDish from "./NodeDish.mjs";
|
||||||
import NodeRecipe from "./NodeRecipe.mjs";
|
import NodeRecipe from "./NodeRecipe.mjs";
|
||||||
import OperationConfig from "../core/config/OperationConfig.json" assert {type: "json"};
|
import OperationConfig from "../core/config/OperationConfig.json" with { type: "json" };
|
||||||
import { sanitise, removeSubheadingsFromArray, sentenceToCamelCase } from "./apiUtils.mjs";
|
import { sanitise, removeSubheadingsFromArray, sentenceToCamelCase } from "./apiUtils.mjs";
|
||||||
import ExcludedOperationError from "../core/errors/ExcludedOperationError.mjs";
|
import ExcludedOperationError from "../core/errors/ExcludedOperationError.mjs";
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@ const dir = path.join(`${process.cwd()}/src/node`);
|
|||||||
if (!fs.existsSync(dir)) {
|
if (!fs.existsSync(dir)) {
|
||||||
console.log("\nCWD: " + process.cwd());
|
console.log("\nCWD: " + process.cwd());
|
||||||
console.log("Error: generateNodeIndex.mjs should be run from the project root");
|
console.log("Error: generateNodeIndex.mjs should be run from the project root");
|
||||||
console.log("Example> node --experimental-modules src/node/config/scripts/generateNodeIndex.mjs");
|
console.log("Example> node src/node/config/scripts/generateNodeIndex.mjs");
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -17,8 +17,8 @@ import * as CanvasComponents from "../core/lib/CanvasComponents.mjs";
|
|||||||
|
|
||||||
// CyberChef
|
// CyberChef
|
||||||
import App from "./App.mjs";
|
import App from "./App.mjs";
|
||||||
import Categories from "../core/config/Categories.json" assert {type: "json"};
|
import Categories from "../core/config/Categories.json" with { type: "json" };
|
||||||
import OperationConfig from "../core/config/OperationConfig.json" assert {type: "json"};
|
import OperationConfig from "../core/config/OperationConfig.json" with { type: "json" };
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import sm from "sitemap";
|
import sm from "sitemap";
|
||||||
import OperationConfig from "../../core/config/OperationConfig.json" assert {type: "json"};
|
import OperationConfig from "../../core/config/OperationConfig.json" with { type: "json" };
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import TestRegister from "../../lib/TestRegister.mjs";
|
import TestRegister from "../../lib/TestRegister.mjs";
|
||||||
import Categories from "../../../src/core/config/Categories.json" assert {type: "json"};
|
import Categories from "../../../src/core/config/Categories.json" with { type: "json" };
|
||||||
import OperationConfig from "../../../src/core/config/OperationConfig.json" assert {type: "json"};
|
import OperationConfig from "../../../src/core/config/OperationConfig.json" with { type: "json" };
|
||||||
import it from "../assertionHandler.mjs";
|
import it from "../assertionHandler.mjs";
|
||||||
import assert from "assert";
|
import assert from "assert";
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user