Skip to content

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

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

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

Conversation

@trivikr
Copy link
Copy Markdown
Contributor

@trivikr trivikr commented Apr 3, 2026

🔗 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
Copy link
Copy Markdown

vercel bot commented Apr 3, 2026

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

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Apr 4, 2026 3:36pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Apr 4, 2026 3:36pm
npmx-lunaria Ignored Ignored Apr 4, 2026 3:36pm

Request Review

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 3, 2026

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
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 3, 2026

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/promises glob() plus Array.fromAsync(...). In modules/standard-site-sync.ts, dynamic tinyglobby import and absolute-pattern globbing were replaced by node:fs/promises glob() 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 name Status Explanation
Description check ✅ Passed The 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
Contributor Author

trivikr commented Apr 3, 2026

Local testing in app/pages

$ node
Welcome 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' ]

@ghostdevv
Copy link
Copy Markdown
Contributor

@ghostdevv ghostdevv changed the title chore: replace tinyglobby with Node.js built-in glob APIs refactor: replace tinyglobby with Node.js built-in glob APIs Apr 4, 2026
@ghostdevv ghostdevv added this pull request to the merge queue Apr 4, 2026
Merged via the queue into npmx-dev:main with commit 23dc158 Apr 4, 2026
21 checks passed
@trivikr trivikr deleted the tinyglobby branch April 4, 2026 19:09
Sign up for free to 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