Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/vuePublic

chore(compiler-sfc): specify prettier version (fix #13052)#13053

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

ShGKme
Copy link
Contributor

@ShGKmeShGKme commentedJul 19, 2023
edited
Loading

close:#13052

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

If adding anew feature, the PR's description includes:

  • A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

Other information:

@vue/compiler-sfc optionally uses Prettier and it is not compatible with Prettier v3.

Butprettier is not listed in thepackage.json.

It wasn't a problem with Prettier v2 because prettier isoptional dependency ofcomponent-compiler-utils. So Prettier is installed anyway and everything works.

But if some project hasPrettier@3, then@vue/compiler-sfc uses project's prettier and fails.

There was the same issue early incomponent-compiler-utils. See:

This PR specifies Prettier as anoptionalDependency of@vue/compiler-sfc. With specified dependency, it will useprettier@2 even if a project hasprettier@3.

P.S. I used the same versions as it was in thecomponent-compiler-utils. It seems it has the same code.

Alternative solution: make@vue/compiler-sfc compatible with bothPrettier@"1 || 2" andPrettier@3. The problem is that it will make the compile function async.

Trokne, SystemKeeper, mirucon, and FelixGraf reacted with thumbs up emoji
@ShGKmeShGKme marked this pull request as draftJuly 19, 2023 17:06
@ShGKmeShGKmeforce-pushed thechore/specify-prettier-version branch froma1fc76e toe51b52fCompareJuly 19, 2023 17:13
@ShGKmeShGKme marked this pull request as ready for reviewJuly 19, 2023 17:13
@ShGKmeShGKme changed the titlefix #13052: chore(compiler): specify prettier versionchore(compiler): specify prettier version (fix #13052)Jul 21, 2023
@ShGKmeShGKme changed the titlechore(compiler): specify prettier version (fix #13052)chore(compiler-sfc): specify prettier version (fix #13052)Jul 21, 2023
@ShGKmeShGKmeforce-pushed thechore/specify-prettier-version branch frome51b52f toed5010eCompareJuly 21, 2023 08:57
@ShGKmeShGKmeforce-pushed thechore/specify-prettier-version branch fromed5010e to786acf9CompareOctober 31, 2023 22:42
@yyx990803yyx990803 merged commit45d6ad6 intovuejs:mainDec 6, 2023
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

compiler-sfc not compatible with prettier v3
2 participants
@ShGKme@yyx990803

[8]ページ先頭

©2009-2025 Movatter.jp