Skip to content

chore: switch to tinyglobby #11042

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

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft

Conversation

benmccann
Copy link
Contributor

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

https://npmgraph.js.org/?q=globby - 23 dependencies
https://npmgraph.js.org/?q=tinyglobby - 2 dependencies

Test Plan

Rely on existing unit tests since this is a refactor and doesn't add any new functionality

Test links

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

Related issues/PRs

Discussed in #11020 (comment)

Copy link

github-actions bot commented Mar 28, 2025

⚡️ Lighthouse report for the deploy preview of this PR

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

@slorber slorber added the pr: maintenance This PR does not produce any behavior differences to end users when upgrading. label Apr 4, 2025
Copy link

socket-security bot commented Apr 8, 2025

Report too large to display inline

View full report↗︎

Copy link

netlify bot commented Apr 8, 2025

[V2]

Built without sensitive environment variables

Name Link
🔨 Latest commit c32f548
🔍 Latest deploy log https://app.netlify.com/sites/docusaurus-2/deploys/67f5b91f57dd850008d0fa23
😎 Deploy Preview https://deploy-preview-11042--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.

@slorber slorber marked this pull request as draft April 8, 2025 14:39
@slorber
Copy link
Collaborator

slorber commented Apr 8, 2025

I tried to update the PR but tinyglobby seems to introduce problems we don't have with original globby

Not sure what is happening but this unit test timeouts in both our CI and on my computer:

yarn install
yarn test packages/docusaurus/src/server/translations/__tests__/translationsExtractor.test.ts

I can clearly see tinyglobby doesn't return anything and blocks the tests

The parameters are:

      globPaths: [
        '../../../../../var/folders/5r/rf5fj2ms2tv4_2fdhcxcnwbm0000gn/T/jest-createTmpSiteDir-45448-tk3qr3eGPkKO/src',
        '../../../../../var/folders/5r/rf5fj2ms2tv4_2fdhcxcnwbm0000gn/T/jest-createTmpSiteDir-45448-qOVHltphU5e0/subpath/**/*.{js,jsx,ts,tsx}',
        '../../../../../var/folders/5r/rf5fj2ms2tv4_2fdhcxcnwbm0000gn/T/jest-createTmpSiteDir-45448-qOVHltphU5e0/src/theme',
        '../../../../../var/folders/5r/rf5fj2ms2tv4_2fdhcxcnwbm0000gn/T/jest-createTmpSiteDir-45448-lpQQgC3uqiBy/subpath/**/*.{js,jsx,ts,tsx}',
        '../../../../../var/folders/5r/rf5fj2ms2tv4_2fdhcxcnwbm0000gn/T/jest-createTmpSiteDir-45448-lpQQgC3uqiBy/src/theme'
      ],

Any idea @SuperchupuDev ?

@benmccann benmccann mentioned this pull request Apr 8, 2025
3 tasks
@SuperchupuDev
Copy link

SuperchupuDev commented Apr 8, 2025

there's an fdir issue in some cases that makes this hang, the hang isn't common but it can happen. the fix is currently on fdir's main branch, i'm waiting for a release which should hopefully happen this week

@benmccann
Copy link
Contributor Author

I'll come back to this after the fdir release then. For future reference, the affected function is globTranslatableSourceFiles which calls tinyglobby with /tmp/jest-createTmpSiteDir-2151983-O1b2L2hxiTCF/src,/tmp/jest-createTmpSiteDir-2151983-A0re2B0kXWVk/subpath/**/*.{js,jsx,ts,tsx},/tmp/jest-createTmpSiteDir-2151983-A0re2B0kXWVk/src/theme,/tmp/jest-createTmpSiteDir-2151983-bPilA0xX1aPL/subpath/**/*.{js,jsx,ts,tsx},/tmp/jest-createTmpSiteDir-2151983-bPilA0xX1aPL/src/theme

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: 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.

4 participants