magic-akari / swc_mut_cjs_exports

[SWC plugin] mutable CJS exports
https://www.npmjs.com/package/swc_mut_cjs_exports
MIT License
57 stars 16 forks source link

RuntimeError: unreachable with 0.75.4 and swc/core of 1.3.57 #50

Closed scamden closed 1 year ago

scamden commented 1 year ago

Caused by: 0: failed to invoke jest_workaround as js transform plugin at node_modules/jest_workaround/jest_workaround.wasm 1: RuntimeError: unreachable at Compiler.transformSync (/Users/scamden/watershed/ghg/nodemodules/.pnpm/@swc+core@1.3.57@swc+helpers@0.4.3/node_modules/@swc/core/index.js:241:29) at transformSync (/Users/scamden/watershed/ghg/nodemodules/.pnpm/@swc+core@1.3.57@swc+helpers@0.4.3/node_modules/@swc/core/index.js:348:21) at Object.process (/Users/scamden/watershed/ghg/nodemodules/.pnpm/@swc+jest@0.2.26@swc+core@1.3.57/node_modules/@swc/jest/index.js:73:45) at ScriptTransformer.transformSource (/Users/scamden/watershed/ghg/node_modules/.pnpm/@jest+transform@29.5.0/node_modules/@jest/transform/build/ScriptTransformer.js:542:31) at revertHook.exts (/Users/scamden/watershed/ghg/node_modules/.pnpm/@jest+transform@29.5.0/node_modules/@jest/transform/build/ScriptTransformer.js:773:18) at Module._compile (/Users/scamden/watershed/ghg/node_modules/.pnpm/pirates@4.0.5/node_modules/pirates/lib/index.js:130:29) at Module._extensions..js (node:internal/modules/cjs/loader:1213:10) at Object.newLoader (/Users/scamden/watershed/ghg/node_modules/.pnpm/pirates@4.0.5/node_modules/pirates/lib/index.js:141:7) at Module.load (node:internal/modules/cjs/loader:1037:32) at Module._load (node:internal/modules/cjs/loader:878:12)

magic-akari commented 1 year ago

Yes, it's broken now. I can check it here with @swc/core@latest

I suspect this is caused by https://github.com/swc-project/swc/commit/4e278befcf0071619ee583ffa7c8357ea4fd5c2f or https://github.com/swc-project/swc/commit/d2c1f45f5a1a1d72fa6d6fa28bd84f242d5aff81

magic-akari commented 1 year ago

fixed in 958fb22