Skip to content

chore: replace glob with tinyglobby - #12705

Merged
petebacondarwin merged 4 commits into
cloudflare:mainfrom
roli-lpci:chore/replace-glob-with-tinyglobby
Apr 19, 2026
Merged

chore: replace glob with tinyglobby#12705
petebacondarwin merged 4 commits into
cloudflare:mainfrom
roli-lpci:chore/replace-glob-with-tinyglobby

Conversation

@roli-lpci

@roli-lpci roli-lpci commented Feb 27, 2026

Copy link
Copy Markdown
Contributor

Addresses #11854

Summary

Replace the glob package with tinyglobby across tools, create-cloudflare, and pages-shared. This aligns the rest of the monorepo with vite-plugin-cloudflare, which already uses tinyglobby.

Changes

  • tools/e2e/runIndividualE2EFiles.ts — replace globIterateSync from glob with globSync from tinyglobby
  • tools/deployments/validate-package-dependencies.ts — swap glob import to tinyglobby
  • tools/deployments/validate-private-packages.ts — swap glob import to tinyglobby
  • packages/create-cloudflare/scripts/build.ts — replace glob.sync() with globSync from tinyglobby
  • packages/create-cloudflare/package.json — replace glob@10 with tinyglobby@0.2
  • packages/pages-shared/package.json — remove unused glob devDependency
  • tools/package.json — replace glob@11 with tinyglobby@0.2

Why tinyglobby

  • 2 dependencies vs glob's 6+ (and globby's 17+)
  • Already used in vite-plugin-cloudflare — this PR standardizes the monorepo
  • Returns POSIX paths by default — no need for the posix: true option
  • Recommended by the e18e community as the glob replacement

  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: internal dependency swap with no user-facing behavior change

@roli-lpci
roli-lpci requested a review from a team as a code owner February 27, 2026 19:37
@changeset-bot

changeset-bot Bot commented Feb 27, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c0593e0

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

@pkg-pr-new

pkg-pr-new Bot commented Feb 27, 2026

Copy link
Copy Markdown
create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@12705

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@12705

miniflare

npm i https://pkg.pr.new/miniflare@12705

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@12705

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@12705

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@12705

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@12705

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@12705

wrangler

npm i https://pkg.pr.new/wrangler@12705

commit: c0593e0

@emily-shen emily-shen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

since this is used across a few packages, should we set the version in pnpm catalog?

@roli-lpci
roli-lpci force-pushed the chore/replace-glob-with-tinyglobby branch from 24991c6 to 6c97c1c Compare March 3, 2026 18:26
@workers-devprod

Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • @cloudflare/wrangler
Show detailed file reviewers
  • packages/create-cloudflare/package.json: [@cloudflare/wrangler]
  • packages/create-cloudflare/scripts/build.ts: [@cloudflare/wrangler]
  • packages/pages-shared/package.json: [@cloudflare/wrangler]
  • packages/vite-plugin-cloudflare/package.json: [@cloudflare/wrangler]
  • pnpm-lock.yaml: [@cloudflare/wrangler]
  • pnpm-workspace.yaml: [@cloudflare/wrangler]
  • tools/deployments/validate-package-dependencies.ts: [@cloudflare/wrangler]
  • tools/deployments/validate-private-packages.ts: [@cloudflare/wrangler]
  • tools/e2e/runIndividualE2EFiles.ts: [@cloudflare/wrangler]
  • tools/package.json: [@cloudflare/wrangler]

@43081j

43081j commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

all makes sense to me 👍

none of the glob usages seem complex so it should be a simple drop in.

lets see what CI thinks 👀

@petebacondarwin
petebacondarwin force-pushed the chore/replace-glob-with-tinyglobby branch from 6c97c1c to fce1e16 Compare April 19, 2026 09:42
@workers-devprod

workers-devprod commented Apr 19, 2026

Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • ✅ @cloudflare/wrangler
Show detailed file reviewers

roli-lpci and others added 2 commits April 19, 2026 10:43
Replace the `glob` package with the lighter `tinyglobby` across
tools, create-cloudflare, and pages-shared packages. This aligns
the rest of the monorepo with vite-plugin-cloudflare, which already
uses tinyglobby.

- tools: replace glob@11 with tinyglobby in e2e runner and
  deployment validation scripts
- create-cloudflare: replace glob@10 with tinyglobby in build script
- pages-shared: remove unused glob devDependency

tinyglobby has fewer dependencies (2 vs 17+ for globby/fast-glob)
and returns POSIX paths by default.

Addresses cloudflare#11854

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@petebacondarwin
petebacondarwin force-pushed the chore/replace-glob-with-tinyglobby branch from fce1e16 to ed7b1cc Compare April 19, 2026 09:44

@workers-devprod workers-devprod left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Codeowners reviews satisfied

@github-project-automation github-project-automation Bot moved this from Untriaged to Approved in workers-sdk Apr 19, 2026
@petebacondarwin
petebacondarwin merged commit 7329b3f into cloudflare:main Apr 19, 2026
61 of 63 checks passed
@github-project-automation github-project-automation Bot moved this from Approved to Done in workers-sdk Apr 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants