-
Notifications
You must be signed in to change notification settings - Fork 51
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
Format Bun Fallback #997
Format Bun Fallback #997
Conversation
…ura/format-bun-fallback
@a-crowell I think you're the only one with only bun atm. Could you try these functions out and see how it behaves on your machine? |
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.
Haha works great! Thanks for this, I appreciate it.
fission/prettier.config.js
Outdated
printWidth: 120, | ||
overrides: [ | ||
{ | ||
files: "*.json", |
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.
Why the override? Not complaining, I just don't understand. Is 2 spaces standard for JSON?
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.
I was told my @BrandonPacewic that is was. I believe it's because there's so much deep nesting / indentation in json, two spaces makes it more readable.
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.
All of our .json
files up to this point have been 2 spaces. Don't think that there is a real "standard" but it's what we have been using.
fileLocation: str = field( | ||
default=( | ||
os.getenv("HOME") | ||
if platform.system() == "Windows" | ||
else os.path.expanduser("~") | ||
) | ||
) |
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.
Warning
- This change will have conflicts with AARD-1710: Exporter auto formatter updates #985.
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.
Should we wait for that to be merged, then rerun the formatter on this branch?
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.
👍
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.
Since Bun seems to be considerably faster than npm/npx, would it make more sense for it to be attempted before npm? That way it will default to Bun for those who have both installed (like myself).
Sure, but bun is less common than npm, and I would bet that the cost of failing bun then succeeding at npm is greater than the cost of using npm. I'll make the change though, but I think it'll be slower for more people. |
…ura/format-bun-fallback
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.
Looks good.
Description
Previously, trying to run
bun run format
, used sub commands that ran with npm and npx. People who couldn't use npm or npmx weren't able to successfully run these scripts with bun. Now, if the npm and npmx sub commands fail, they will fall back on running them with bun and bun x respectively.Objectives
Testing Done
No JIRA Issue