Skip to content

fix: ignore globby from scanning monorepo node_modules for slowness fix#12129

Draft
hariabinesh-l-4219 wants to merge 1 commit into
facebook:mainfrom
hariabinesh-l-4219:main
Draft

fix: ignore globby from scanning monorepo node_modules for slowness fix#12129
hariabinesh-l-4219 wants to merge 1 commit into
facebook:mainfrom
hariabinesh-l-4219:main

Conversation

@hariabinesh-l-4219

Copy link
Copy Markdown

Pre-flight checklist

  • I have read the Contributing Guidelines on pull requests.
  • If this is a code change: I have written unit tests and/or added dogfooding pages to fully verify the new behavior.
  • If this is a new API or substantial change: the PR has an accompanying issue (closes #0000) and the maintainers have approved on my working plan.

Motivation

Test Plan

Test links

Deploy preview: https://deploy-preview-_____--docusaurus-2.netlify.app/

Related issues/PRs

@meta-cla

meta-cla Bot commented Jun 9, 2026

Copy link
Copy Markdown

Hi @hariabinesh-l-4219!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@netlify

netlify Bot commented Jun 9, 2026

Copy link
Copy Markdown

[V2]

Built without sensitive environment variables

Name Link
🔨 Latest commit b0de206
🔍 Latest deploy log https://app.netlify.com/projects/docusaurus-2/deploys/6a27b1af5cba4800080be404
😎 Deploy Preview https://deploy-preview-12129--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 project configuration.

@slorber slorber left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need:

  • details about your monorepo setup, ideally a test repro (#12128 (comment))
  • unit tests to cover edge cases and prevent regressions
  • your CLA signature, or I can't merge

async function readCategoriesMetadata(contentPath: string) {
const categoryFiles = await Globby('**/_category_.{json,yml,yaml}', {
cwd: contentPath,
ignore: ['**/node_modules/**'],

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That could fix your specific problem, but also introduce problems in other site setups. For example, sites can decide to load their mdx docs from npm and have actual content in node_modules. We need to ensure we keep supporting this pattern with tests, because I'm not sure what's the behavior of Globby.

And we also want to migrate to tinyglobby or eventually native Node globbing API, which may behave differently too. (#11042)

Maybe this will work better? Without any test, it's hard to tell:

ignore: [${contentPath}//node_modules/'],`

@slorber slorber marked this pull request as draft June 12, 2026 08:36
@slorber slorber added the pr: bug fix This PR fixes a bug in a past release. label Jun 12, 2026
@slorber slorber linked an issue Jun 12, 2026 that may be closed by this pull request
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: bug fix This PR fixes a bug in a past release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docusaurus slow on a monorepo site due to globbing node_modules

2 participants