Skip to content

Conversation

benmccann
Copy link
Contributor

@benmccann benmccann commented Oct 7, 2025

fast-glob has 17 dependencies compared to just two for tinyglobby

Vite uses tinyglobby so it's already in the dependency tree. nitropack v3 does as well, so once the upgrade to the latest nitropack happens, tanstack will be fully on tinyglobby

Summary by CodeRabbit

  • New Features

    • No user-facing changes.
  • Refactor

    • Replaced the underlying file-matching library in router utilities while preserving behavior and public APIs.
  • Chores

    • Updated dependencies to remove an old globbing library and add a new one.
  • Documentation

    • No documentation updates required.
  • Tests

    • No test changes.

Copy link
Contributor

coderabbitai bot commented Oct 7, 2025

Walkthrough

Replaces fast-glob with tinyglobby in router-utils: updates package.json dependency and switches the import and usage in copy-files-plugin.ts to use tinyglobby’s glob function. No API or behavior changes beyond the library swap.

Changes

Cohort / File(s) Summary of Changes
Dependency update
packages/router-utils/package.json
Removed dependency fast-glob; added tinyglobby. Kept other dependencies unchanged.
Glob implementation swap
packages/router-utils/src/copy-files-plugin.ts
Replaced import and usage of fast-glob with { glob } from tinyglobby; adjusted call from fg(pattern, { cwd }) to glob(pattern, { cwd }). No public API changes; same error and copy flow.

Sequence Diagram(s)

sequenceDiagram
  participant Build as Build Tool
  participant Plugin as CopyFilesPlugin
  participant Glob as tinyglobby.glob
  participant FS as File System

  Build->>Plugin: run(patterns, fromDir, toDir)
  Plugin->>Glob: glob(patterns, { cwd: fromDir })
  Glob-->>Plugin: entries[]
  alt no entries
    Plugin-->>Build: throw Error("No files matched")
  else entries found
    loop for each entry
      Plugin->>FS: ensureDir(toDir/<entryDir>)
      Plugin->>FS: copy(fromDir/<entry>, toDir/<entry>)
    end
    Plugin-->>Build: done
  end

  Note over Plugin,Glob: Glob provider changed from fast-glob to tinyglobby
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

A rabbit hops through paths so sly,
Swaps globbing gears with twinkling eye.
From fast to tiny, patterns flow—
The files still find the way to go.
Tap-tap, copy, burrow neat—
New trails, same treats, deliveries complete! 🐇✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title “chore: switch to tinyglobby” clearly and concisely summarizes the main change of replacing fast-glob with tinyglobby, matching the PR’s intent and scope without unnecessary detail or ambiguity.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a5fdf29 and caa194c.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (2)
  • packages/router-utils/package.json (1 hunks)
  • packages/router-utils/src/copy-files-plugin.ts (2 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/package.json

📄 CodeRabbit inference engine (AGENTS.md)

Use workspace:* protocol for internal dependencies in package.json files

Files:

  • packages/router-utils/package.json
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Use TypeScript in strict mode with extensive type safety across the codebase

Files:

  • packages/router-utils/src/copy-files-plugin.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Preview
  • GitHub Check: Test
🔇 Additional comments (3)
packages/router-utils/package.json (1)

72-73: LGTM! Dependency swap looks good.

The version ^0.2.15 is the latest stable release of tinyglobby. The change reduces dependencies from 17 (fast-glob) to 2 (tinyglobby) as mentioned in the PR description.

packages/router-utils/src/copy-files-plugin.ts (2)

3-3: LGTM! Import updated correctly.

The named import { glob } matches tinyglobby's API.


18-18: Verify glob behavior matches expectations.

The API usage is correct. However, since only the cwd option is specified, the function relies on tinyglobby's default behavior for onlyFiles, dot, followSymbolicLinks, etc. While tinyglobby aims for behavioral parity with fast-glob in common cases, defaults may differ.

Please verify that the glob matching behavior remains consistent, especially for:

  • Dotfiles (whether hidden files are matched)
  • Directories vs. files (whether directories are included in results)
  • Symlinks (whether symbolic links are followed)

You can test this by running the plugin with various patterns and comparing results before/after the change. Based on learnings.


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.

Copy link

nx-cloud bot commented Oct 7, 2025

View your CI Pipeline Execution ↗ for commit caa194c

Command Status Duration Result
nx affected --targets=test:eslint,test:unit,tes... ✅ Succeeded 6m 3s View ↗
nx run-many --target=build --exclude=examples/*... ✅ Succeeded 36s View ↗

☁️ Nx Cloud last updated this comment at 2025-10-07 14:55:48 UTC

Copy link

pkg-pr-new bot commented Oct 7, 2025

More templates

@tanstack/arktype-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/arktype-adapter@5395

@tanstack/directive-functions-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/directive-functions-plugin@5395

@tanstack/eslint-plugin-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/eslint-plugin-router@5395

@tanstack/history

npm i https://pkg.pr.new/TanStack/router/@tanstack/history@5395

@tanstack/nitro-v2-vite-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/nitro-v2-vite-plugin@5395

@tanstack/react-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router@5395

@tanstack/react-router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router-devtools@5395

@tanstack/react-router-ssr-query

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router-ssr-query@5395

@tanstack/react-start

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start@5395

@tanstack/react-start-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-client@5395

@tanstack/react-start-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-server@5395

@tanstack/router-cli

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-cli@5395

@tanstack/router-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-core@5395

@tanstack/router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-devtools@5395

@tanstack/router-devtools-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-devtools-core@5395

@tanstack/router-generator

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-generator@5395

@tanstack/router-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-plugin@5395

@tanstack/router-ssr-query-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-ssr-query-core@5395

@tanstack/router-utils

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-utils@5395

@tanstack/router-vite-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-vite-plugin@5395

@tanstack/server-functions-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/server-functions-plugin@5395

@tanstack/solid-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router@5395

@tanstack/solid-router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router-devtools@5395

@tanstack/solid-start

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start@5395

@tanstack/solid-start-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-client@5395

@tanstack/solid-start-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-server@5395

@tanstack/start-client-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-client-core@5395

@tanstack/start-plugin-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-plugin-core@5395

@tanstack/start-server-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-core@5395

@tanstack/start-static-server-functions

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-static-server-functions@5395

@tanstack/start-storage-context

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-storage-context@5395

@tanstack/valibot-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/valibot-adapter@5395

@tanstack/virtual-file-routes

npm i https://pkg.pr.new/TanStack/router/@tanstack/virtual-file-routes@5395

@tanstack/zod-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/zod-adapter@5395

commit: caa194c

@schiller-manuel schiller-manuel merged commit 6de342b into TanStack:main Oct 8, 2025
6 checks passed
LadyBluenotes pushed a commit to LadyBluenotes/router that referenced this pull request Oct 10, 2025
LadyBluenotes pushed a commit to LadyBluenotes/router that referenced this pull request Oct 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants