From e6cf1142e8043c57cad289eb30a6e9ee10048337 Mon Sep 17 00:00:00 2001 From: Sergey Astapov Date: Mon, 12 Oct 2026 22:19:41 -0400 Subject: [PATCH 1/4] widen nock support range --- package.json | 2 +- pnpm-lock.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index eb602140..da906286 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "fastboot": "^3.0.3 || ^4.1.5 || ^5.0.0 || ^6.0.0", "json-fn": "^1.1.1", "minimist": "^1.2.6", - "nock": "^14.0.17", + "nock": "^14 || ^15", "resolve": "^1.22.12", "whatwg-fetch": "^3.6.20" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index af290c23..d73f8cd0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -30,7 +30,7 @@ importers: specifier: ^1.2.6 version: 1.2.8 nock: - specifier: ^14.0.17 + specifier: ^14 || ^15 version: 14.0.17 resolve: specifier: ^1.22.12 From e83d3edeea4aed75ef57772861f06ccfa6ad50b8 Mon Sep 17 00:00:00 2001 From: Sergey Astapov Date: Mon, 12 Oct 2026 22:45:38 -0400 Subject: [PATCH 2/4] Support nock v15 ESM default export and add Promise.withResolvers polyfill --- lib/helpers.js | 14 ++++++++- pnpm-lock.yaml | 81 +++++++++++++++++++++++--------------------------- 2 files changed, 51 insertions(+), 44 deletions(-) diff --git a/lib/helpers.js b/lib/helpers.js index 92756c51..d2f8e896 100644 --- a/lib/helpers.js +++ b/lib/helpers.js @@ -7,10 +7,22 @@ const FastBoot = require('fastboot'); const bodyParser = require('body-parser'); const { deprecate } = require('util'); +if (typeof Promise.withResolvers === 'undefined') { + Promise.withResolvers = function () { + let resolve, reject; + const promise = new Promise((res, rej) => { + resolve = res; + reject = rej; + }); + return { promise, resolve, reject }; + }; +} + let _nock; function getNock() { if (!_nock) { - _nock = require('nock'); + let nock = require('nock'); + _nock = nock.default || nock; } return _nock; } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d73f8cd0..7ab4f7a9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -31,7 +31,7 @@ importers: version: 1.2.8 nock: specifier: ^14 || ^15 - version: 14.0.17 + version: 15.0.1 resolve: specifier: ^1.22.12 version: 1.22.12 @@ -1989,9 +1989,9 @@ packages: '@miragejs/pretender-node-polyfill@0.1.2': resolution: {integrity: sha512-M/BexG/p05C5lFfMunxo/QcgIJnMT2vDVCd00wNqK2ImZONIlEETZwWJu1QtLxtmYlSHlCFl3JNzp0tLe7OJ5g==} - '@mswjs/interceptors@0.41.9': - resolution: {integrity: sha512-VVPPgHyQ6ShqnrmDWuxjmUIsO9gWyOZFmuOfLd9LfBGQJwZfy0gvv9pbHSJuoFNIYC7ZDX9aoFwowjcdSC4E8w==} - engines: {node: '>=18'} + '@mswjs/interceptors@0.44.0': + resolution: {integrity: sha512-IYHevRStF4ijM20GI9c9Ndhw483NSAjCydQhUr4/zIB0BNLsTVw3vFAxTo6TlvX4QnV60wEHttUa9539TTAq+A==} + engines: {node: '>=22'} '@nicolo-ribaudo/eslint-scope-5-internals@5.1.1-v1': resolution: {integrity: sha512-54/JRvkLIzzDWshCWfuhadfrfZVPiElY8Fcgmg1HroEly/EDSszzhBAsarCux+D/kOslTRquNzuyGSmUSTTHGg==} @@ -2095,14 +2095,8 @@ packages: '@octokit/types@18.0.0': resolution: {integrity: sha512-l6bAF43PNxkJp6g+W4PjoUSSkxHomXw2nOum5CTftJz1NlV3vu93NImgOYtLf6CbBUb5j+fiuzW0PPQ5JTSvZA==} - '@open-draft/deferred-promise@2.2.0': - resolution: {integrity: sha512-CecwLWx3rhxVQF6V4bAgPS5t+So2sTbPgAzafKkVizyi7tlwpcFpdFqq+wqF2OwNBmqFuu6tOyouTuxgpMfzmA==} - - '@open-draft/logger@0.3.0': - resolution: {integrity: sha512-X2g45fzhxH238HKO4xbSr7+wBS8Fvw6ixhTDuvLd5mqh6bJJCFAPwU9mPDxbcrRtfxv4u5IHCEH77BmxvXmmxQ==} - - '@open-draft/until@2.1.0': - resolution: {integrity: sha512-U69T3ItWHvLwGg5eJ0n3I62nWuE6ilHlmz7zM0npLBRvPRd7e6NYmg54vvRtP5mZG7kZqZCFVdsTWo7BPtBujg==} + '@open-draft/until@3.0.1': + resolution: {integrity: sha512-s7/9ELP4aP9YZtW7RJaa0Xf3RISaRH9+EFN18FtykJYRHGNrl8f9ymvoNXzjhrjmftFvkQudtuDU9RYhk0xs3A==} '@parcel/watcher-android-arm64@2.6.0': resolution: {integrity: sha512-trgpLSCKRC/huFjXX/Smh+0sWe4+YtKfktIToiMl59ghz7z+qkH6kMvNnUbLyRs9N11t8l4svSCs1+5B3rOAhA==} @@ -2263,6 +2257,9 @@ packages: '@types/cors@2.8.19': resolution: {integrity: sha512-mFNylyeyqN93lfe/9CSxOGREz8cpzAhH+E93xJ4xWQf62V8sQ/24reV2nyzUWM6H6Xji+GGHpkbLe7pVoUEskg==} + '@types/debug@4.1.13': + resolution: {integrity: sha512-KSVgmQmzMwPlmtljOomayoR89W4FynCAi3E8PPs7vmDVPe84hT+vGPKkJfThkmXs0x0jAaa9U8uW8bbfyS2fWw==} + '@types/eslint@8.56.12': resolution: {integrity: sha512-03ruubjWyOHlmljCVoxSuNDdmfZDzsrrz0P2LeJsOXr+ZwFQ+0yQIwNCwt/GYhV7Z31fgtXJTAEs+FYlEL851g==} @@ -2306,6 +2303,9 @@ packages: '@types/minimatch@3.0.5': resolution: {integrity: sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==} + '@types/ms@2.1.0': + resolution: {integrity: sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==} + '@types/node@24.10.1': resolution: {integrity: sha512-GNWcUTRBgIRJD5zj+Tq0fKOJ5XZajIiBroOF0yvj2bSU1WvNdYS/dn9UxwsujGW4JX06dnHyjV2y9rRaybH0iQ==} @@ -6807,9 +6807,9 @@ packages: no-case@3.0.4: resolution: {integrity: sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==} - nock@14.0.17: - resolution: {integrity: sha512-EjRr1weMa4ALQX35AgZTEnP+weJJjlW1KGDiNM2IQC2069YDHas4f4B4UUYR+TTLyKWxJvOz2wObDKQs/LNreA==} - engines: {node: '>=18.20.0 <20 || >=20.12.1'} + nock@15.0.1: + resolution: {integrity: sha512-Mjx5Xl4t9vP13eUZPWqwwpjjXNjvhUTo1qTdryVM3+7t6Z2w6WHZ9GVZk/zQ8Ym1vbmloWaglye3cloyHAJ8FA==} + engines: {node: '>=20.12.1'} node-addon-api@7.1.1: resolution: {integrity: sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==} @@ -7437,10 +7437,6 @@ packages: prop-types@15.8.1: resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==} - propagate@2.0.1: - resolution: {integrity: sha512-vGrhOavPSTz4QVNuBNdcNXePNdNMaO1xj9yBeH1ScQPjk/rhg9sSlCXPhMkFuaNNW/syTvYqsnbIJxMBfRbbag==} - engines: {node: '>= 8'} - proper-lockfile@4.1.2: resolution: {integrity: sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA==} @@ -7761,6 +7757,9 @@ packages: resolution: {integrity: sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==} engines: {node: '>= 4'} + rettime@0.11.12: + resolution: {integrity: sha512-5ExtR1ppiDBQkVoPw5NAqdbfH4Iq2VOmQKHMtUoaFxA9bo2krzFYBtyq6K40xxbYp+2w/YOr6D+1ToF6tTN53A==} + reusify@1.1.0: resolution: {integrity: sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} @@ -8224,9 +8223,6 @@ packages: resolution: {integrity: sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ==} engines: {node: '>= 0.4'} - strict-event-emitter@0.5.1: - resolution: {integrity: sha512-vMgjE/GGEPEFnhFub6pa4FmJBRBVOLpIII2hvCZ8Kzb7K0hlHo7mQv6xYrBvCL2LtAIBwFUK8wvuJgTVSQ5MFQ==} - string-template@0.2.1: resolution: {integrity: sha512-Yptehjogou2xm4UJbxJ4CxgZx12HBfeystp0y3x7s4Dj32ltVVG1Gg8YhKjHZkHicuKpZX/ffilA8505VbUbpw==} @@ -12037,14 +12033,16 @@ snapshots: '@miragejs/pretender-node-polyfill@0.1.2': {} - '@mswjs/interceptors@0.41.9': + '@mswjs/interceptors@0.44.0': dependencies: - '@open-draft/deferred-promise': 2.2.0 - '@open-draft/logger': 0.3.0 - '@open-draft/until': 2.1.0 + '@open-draft/until': 3.0.1 + '@types/debug': 4.1.13 + debug: 4.4.3 is-node-process: 1.2.0 outvariant: 1.4.3 - strict-event-emitter: 0.5.1 + rettime: 0.11.12 + transitivePeerDependencies: + - supports-color '@nicolo-ribaudo/eslint-scope-5-internals@5.1.1-v1': dependencies: @@ -12182,14 +12180,7 @@ snapshots: dependencies: '@octokit/openapi-types': 29.0.1 - '@open-draft/deferred-promise@2.2.0': {} - - '@open-draft/logger@0.3.0': - dependencies: - is-node-process: 1.2.0 - outvariant: 1.4.3 - - '@open-draft/until@2.1.0': {} + '@open-draft/until@3.0.1': {} '@parcel/watcher-android-arm64@2.6.0': optional: true @@ -12327,6 +12318,10 @@ snapshots: dependencies: '@types/node': 24.10.1 + '@types/debug@4.1.13': + dependencies: + '@types/ms': 2.1.0 + '@types/eslint@8.56.12': dependencies: '@types/estree': 1.0.9 @@ -12376,6 +12371,8 @@ snapshots: '@types/minimatch@3.0.5': {} + '@types/ms@2.1.0': {} + '@types/node@24.10.1': dependencies: undici-types: 7.16.0 @@ -18785,11 +18782,11 @@ snapshots: lower-case: 2.0.2 tslib: 2.8.1 - nock@14.0.17: + nock@15.0.1: dependencies: - '@mswjs/interceptors': 0.41.9 - json-stringify-safe: 5.0.1 - propagate: 2.0.1 + '@mswjs/interceptors': 0.44.0 + transitivePeerDependencies: + - supports-color node-addon-api@7.1.1: optional: true @@ -19389,8 +19386,6 @@ snapshots: object-assign: 4.1.1 react-is: 16.13.1 - propagate@2.0.1: {} - proper-lockfile@4.1.2: dependencies: graceful-fs: 4.2.11 @@ -19759,6 +19754,8 @@ snapshots: retry@0.12.0: {} + rettime@0.11.12: {} + reusify@1.1.0: {} rimraf@2.6.3: @@ -20358,8 +20355,6 @@ snapshots: es-errors: 1.3.0 internal-slot: 1.1.0 - strict-event-emitter@0.5.1: {} - string-template@0.2.1: {} string-width@2.1.1: From 41323780ff1c2adcc44b61b4d0b9a40360e8ff66 Mon Sep 17 00:00:00 2001 From: Sergey Astapov Date: Mon, 12 Oct 2026 22:50:52 -0400 Subject: [PATCH 3/4] docs: explain Promise.withResolvers fallback requirement for Node < 22 --- lib/helpers.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/helpers.js b/lib/helpers.js index d2f8e896..a23641aa 100644 --- a/lib/helpers.js +++ b/lib/helpers.js @@ -7,6 +7,10 @@ const FastBoot = require('fastboot'); const bodyParser = require('body-parser'); const { deprecate } = require('util'); +// Polyfill Promise.withResolvers for Node.js < 22 (e.g. Node 20 LTS). +// While nock v15 claims to support Node >= 20.12.1, its subdependency +// @mswjs/interceptors (>= 0.44.0) requires Node >= 22 and uses Promise.withResolvers(), +// which was added in Node 22 and not backported to Node 20. if (typeof Promise.withResolvers === 'undefined') { Promise.withResolvers = function () { let resolve, reject; From de3519ee35d0e2b0f18ea73292e9acd00623c6d1 Mon Sep 17 00:00:00 2001 From: Sergey Astapov Date: Mon, 12 Oct 2026 22:57:06 -0400 Subject: [PATCH 4/4] fix(ember-try): add pnpm overrides for json-stable-stringify in fastboot-3.0 scenario --- tests/dummy/config/ember-try.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/dummy/config/ember-try.js b/tests/dummy/config/ember-try.js index f6ae3149..8e97ce24 100644 --- a/tests/dummy/config/ember-try.js +++ b/tests/dummy/config/ember-try.js @@ -100,8 +100,10 @@ module.exports = async function () { // ember-cli-fastboot v3 incorrectly passed args to json-stable-stringify // which results in TypeError in latest versions of json-stable-stringify, // hence pinning. - resolutions: { - 'json-stable-stringify': '1.0.2', + pnpm: { + overrides: { + 'json-stable-stringify': '1.0.2', + }, }, }, },