-
-
Notifications
You must be signed in to change notification settings - Fork 461
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
Doesn't work with non-node runtimes #3017
Comments
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Adds a `prettier.runtime` configuration option that, when used, invokes a version of `PrettierWorkerInstance` that uses `fork` instead of worker threads. Fixes: prettier#3017 Fixes: prettier#2857
Adds a `prettier.runtime` configuration option that, when used, invokes a version of `PrettierWorkerInstance` that uses `fork` instead of worker threads. Fixes: prettier#3017 Fixes: prettier#2857
@cdmistman #3061 should open the door to this. https://bun.sh/docs/runtime/nodejs-apis claims to be mostly node compatible, but I do not know if they support node's IPC protocol (i.e. can a child process spawned under According to oven-sh/bun#1424 (comment) this is not yet implemented. |
Adds a `prettier.runtime` configuration option that, when used, invokes a version of `PrettierWorkerInstance` that uses `fork` instead of worker threads. Fixes: prettier#3017 Fixes: prettier#2857
i'd expect support for this to be released before bun's 1.0 launch |
Exciting! Up to @ntotten how to proceed with that PR however 😄 |
Summary
In a
bun
project, I don't havenode
available in the environment (as I'm using nix to manage my developer environment). This extension seems to invoke theprettier
bin directly, which results in the binary failing to run due to the shebang line#!/usr/bin/env node
. Whileprettier
should be runtime-agnostic (but understandably probably can't fix this), there should be a setting in the extension that allows you to override the runtime used to runprettier
egbun ./node_modules/.bin/prettier
.Github Repository to Reproduce Issue
https://github.com/cdmistman/bun-plugin-svelte
Steps To Reproduce:
bun init
bun add prettier -d
.prettierrc
fileindex.ts
that violate your.prettierrc
Expected result
The file is formatted
Actual result
The file is not formatted
Additional information
Feel free to attach a screenshot.
VS Code Version:
1.78
Prettier Extension Version:
9.13.0
OS and version:
MacOS 13.1
Prettier Log Output
The text was updated successfully, but these errors were encountered: