Skip to content

Fix svelte packages being required all the time#327

Merged
byara merged 2 commits into
mainfrom
v5.1.0
Dec 6, 2024
Merged

Fix svelte packages being required all the time#327
byara merged 2 commits into
mainfrom
v5.1.0

Conversation

@byara
Copy link
Copy Markdown
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
@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
Copy Markdown

I still get this error on 5.1.0

@CodiProgs
Copy link
Copy Markdown

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
Copy Markdown

armanian commented Dec 8, 2024

Same here

Comment thread src/index.ts
},
svelte: {
...svelteParsers.svelte,
...svelteParsers.parsers.svelte,
Copy link
Copy Markdown

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
Copy Markdown
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