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

refactor: create @docusaurus/bundler and @docusaurus/babel packages #10511

Merged
merged 25 commits into from
Sep 21, 2024

Conversation

slorber
Copy link
Collaborator

@slorber slorber commented Sep 19, 2024

Motivation

Improve the codebase in preparation for introducing opt-in Rspack support (#10402)

This also creates 2 new packages:

  • @docusaurus/bundler to encapsulate bundler utils (plugins/loaders/...) under a shared abstraction so that they work for both Webpack/Rspack
  • @docusaurus/babel to encapsulate all the utils related to Babel (including code translation extraction, currently based on Babel)

Note: these new packages also permit us to clean up a few hacky imports we had previously, using import x from '@docusaurus/core/lib/...'.

Note: newly init sites will now use Babel preset @docusaurus/babel/preset instead of require.resolve('@docusaurus/core/lib/babel/preset'), but the later will keep working in v3 (CI E2E passed before I did the change)

Test Plan

CI + preview

Test links

https://deploy-preview-10511--docusaurus-2.netlify.app/

@slorber slorber added the pr: maintenance This PR does not produce any behavior differences to end users when upgrading. label Sep 19, 2024
@slorber slorber requested a review from Josh-Cena as a code owner September 19, 2024 11:48
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Sep 19, 2024
Copy link

socket-security bot commented Sep 19, 2024

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report↗︎

Copy link

netlify bot commented Sep 19, 2024

[V2]

Name Link
🔨 Latest commit 3ca28be
🔍 Latest deploy log https://app.netlify.com/sites/docusaurus-2/deploys/66ed93e60d5aee0008c5eb11
😎 Deploy Preview https://deploy-preview-10511--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 Sep 19, 2024

⚡️ Lighthouse report for the deploy preview of this PR

URL Performance Accessibility Best Practices SEO Report
/ 🟠 70 🟢 98 🟢 96 🟢 100 Report
/docs/installation 🟠 52 🟢 97 🟢 100 🟢 100 Report
/docs/category/getting-started 🟠 73 🟢 100 🟢 100 🟠 86 Report
/blog 🟠 58 🟢 96 🟢 96 🟠 86 Report
/blog/preparing-your-site-for-docusaurus-v3 🔴 48 🟢 92 🟢 100 🟢 100 Report
/blog/tags/release 🟠 64 🟢 96 🟢 96 🟠 86 Report
/blog/tags 🟠 75 🟢 100 🟢 100 🟠 86 Report

@slorber slorber added the Argos Add this label to run UI visual regression tests. See argos.yml GH action. label Sep 19, 2024
Copy link

argos-ci bot commented Sep 19, 2024

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ⚠️ Changes detected (Review) 1 changed Sep 20, 2024, 3:32 PM

@slorber slorber changed the title refactor: improve dynamic bundler infrastructure, create @docusaurus/bundler package refactor: create @docusaurus/bundler and @docusaurus/babel packages Sep 20, 2024
Copy link

socket-security bot commented Sep 20, 2024

New dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@argos-ci/[email protected] Transitive: environment, filesystem +5 172 kB neoziro
npm/@mdx-js/[email protected] Transitive: environment +1 277 kB johno
npm/@netlify/[email protected] None +1 20.6 kB netlify-bot
npm/@playwright/[email protected] None 0 25.5 kB dgozman-ms, mxschmitt, pavelfeldman, ...1 more
npm/[email protected] None 0 1.25 MB feedic

View full report↗︎

@slorber slorber merged commit 9ecff80 into main Sep 21, 2024
35 of 37 checks passed
@slorber slorber deleted the slorber/props.currentBundler branch September 21, 2024 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Argos Add this label to run UI visual regression tests. See argos.yml GH action. CLA Signed Signed Facebook CLA pr: maintenance This PR does not produce any behavior differences to end users when upgrading.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants