这是indexloc提供的服务,不要输入任何密码
Skip to content

Use double quotes for prettier file glob in yarn format #202

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

Merged
merged 1 commit into from
Dec 12, 2021
Merged

Use double quotes for prettier file glob in yarn format #202

merged 1 commit into from
Dec 12, 2021

Conversation

yangshun
Copy link
Contributor

Summary

When running the yarn format command on Windows Powershell, double quotes are added to the file pattern and makes it invalid.

PS C:\Users\yangshun\developer\my-turborepo> yarn format
yarn run v1.22.5
$ prettier --write '**/*.{ts,tsx,md}'
[error] No files matching the pattern were found: "'**/*.{ts,tsx,md}'".
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

The fix is to change the single quotes into escaped double quotes instead. This is used in Docusaurus

Test Plan

Windows

PS C:\Users\yangshun\developer\my-turborepo> yarn format
yarn run v1.22.5
$ prettier --write "**/*.{ts,tsx,md}"
apps\docs\next-env.d.ts 19ms
apps\docs\pages\index.tsx 14ms
apps\docs\README.md 35ms
apps\web\next-env.d.ts 2ms
apps\web\pages\index.tsx 4ms
apps\web\README.md 14ms
packages\tsconfig\README.md 2ms
packages\ui\Button.tsx 5ms
README.md 33ms
Done in 0.90s.

Windows Subsystem for Linux

yangshun@PC-YANGSHUN:/mnt/c/Users/yangshun/developer/my-turborepo$ yarn format
yarn run v1.22.5
$ prettier --write "**/*.{ts,tsx,md}"
apps/docs/next-env.d.ts 17ms
apps/docs/pages/index.tsx 13ms
apps/docs/README.md 41ms
apps/web/next-env.d.ts 3ms
apps/web/pages/index.tsx 5ms
apps/web/README.md 15ms
packages/tsconfig/README.md 4ms
packages/ui/Button.tsx 5ms
README.md 21ms
Done in 1.07s.

@vercel
Copy link

vercel bot commented Dec 12, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/vercel/turbo-site/2SkrjFegq2oWm8tzKtZgLpSC62Gd
✅ Preview: https://turbo-site-git-fork-yangshun-yangshun-prettier-windows.vercel.sh

@jaredpalmer jaredpalmer merged commit a3aeaec into vercel:main Dec 12, 2021
@yangshun yangshun deleted the yangshun/prettier-windows branch December 12, 2021 11:20
sokra pushed a commit that referenced this pull request Oct 25, 2022
This also adds a new `__turbopack_import__` module helper, which checks whether a chunk has been loaded and inserts a new `<script>` if not.

This PR is just the starting point. We need to better support dynamic resolution (`import(value)`), import assertions, and split the full traversal of the deferred chunk group's module graph until the browser makes the request (instead of doing all the work during the main chunk loading).
sokra added a commit that referenced this pull request Oct 25, 2022
jridgewell pushed a commit to vercel/next.js that referenced this pull request Mar 10, 2023
sokra added a commit to vercel/next.js that referenced this pull request Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants