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

Fix svelte packages being required all the time #327

Merged
merged 2 commits into from
Dec 6, 2024
Merged

Fix svelte packages being required all the time #327

merged 2 commits into from
Dec 6, 2024

Conversation

byara
Copy link
Collaborator

@byara byara commented Dec 6, 2024

This PR tries to solve the issue in v5 that Svelte related packages were required for all project types.

@byara byara added the v5 label Dec 6, 2024
@byara byara requested a review from ayusharma December 6, 2024 13:02
@byara byara self-assigned this Dec 6, 2024
@byara byara merged commit c3c6ce0 into main Dec 6, 2024
6 checks passed
@byara byara deleted the v5.1.0 branch December 6, 2024 13:28
smashchatsdev pushed a commit to smashchats/smash-node-lib that referenced this pull request Dec 6, 2024
git revert 0ea542c

issue with svelte should be solved in 5.1.0 but isnt
trivago/prettier-plugin-sort-imports#327

no urge to upgrade

adding a GH workflow stage to run build checks
in order to catch this sort of issues in CI
@shaun-xenon
Copy link

I still get this error on 5.1.0

@CodiProgs
Copy link

Hello,

I am using the @trivago/prettier-plugin-sort-imports package version ^5.1.0. However, I am still encountering the following error:
Cannot read properties of undefined (reading 'svelte')

@armanian
Copy link

armanian commented Dec 8, 2024

Same here

@@ -84,7 +86,7 @@ module.exports = {
preprocess: vuePreprocessor,
},
svelte: {
...svelteParsers.svelte,
...svelteParsers.parsers.svelte,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only branch of createSvelteParsers where parsers is defined is the successful try case.

This will cause a type error for anyone without prettier-plugin-svelte.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix is coming soon and I should never release anything on a Friday!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants