Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stryker Error: 'svelte/compiler' no longer exports a walk utility in svelte version 5+ #5154

Open
jacq42 opened this issue Jan 23, 2025 · 0 comments
Labels
🐛 Bug Something isn't working

Comments

@jacq42
Copy link

jacq42 commented Jan 23, 2025

The svelte-parser.ts imports the (deprecated) walk function from svelte compiler:

const { parse: svelteParse, walk, preprocess, VERSION } = await import('svelte/compiler');

When running stryker tests after updating, I got the error message:

 ERROR Stryker Unexpected error occurred while running Stryker Error: 'svelte/compiler' no longer exports a `walk` utility — please import it directly from 'estree-walker' instead
    at walk (file:///xxx/node_modules/svelte/src/compiler/index.js:163:8)
    at getTemplateScriptRanges (file:///xxx/node_modules/@stryker-mutator/instrumenter/dist/src/parsers/svelte-parser.js:51:9)
    at parse (file:///xxx/node_modules/@stryker-mutator/instrumenter/dist/src/parsers/svelte-parser.js:16:28)
    at async Instrumenter.instrument (file:///xxx/node_modules/@stryker-mutator/instrumenter/dist/src/instrumenter.js:33:25)
    at async MutantInstrumenterExecutor.execute (file:///xxx/node_modules/@stryker-mutator/core/dist/src/process/2-mutant-instrumenter-executor.js:26:34)
    at async Stryker.runMutationTest (file:///xxx/node_modules/@stryker-mutator/core/dist/src/stryker.js:33:48)

used version: stryker-js with vitest runner 8.7.1

@jacq42 jacq42 added the 🐛 Bug Something isn't working label Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant