-
-
Notifications
You must be signed in to change notification settings - Fork 199
fix: fix bunx/pnpx commands to use correct Biome even when not installed #3886
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
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for biomejs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
WalkthroughThis pull request updates CLI command examples across documentation and a component file to use the explicit Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@src/content/docs/pl/guides/getting-started.mdx`:
- Around line 25-28: The sentence inside the note block titled "Przypinanie
wersji" is missing a comma before the conjunction "aby"; update the sentence
"`-E` zapewnia, że menedżer pakietów przypnie wersję Biome. Zobacz [stronę o
wersjonowaniu](/internals/versioning) aby uzyskać więcej informacji o tym,
[dlaczego przypinanie wersji jest ważne]." by inserting a comma before "aby" so
it reads ".../versioning), aby uzyskać więcej informacji..." to improve natural
Polish punctuation.
| :::note[Przypinanie wersji] | ||
| `-E` zapewnia, że menedżer pakietów przypnie wersję Biome. Zobacz | ||
| [stronę o wersjonowaniu](/internals/versioning) | ||
| [stronę o wersjonowaniu](/internals/versioning) | ||
| aby uzyskać więcej informacji o tym, [dlaczego przypinanie wersji jest ważne]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add the comma before “aby”.
This reads more naturally in Polish.
✍️ Suggested fix
-`-E` zapewnia, że menedżer pakietów przypnie wersję Biome. Zobacz
-[stronę o wersjonowaniu](/internals/versioning)
-aby uzyskać więcej informacji o tym, [dlaczego przypinanie wersji jest ważne].
+`-E` zapewnia, że menedżer pakietów przypnie wersję Biome. Zobacz
+[stronę o wersjonowaniu](/internals/versioning),
+aby uzyskać więcej informacji o tym, [dlaczego przypinanie wersji jest ważne].📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| :::note[Przypinanie wersji] | |
| `-E` zapewnia, że menedżer pakietów przypnie wersję Biome. Zobacz | |
| [stronę o wersjonowaniu](/internals/versioning) | |
| [stronę o wersjonowaniu](/internals/versioning) | |
| aby uzyskać więcej informacji o tym, [dlaczego przypinanie wersji jest ważne]. | |
| :::note[Przypinanie wersji] | |
| `-E` zapewnia, że menedżer pakietów przypnie wersję Biome. Zobacz | |
| [stronę o wersjonowaniu](/internals/versioning), | |
| aby uzyskać więcej informacji o tym, [dlaczego przypinanie wersji jest ważne]. |
🧰 Tools
🪛 LanguageTool
[typographical] ~27-~27: Przed tym spójnikiem stawiamy przecinek: "), aby".
Context: ...ję Biome. Zobacz stronę o wersjonowaniu aby uzyskać więcej informacji o tym, [dlacz...
(BRAK_PRZECINKA_ZEBY)
[typographical] ~28-~28: Znaków interpunkcyjnych nie stawia się na początku zdania.
Context: ...laczego przypinanie wersji jest ważne]. ::: [dlaczego przypinanie wersji jest waż...
(ZNAK_INTERPUNKCYJNY_NA_POCZATKU_ZDANIA)
🤖 Prompt for AI Agents
In `@src/content/docs/pl/guides/getting-started.mdx` around lines 25 - 28, The
sentence inside the note block titled "Przypinanie wersji" is missing a comma
before the conjunction "aby"; update the sentence "`-E` zapewnia, że menedżer
pakietów przypnie wersję Biome. Zobacz [stronę o
wersjonowaniu](/internals/versioning) aby uzyskać więcej informacji o tym,
[dlaczego przypinanie wersji jest ważne]." by inserting a comma before "aby" so
it reads ".../versioning), aby uzyskać więcej informacji..." to improve natural
Polish punctuation.
| <Code frame="none" code={`npx ${biomePackage} ${command}`} lang="bash" /> | ||
| </TabItem> | ||
| <TabItem label="pnpm" icon="pnpm"> | ||
| <Code frame="none" code={`pnpm exec ${biomeBin} ${command}`} lang="bash" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is actually correct, why was this changed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For parity with the other methods.
pnpm exec expects the package to be in the workspace, but bunx, npx, pnpx will download and run:
$ cd $(mktemp -d)
/v/f/n/6/T/tmp.xbjIqOsoMt $ pnpm exec biome --help
ERR_PNPM_RECURSIVE_EXEC_NO_PACKAGE No package found in this workspace
/v/f/n/6/T/tmp.xbjIqOsoMt $ bunx --bun @biomejs/biome --help
Biome official CLI. Use it to check the health of your project or run it to check single files.
[...]
/v/f/n/6/T/tmp.xbjIqOsoMt $ npx @biomejs/biome --help
Biome official CLI. Use it to check the health of your project or run it to check single files.
[...]
/v/f/n/6/T/tmp.xbjIqOsoMt $ pnpx @biomejs/biome --help
Packages: +2
++
Downloading @biomejs/[email protected]: 15.40 MB/15.40 MB, done
Progress: resolved 9, reused 0, downloaded 2, added 2, done
Biome official CLI. Use it to check the health of your project or run it to check single files.
[...]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, however, pnpx has been deprecated in favour of pnpm dlx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to this SO answer by pnpm maintainer zkochan it's not deprecated anymore as of 2024.
Would you like me to change pnpxes to pnpm dlxes anyhow?
Summary
The docs currently say you can do e.g.
bunx --bun biome format ./srcto format some files:However, if you do this without having installed Biome in your project first, you end up running this Biome instead, which does a whole lot of nothing in this case (but thankfully nothing destructive either).
This PR fixes the bunx and pnpx commands to refer to the correct package, so the instructions here (and in other places) mirror how the
npxinstructions would just download-and-use the correct package, installed in the current project or not.