Skip to content

refactor: replace tinyglobby with Node.js built-in glob APIs - #2375

Merged
ghostdevv merged 4 commits into
npmx-dev:mainfrom
trivikr:tinyglobby
Apr 4, 2026
Merged

refactor: replace tinyglobby with Node.js built-in glob APIs#2375
ghostdevv merged 4 commits into
npmx-dev:mainfrom
trivikr:tinyglobby

Conversation

@trivikr

Copy link
Copy Markdown
Contributor

🔗 Linked issue

N/A

🧭 Context

The codebase still used tinyglobby directly in a couple of Node-only module paths, even though the project now targets Node.js 24.x and already uses Node’s built-in glob APIs elsewhere. That left an unnecessary direct dependency and two code paths that could be simplified with platform APIs.

📚 Description

This PR replaces the remaining direct tinyglobby usage with Node’s built-in glob APIs.

@vercel

vercelBot commented Apr 3, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
npmx.devReadyReadyPreview, CommentApr 4, 2026 3:36pm
2 Skipped Deployments
ProjectDeploymentActionsUpdated (UTC)
docs.npmx.devIgnoredIgnoredPreviewApr 4, 2026 3:36pm
npmx-lunariaIgnoredIgnoredApr 4, 2026 3:36pm

Request Review

@codecov

codecovBot commented Apr 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@coderabbitai

coderabbitaiBot commented Apr 3, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 53b4a335-ee1f-49ca-95c5-03804cf9cbd1

📥 Commits

Reviewing files that changed from the base of the PR and between 15986b6 and 959ec76.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (3)
  • modules/blog.ts
  • modules/standard-site-sync.ts
  • package.json
💤 Files with no reviewable changes (1)
  • package.json
🚧 Files skipped from review as they are similar to previous changes (2)
  • modules/standard-site-sync.ts
  • modules/blog.ts

📝 Walkthrough

Walkthrough

Replaces runtime file-globbing from the tinyglobby package with Node.js built-in glob APIs. In modules/blog.ts, synchronous tinyglobby usage was removed in favour of async node:fs/promisesglob() plus Array.fromAsync(...). In modules/standard-site-sync.ts, dynamic tinyglobby import and absolute-pattern globbing were replaced by node:fs/promisesglob() with results joined to contentDir. The tinyglobby dependency was removed from package.json.

Possibly related PRs

Suggested reviewers

  • ghostdevv
  • danielroe
🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check nameStatusExplanation
Description check✅ PassedThe pull request description clearly explains the context and rationale for replacing tinyglobby with Node.js built-in glob APIs across the codebase.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@trivikr

Copy link
Copy Markdown
ContributorAuthor

Local testing in app/pages

$ nodeWelcome to Node.js v24.14.1.Type ".help" for more information.
> const tinyglobby = require("tinyglobby");undefined
> tinyglobby.globSync('blog/*.md'.replace(/\\/g, '/'))[ 'blog/alpha-release.md', 'blog/first-post.md' ]
> const fs = require("fs");undefined
> fs.globSync('*.md', { cwd: "blog" }).map(file =>`blog/${file}`)[ 'blog/alpha-release.md', 'blog/first-post.md' ]

Comment threadmodules/blog.ts Outdated
@ghostdevv

Copy link
Copy Markdown
Member

@ghostdevvghostdevv changed the title chore: replace tinyglobby with Node.js built-in glob APIsrefactor: replace tinyglobby with Node.js built-in glob APIsApr 4, 2026
@ghostdevv
ghostdevv added this pull request to the merge queueApr 4, 2026
Merged via the queue into npmx-dev:main with commit 23dc158Apr 4, 2026
21 checks passed
@github-actionsgithub-actionsBot mentioned this pull request Apr 4, 2026
@trivikr
trivikr deleted the tinyglobby branch April 4, 2026 19:09
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@trivikr@ghostdevv