magic-akari/swc_mut_cjs_exports

Not compatible with @swc/core v1.0.6

Closed this issue · 2 comments

swc_mut_cjs_exports plugin broken after swc/core v1.0.6, I've fixed by downgrade version as v1.0.5 which is working fine.

Determining test suites to run...thread '<unnamed>' panicked at /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/swc-0.272.1/src/plugin.rs:162:14:
failed to invoke plugin: failed to invoke plugin on 'Some("/Users/bb/repos/test/jest.init.js")'

Caused by:
    0: failed to invoke `swc_mut_cjs_exports` as js transform plugin at swc_mut_cjs_exports
    1: RuntimeError: unreachable
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I got the same error when updating @swc/core from 1.3.105 to 1.3.106

  ● Test suite failed to run

    failed to handle: failed to invoke plugin: failed to invoke plugin on 'Some("/Users/garrettmccullough/code/program_lead_portal_py/test/javascript_tests/setup.js")'

    Caused by:
        0: failed to invoke `swc_mut_cjs_exports` as js transform plugin at swc_mut_cjs_exports
        1: RuntimeError: unreachable

      at Compiler.transformSync (node_modules/@swc/core/index.js:244:29)
      at transformSync (node_modules/@swc/core/index.js:351:21)
      at Object.process (node_modules/@swc/jest/index.js:73:45)
      at ScriptTransformer.transformSource (node_modules/@jest/transform/build/ScriptTransformer.js:545:31)
      at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:674:40)
      at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:726:19)

Is there a plan to update this package to work with the lastest @swc/core version?