diff --git a/package.json b/package.json index 094341e1ec6b92..64b729f294cc42 100644 --- a/package.json +++ b/package.json @@ -114,9 +114,9 @@ "@mui/joy": "workspace:*", "@mui/material": "workspace:^", "@mui/utils": "workspace:^", - "@pigment-css/react": "workspace:^", "@next/eslint-plugin-next": "^14.2.1", "@octokit/rest": "^20.1.0", + "@pigment-css/react": "workspace:^", "@playwright/test": "1.43.1", "@types/enzyme": "^3.10.18", "@types/fs-extra": "^11.0.4", @@ -227,5 +227,10 @@ ], "sourceMap": false, "instrument": false + }, + "pnpm": { + "patchedDependencies": { + "@wyw-in-js/transform@0.5.0": "patches/@wyw-in-js__transform@0.5.0.patch" + } } } diff --git a/patches/@wyw-in-js__transform@0.5.0.patch b/patches/@wyw-in-js__transform@0.5.0.patch new file mode 100644 index 00000000000000..2c8676be1898aa --- /dev/null +++ b/patches/@wyw-in-js__transform@0.5.0.patch @@ -0,0 +1,44 @@ +diff --git a/esm/module.js b/esm/module.js +index 527070166142e7fda5ed14e1f3465052c82f2a2b..122061e0d481066a2b5fd0c7ab2a8b1d523b1ef1 100644 +--- a/esm/module.js ++++ b/esm/module.js +@@ -119,7 +119,7 @@ export class Module { + this.services = services; + this.moduleImpl = moduleImpl; + this.cache = services.cache; +- this.#entrypointRef = new WeakRef(entrypoint); ++ this.#entrypointRef = entrypoint; + this.idx = entrypoint.idx; + this.id = entrypoint.name; + this.filename = entrypoint.name; +@@ -143,7 +143,7 @@ export class Module { + this.debug('the whole exports was overridden with %O', value); + } + get entrypoint() { +- const entrypoint = this.#entrypointRef.deref(); ++ const entrypoint = this.#entrypointRef; + invariant(entrypoint, `Module ${this.idx} is disposed`); + return entrypoint; + } +diff --git a/lib/module.js b/lib/module.js +index d2f2644c2469ac7ad0dbd1b9f58099eda4084b80..b8bad9c43c35bef14c3f6a277f8c9974607b2a00 100644 +--- a/lib/module.js ++++ b/lib/module.js +@@ -127,7 +127,7 @@ class Module { + this.services = services; + this.moduleImpl = moduleImpl; + this.cache = services.cache; +- this.#entrypointRef = new WeakRef(entrypoint); ++ this.#entrypointRef = entrypoint; + this.idx = entrypoint.idx; + this.id = entrypoint.name; + this.filename = entrypoint.name; +@@ -151,7 +151,7 @@ class Module { + this.debug('the whole exports was overridden with %O', value); + } + get entrypoint() { +- const entrypoint = this.#entrypointRef.deref(); ++ const entrypoint = this.#entrypointRef; + (0, _tsInvariant.invariant)(entrypoint, `Module ${this.idx} is disposed`); + return entrypoint; + } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ed7f49635a42c0..08af18d8d31af1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -27,6 +27,11 @@ overrides: '@types/react-dom': 18.2.19 cross-fetch: ^4.0.0 +patchedDependencies: + '@wyw-in-js/transform@0.5.0': + hash: zicb4vap2prvslgwedcxhpcmvy + path: patches/@wyw-in-js__transform@0.5.0.patch + importers: .: @@ -2195,7 +2200,7 @@ importers: version: 0.5.0 '@wyw-in-js/transform': specifier: ^0.5.0 - version: 0.5.0 + version: 0.5.0(patch_hash=zicb4vap2prvslgwedcxhpcmvy) clsx: specifier: ^2.1.0 version: 2.1.0 @@ -2274,7 +2279,7 @@ importers: version: 0.5.0 '@wyw-in-js/transform': specifier: ^0.5.0 - version: 0.5.0 + version: 0.5.0(patch_hash=zicb4vap2prvslgwedcxhpcmvy) babel-plugin-define-var: specifier: ^0.1.0 version: 0.1.0 @@ -2311,7 +2316,7 @@ importers: version: 0.5.0 '@wyw-in-js/transform': specifier: ^0.5.0 - version: 0.5.0 + version: 0.5.0(patch_hash=zicb4vap2prvslgwedcxhpcmvy) babel-plugin-define-var: specifier: ^0.1.0 version: 0.1.0 @@ -8604,7 +8609,7 @@ packages: - supports-color dev: false - /@wyw-in-js/transform@0.5.0: + /@wyw-in-js/transform@0.5.0(patch_hash=zicb4vap2prvslgwedcxhpcmvy): resolution: {integrity: sha512-tpa2/FsB30fdXB1E+9MmfxQYbRgLv/+VMKzpBKNraDH39zwnA2eGGAEho5gpqK40cEV7NH6zhVbaBcEnV0HQyw==} engines: {node: '>=16.0.0'} dependencies: @@ -8626,6 +8631,7 @@ packages: transitivePeerDependencies: - supports-color dev: false + patched: true /@xtuc/ieee754@1.2.0: resolution: {integrity: sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==} @@ -21955,7 +21961,7 @@ packages: '@mui/system': link:packages/mui-system/build '@wyw-in-js/processor-utils': 0.5.0 '@wyw-in-js/shared': 0.5.0 - '@wyw-in-js/transform': 0.5.0 + '@wyw-in-js/transform': 0.5.0(patch_hash=zicb4vap2prvslgwedcxhpcmvy) clsx: 2.1.0 cssesc: 3.0.0 csstype: 3.1.3