diff --git a/MIGRATIONS.md b/MIGRATIONS.md index c3e66de60..73f8ce733 100644 --- a/MIGRATIONS.md +++ b/MIGRATIONS.md @@ -4,6 +4,14 @@ Breaking changes and upgrade notes for downstream projects. --- +## `test`/`test:unit` raise the heap ceiling to 8192 MB (2026-09-27) + +`--experimental-vm-modules` leaks ESM module registries between suites (upstream jest issue, present on jest 30); a large suite can hit Node's default ~4 GB old-space ceiling and OOM (not a test failure — the same suite passes clean at 8192). `NODE_OPTIONS` on every non-coverage test script (`test`, `test:unit`, `test:integration`, `test:e2e`, `test:all`, `test:watch`) now includes `--max-old-space-size=8192`; `:coverage` variants keep their own flags (#3948). + +**Action required:** `package.json` is project-owned (`--ours`, not part of the ISO merge) — if your suite is large enough to OOM under `--runInBand`, add the same flag to your project's `test`/`test:unit` scripts. + +--- + ## Removed unused APIs: `authorize()`, `requireFeatureFlag`, billing refund service (2026-09-26) Three APIs documented in earlier entries below had zero non-test callers in this repo. Removed as dead code (#3998). diff --git a/package.json b/package.json index fc32ed433..84141ec40 100644 --- a/package.json +++ b/package.json @@ -29,12 +29,12 @@ "dev:env": "node --env-file-if-exists=.env --watch server.js", "debug": "nodemon --inspect server.js", "prod": "cross-env NODE_ENV=production node server.js --name=node", - "test": "cross-env NODE_ENV=test NODE_OPTIONS=--experimental-vm-modules jest --runInBand --testPathPatterns='unit'", - "test:all": "cross-env NODE_ENV=test NODE_OPTIONS=--experimental-vm-modules jest --runInBand", - "test:unit": "cross-env NODE_ENV=test NODE_OPTIONS=--experimental-vm-modules jest --runInBand --testPathPatterns='unit'", - "test:integration": "cross-env NODE_ENV=test NODE_OPTIONS=--experimental-vm-modules jest --runInBand --testPathPatterns='integration'", - "test:e2e": "cross-env NODE_ENV=test NODE_OPTIONS=--experimental-vm-modules jest --runInBand --testPathPatterns='e2e'", - "test:watch": "cross-env NODE_ENV=test NODE_OPTIONS=--experimental-vm-modules jest --watchAll", + "test": "cross-env NODE_ENV=test NODE_OPTIONS=\"--experimental-vm-modules --max-old-space-size=8192\" jest --runInBand --testPathPatterns='unit'", + "test:all": "cross-env NODE_ENV=test NODE_OPTIONS=\"--experimental-vm-modules --max-old-space-size=8192\" jest --runInBand", + "test:unit": "cross-env NODE_ENV=test NODE_OPTIONS=\"--experimental-vm-modules --max-old-space-size=8192\" jest --runInBand --testPathPatterns='unit'", + "test:integration": "cross-env NODE_ENV=test NODE_OPTIONS=\"--experimental-vm-modules --max-old-space-size=8192\" jest --runInBand --testPathPatterns='integration'", + "test:e2e": "cross-env NODE_ENV=test NODE_OPTIONS=\"--experimental-vm-modules --max-old-space-size=8192\" jest --runInBand --testPathPatterns='e2e'", + "test:watch": "cross-env NODE_ENV=test NODE_OPTIONS=\"--experimental-vm-modules --max-old-space-size=8192\" jest --watchAll", "test:coverage": "cross-env NODE_ENV=test NODE_OPTIONS=\"--experimental-vm-modules --max-old-space-size=6144 --expose-gc\" jest --coverage --maxWorkers=2", "test:unit:coverage": "cross-env NODE_ENV=test NODE_OPTIONS=\"--experimental-vm-modules --max-old-space-size=4096 --expose-gc\" jest --coverage --maxWorkers=2 --testPathPatterns='unit'", "test:integration:coverage": "cross-env NODE_ENV=test NODE_OPTIONS=\"--experimental-vm-modules --max-old-space-size=4096 --expose-gc\" jest --coverage --maxWorkers=2 --testPathPatterns='integration'",