-
Notifications
You must be signed in to change notification settings - Fork 97
Open
Description
Describe the bug
After updating Prettier to version 3.7.0, formatting .svelte files using prettier-plugin-svelte fails with a runtime error.
To Reproduce
Steps to reproduce the behavior:
- Install Prettier 3.7.0 and
prettier-plugin-svelte@3.4.0. - Run
prettier --write .on a project with.sveltefiles.
Expected behavior
Svelte files should be formatted correctly without throwing errors.
Actual behavior
Prettier throws the following error:
TypeError: getVisitorKeys is not a function or its return value is not iterable
at recurse (index.mjs:17713:24)
at printEmbeddedLanguages (index.mjs:17683:3)
at printAstToDoc (index.mjs:17792:9)
at async coreFormat (index.mjs:18171:14)
at async formatWithCursor (index.mjs:18384:14)
at async formatFiles (internal/legacy-cli.mjs:5831:18)
at async main (internal/legacy-cli.mjs:6220:5)
at async Module.run (internal/legacy-cli.mjs:6163:5)
Additional context
- prettier-plugin-svelte version: 3.4.0
- Prettier version: 3.7.0
- Svelte version: 5.x
This issue does not occur with Prettier 3.6.2. It appears to be a compatibility problem with the newly released Prettier 3.7.0.
mattlehrer, alexhostrup, Rimevel, ottsch, knd775 and 31 more
Metadata
Metadata
Assignees
Labels
No labels