Section 2.
This commit is contained in:
parent
d09446fad6
commit
16ae9e7772
@ -205,10 +205,9 @@
|
||||
"lint:grammar": "cspell ./src",
|
||||
"postinstall": "npx grunt exec:fixCryptoApiImports && npx grunt exec:fixSnackbarMarkup",
|
||||
"newop": "node src/core/config/scripts/newOperation.mjs",
|
||||
"minor": "node src/core/config/scripts/newMinorVersion.mjs && npm version minor --git-tag-version=false && echo \"Updated to version v$(npm pkg get version | xargs), please create a pull request and once merged use 'npm run tag'\"",
|
||||
"tag": "git tag -s \"v$(npm pkg get version | xargs)\" -m \"$(npm pkg get version | xargs)\" && echo \"Created v$(npm pkg get version | xargs), now check and push the tag\"",
|
||||
"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"
|
||||
"minor": "node src/core/config/scripts/bumpMinor.mjs",
|
||||
"tag": "node src/core/config/scripts/tagRelease.mjs",
|
||||
"getheapsize": "node --no-warnings src/core/config/scripts/getHeapSize.mjs"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=24 <25"
|
||||
|
||||
@ -16,9 +16,9 @@ Stages are executed by Leon, not the agent. Tick each box once the stage is done
|
||||
- [x] 1g. Webpack output path uses `path.join` _(2026-05-19)_
|
||||
|
||||
### Section 2 — [package.json](package.json)
|
||||
- [ ] 2a. `setheapsize` deleted
|
||||
- [ ] 2b. `getheapsize` switched to `getHeapSize.mjs`
|
||||
- [ ] 2c. `minor` / `tag` switched to `.mjs` orchestrators
|
||||
- [x] 2a. `setheapsize` deleted _(2026-05-19)_
|
||||
- [x] 2b. `getheapsize` switched to `getHeapSize.mjs` _(2026-05-19)_
|
||||
- [x] 2c. `minor` / `tag` switched to `.mjs` orchestrators _(2026-05-19)_
|
||||
|
||||
### Verification
|
||||
- [ ] macOS: 7-step verification pass (see "Verification" section below)
|
||||
|
||||
27
src/core/config/scripts/bumpMinor.mjs
Normal file
27
src/core/config/scripts/bumpMinor.mjs
Normal file
@ -0,0 +1,27 @@
|
||||
/**
|
||||
* Orchestrates a minor version bump: regenerates the CHANGELOG via
|
||||
* newMinorVersion.mjs, runs `npm version minor` (without a git tag),
|
||||
* then prints a follow-up message that includes the new version.
|
||||
*
|
||||
* Replaces the previous shell-substitution npm script so it works on
|
||||
* Windows cmd.exe as well as POSIX shells.
|
||||
*
|
||||
* @author n1474335 [n1474335@gmail.com]
|
||||
* @copyright Crown Copyright 2026
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
|
||||
/* eslint no-console: ["off"] */
|
||||
|
||||
import { execSync } from "child_process";
|
||||
import { readFileSync } from "fs";
|
||||
import { dirname, join } from "path";
|
||||
import { fileURLToPath } from "url";
|
||||
|
||||
const pkgPath = join(dirname(fileURLToPath(import.meta.url)), "..", "..", "..", "..", "package.json");
|
||||
|
||||
execSync("node src/core/config/scripts/newMinorVersion.mjs", { stdio: "inherit" });
|
||||
execSync("npm version minor --git-tag-version=false", { stdio: "inherit" });
|
||||
|
||||
const version = JSON.parse(readFileSync(pkgPath, "utf8")).version;
|
||||
console.log(`Updated to version v${version}, please create a pull request and once merged use 'npm run tag'`);
|
||||
13
src/core/config/scripts/getHeapSize.mjs
Normal file
13
src/core/config/scripts/getHeapSize.mjs
Normal file
@ -0,0 +1,13 @@
|
||||
/**
|
||||
* Prints the Node V8 heap size limit in MB.
|
||||
*
|
||||
* @author n1474335 [n1474335@gmail.com]
|
||||
* @copyright Crown Copyright 2026
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
|
||||
/* eslint no-console: ["off"] */
|
||||
|
||||
import v8 from "v8";
|
||||
|
||||
console.log(`node heap limit = ${v8.getHeapStatistics().heap_size_limit / (1024 * 1024)} Mb`);
|
||||
24
src/core/config/scripts/tagRelease.mjs
Normal file
24
src/core/config/scripts/tagRelease.mjs
Normal file
@ -0,0 +1,24 @@
|
||||
/**
|
||||
* Creates a signed git tag matching the version in package.json,
|
||||
* then prints a follow-up message.
|
||||
*
|
||||
* Replaces the previous shell-substitution npm script so it works on
|
||||
* Windows cmd.exe as well as POSIX shells.
|
||||
*
|
||||
* @author n1474335 [n1474335@gmail.com]
|
||||
* @copyright Crown Copyright 2026
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
|
||||
/* eslint no-console: ["off"] */
|
||||
|
||||
import { execSync } from "child_process";
|
||||
import { readFileSync } from "fs";
|
||||
import { dirname, join } from "path";
|
||||
import { fileURLToPath } from "url";
|
||||
|
||||
const pkgPath = join(dirname(fileURLToPath(import.meta.url)), "..", "..", "..", "..", "package.json");
|
||||
const version = JSON.parse(readFileSync(pkgPath, "utf8")).version;
|
||||
|
||||
execSync(`git tag -s "v${version}" -m "${version}"`, { stdio: "inherit" });
|
||||
console.log(`Created v${version}, now check and push the tag`);
|
||||
Loading…
x
Reference in New Issue
Block a user