Skip to content
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

feat(plugin-npm2yarn): Add Bun to default tabs conversions #10953

Merged
merged 5 commits into from
Mar 11, 2025

Conversation

jakeboone02
Copy link
Contributor

@jakeboone02 jakeboone02 commented Feb 26, 2025

Pre-flight checklist

Motivation

Bun is mentioned as being one of the default converters in packages/docusaurus-remark-plugin-npm2yarn/README.md, but it wasn't actually implemented as a default in packages/docusaurus-remark-plugin-npm2yarn/src/index.ts.

Bun is probably popular enough by now that it warrants inclusion as a default.

I also updated the README for the package to show the default converters as an actual array value and updated the example screenshot with pnpm and Bun.

Test Plan

Updated packages/docusaurus-remark-plugin-npm2yarn/src/__tests__/__snapshots__/index.test.ts.snap.

I wasn't able to run the tests locally, so I updated the snapshot manually for the first commit. I can fix the snapshot if the tests fail in CI. Fixed.

Test links

Deploy preview: https://deploy-preview-10953--docusaurus-2.netlify.app/docs/installation/#build

Related issues/PRs

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Feb 26, 2025
Copy link

netlify bot commented Feb 26, 2025

[V2]

Name Link
🔨 Latest commit 95af630
🔍 Latest deploy log https://app.netlify.com/sites/docusaurus-2/deploys/67cf084f951d48000803c146
😎 Deploy Preview https://deploy-preview-10953--docusaurus-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

github-actions bot commented Feb 26, 2025

⚡️ Lighthouse report for the deploy preview of this PR

URL Performance Accessibility Best Practices SEO Report
/ 🟠 61 🟢 98 🟢 96 🟢 100 Report
/docs/installation 🔴 47 🟢 97 🟢 100 🟢 100 Report
/docs/category/getting-started 🟠 73 🟢 100 🟢 100 🟠 86 Report
/blog 🟠 63 🟢 96 🟢 100 🟠 86 Report
/blog/preparing-your-site-for-docusaurus-v3 🟠 65 🟢 92 🟢 100 🟢 100 Report
/blog/tags/release 🟠 63 🟢 96 🟢 100 🟠 86 Report
/blog/tags 🟠 69 🟢 100 🟢 100 🟠 86 Report

@slorber
Copy link
Collaborator

slorber commented Feb 27, 2025

Thanks

Ok to do that but I'm going to consider it a feat, not a fix.

It's a behavior change that users upgrading must be aware of, and documented properly in our release notes.

I even wonder if we shouldn't keep it for v4 (soon), because it's not critical and may annoy some users upgrading that would now need to disable this conversion. See for example: electron/website#421

Any thought @Josh-Cena ?

@jakeboone02
Copy link
Contributor Author

Yeah, good points. I debated prefixing the PR description with "fix" vs "feat", and only went with "fix" because the README conflicted with the actual behavior.

A major version bump would be a good time to make the change.

@slorber slorber added this to the 4.0 milestone Feb 27, 2025
@slorber
Copy link
Collaborator

slorber commented Feb 27, 2025

Yeah, let's delay this to v4, it's safer, not too far, and there's a good enough workaround until then.

@slorber slorber added pr: new feature This PR adds a new API or behavior. pr: breaking change Existing sites may not build successfully in the new version. Description contains more details. labels Feb 27, 2025
@Josh-Cena
Copy link
Collaborator

I don't have thoughts wrt to v3 or v4. I don't think it's major enough, actually—it's a normal feature enhancement. I don't really know what users expect when they use this feature though.

@jakeboone02
Copy link
Contributor Author

I don't have strong feelings about it either, but FWIW as a user of the feature I would assume the default meant "show all the reasonably popular ones" (which includes Bun at this point). I doubt many people would assume the default meant "show all the popular ones as of the last major version bump of this Docusaurus plugin," and anyone needing to customize the list would have already done that anyway.

@slorber slorber removed this from the 4.0 milestone Mar 10, 2025
@slorber slorber removed the pr: breaking change Existing sites may not build successfully in the new version. Description contains more details. label Mar 10, 2025
@slorber slorber changed the title fix(plugin-npm2yarn): Add Bun as default to align with docs feat(plugin-npm2yarn): Add Bun to default tabs conversions Mar 10, 2025
@slorber
Copy link
Collaborator

slorber commented Mar 10, 2025

Ok let's merge this for v3.8 then 👍 It's easy to revert if needed and shouldn't really harm anyone

@Josh-Cena
Copy link
Collaborator

It's customizable anyway—we just need to point to the option to restore previous behavior in the release notes

@slorber slorber merged commit 549ab79 into facebook:main Mar 11, 2025
38 checks passed
@jakeboone02 jakeboone02 deleted the npm2yarn-add-bun-default branch March 11, 2025 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: new feature This PR adds a new API or behavior.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants