chore(deps): switch to tinyglobby
🚨 IMPORTANT: Please do not create a Pull Request without creating an issue first.
Any change needs to be discussed before proceeding. Failure to do so may result in the rejection of the pull request.
Description
http://npmgraph.js.org/?q=globby - 23 dependencies http://npmgraph.js.org/?q=tinyglobby - 2 dependencies
Type of change
Please delete options that are not relevant.
- [x] Bug fix (non-breaking change which fixes an issue)
How Has This Been Tested?
Existing test suite
Checklist:
- [x] I have followed the CONTRIBUTING doc and the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [x] New and existing unit tests and linter rules pass locally with my changes
- [x] Any dependent changes have been merged and published in downstream modules
⚠️ No Changeset found
Latest commit: 498841b454898fdb55f8f4ac72a5d9248d2642b8
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
📝 Walkthrough
Summary by CodeRabbit
-
Refactor
- Migrated globbing from globby to tinyglobby across loaders and tooling for consistent async/sync file matching.
- Updated glob option types in loader options to tinyglobby’s GlobOptions.
-
Tests
- Adjusted tests to use tinyglobby’s synchronous API.
-
Chores
- Replaced globby with tinyglobby in package dependencies.
- Updated build script to use tinyglobby for workspace discovery.
Walkthrough
Replaced occurrences of the globby library with tinyglobby across package manifests, loader implementations, tests, and scripts; updated option types from GlobbyOptions to GlobOptions; switched sync/async calls to use globSync/tinyglobby; added cwd URL-to-path normalization in packages/load-files.
Changes
| Cohort / File(s) | Change Summary |
|---|---|
Repository root package.json |
Removed globby devDependency and added tinyglobby devDependency. |
Package dependency swaps packages/load-files/package.json, packages/loaders/code-file/package.json, packages/loaders/graphql-file/package.json, packages/loaders/json-file/package.json |
Replaced globby with tinyglobby (^0.2.14) in package dependencies. |
Load utilities & loaders (implementation + types) packages/load-files/src/index.ts, packages/loaders/code-file/src/index.ts, packages/loaders/graphql-file/src/index.ts, packages/loaders/json-file/src/index.ts |
Replaced globby imports/calls with tinyglobby (async glob alias) and globSync; changed option types from GlobbyOptions → GlobOptions; updated helper signatures and called APIs; added fileURLToPath normalization in packages/load-files/src/index.ts. |
Tests packages/load/tests/loaders/documents/documents-from-glob.spec.ts |
Switched synchronous test globbing from globby.sync(...) to globSync(...) from tinyglobby; test logic unchanged. |
Scripts scripts/build-api-docs.ts |
Replaced globby.sync(...) with globSync(...) from tinyglobby for workspace package discovery. |
Sequence Diagram(s)
sequenceDiagram
participant Caller
participant Loader
participant tinyglobby
rect rgba(200,230,255,0.12)
Caller->>Loader: request files(pattern, cwd?, options)
Loader->>Loader: normalize cwd (if URL -> fileURLToPath)
alt async
Loader->>tinyglobby: tinyglobby(pattern, GlobOptions)
else sync
Loader->>tinyglobby: globSync(pattern, GlobOptions)
end
tinyglobby-->>Loader: matched file paths
Loader-->>Caller: return file paths / loaded results
end
Estimated code review effort
🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related issues
- ardatan/graphql-tools#6895 — This PR implements the migration from
globbytotinyglobbyacross loaders and related call sites requested in that issue.
Pre-merge checks (2 passed, 1 warning)
❌ 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 |
|---|---|---|
| Title Check | ✅ Passed | The title "chore(deps): switch to tinyglobby" is a short, single sentence that accurately and directly summarizes the primary change (replacing globby with tinyglobby) and is concise and clear for teammates scanning history. It contains no noise or unrelated information. |
| Description Check | ✅ Passed | The PR description directly relates to the changeset: it explains the dependency swap, gives motivation (npmgraph links showing fewer transitive deps), notes test status and checklist items, and thus passes this lenient relevance check. The description is on-topic and documents the intent and validation performed. |
Poem
I hopped through lines with eager nose,
Replaced large globs with tiny those.
Patterns found, paths set free,
Loaders hum in harmony.
A rabbit cheers — lighter trees and code 🐇✨
[!TIP]
👮 Agentic pre-merge checks are now available in preview!
Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
- Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
- Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.
Please see the documentation for more information.
Example:
reviews: pre_merge_checks: custom_checks: - name: "Undocumented Breaking Changes" mode: "warning" instructions: | Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post.
✨ Finishing touches
- [ ] 📝 Generate Docstrings
🧪 Generate unit tests
- [ ] Create PR with unit tests
- [ ] Post copyable unit tests in a comment
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.
Comment @coderabbitai help to get the list of available commands and usage tips.
Thanks for the PR! There is also another open PR related to this; https://github.com/ardatan/graphql-tools/pull/6896
Oh! Then I will close this one. What's blocking the other one?
It is a breaking change because we use the existing package's options directly. We hold it until a new major release.
The other PR was closed, so I'm reopening this one