Repository navigation
refactor(mdx-loader): make loader setup synchronous (AI-assisted) - #12461
Merged
Merged
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
✅ [V2]
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Size Change: 0 B Total Size: 12.4 MB ℹ️ View Unchanged
|
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
⚡️ Lighthouse report for the deploy preview of this PR
|
|
Size Change: 0 B Total Size: 12.5 MB ℹ️ View Unchanged
|
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Breaking Changes
MDXPluginnow uses Unified'sPluggabletype. Plugin functions, option tuples, and presets remain supported; invalid entries previously accepted byanynow fail type checking.createMDXLoaderItem,createMDXLoaderRule, and the pages plugin factory now return their results synchronously. Existingawaitcalls still work; replace direct.then(...)calls with synchronous use. MDX document processing remains asynchronous.Pre-flight checklist
Motivation
Concurrent compilation with the same uncached options could initialize separate MDX processors. Flatten processor construction and populate the cache synchronously so concurrent files reuse one processor while async plugins continue to work.
Make the loader APIs and content-plugin rule builders synchronous, remove obsolete ESM type workarounds, and replace duplicated
anyaliases with Unified'sPluggable. Upgradestringify-objectto 7.0.0 and use its bundled types.(AI-assisted)
Test Plan
pnpm test: 184 files, 2,978 tests passed.pnpm build:packagesandpnpm build:website:fast: passed.Test links
Deploy preview: https://deploy-preview-12461--docusaurus-2.netlify.app/
Related issues/PRs
Follow-up to #12458.