-
Notifications
You must be signed in to change notification settings - Fork 417
chore(upgrade): Migrate to tinyglobby #7415
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🦋 Changeset detectedLatest commit: d1eb6cd The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
WalkthroughReplaces the globby dependency with tinyglobby across the monorepo and updates source imports/calls to use tinyglobby's glob API for file discovery in scripts and tooling. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ 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). (24)
🔇 Additional comments (1)
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/upgrade/src/runner.js (1)
71-76: Glob call migration is correct; consider explicitly pinningonlyFilesThe switch to
glob('**/*', { cwd, absolute: true, ignore })matches tinyglobby’s API and options (cwd,absolute,ignore) and keeps behavior consistent with globby, sinceonlyFilesdefaults totrueand you then safelyreadFileeach path.(superchupu.dev)As a small defensive tweak, you could explicitly set
onlyFiles: trueto encode the intent and guard against any future default change in tinyglobby:- const files = await glob('**/*', { - cwd, - absolute: true, - ignore: [...GLOBBY_IGNORE, ...(options.ignore || [])], - }); + const files = await glob('**/*', { + cwd, + absolute: true, + onlyFiles: true, + ignore: [...GLOBBY_IGNORE, ...(options.ignore || [])], + });
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (9)
package.json(1 hunks)packages/dev-cli/package.json(1 hunks)packages/dev-cli/src/utils/getClerkPackages.js(2 hunks)packages/upgrade/package.json(1 hunks)packages/upgrade/src/codemods/index.js(2 hunks)packages/upgrade/src/runner.js(2 hunks)scripts/format-non-workspace.mjs(3 hunks)scripts/notify.mjs(1 hunks)scripts/renovate-config-generator.mjs(2 hunks)
🧰 Additional context used
📓 Path-based instructions (9)
**/*.{js,jsx,ts,tsx,json,md,yml,yaml}
📄 CodeRabbit inference engine (.cursor/rules/development.mdc)
Use Prettier for consistent code formatting
Files:
packages/dev-cli/package.jsonpackages/dev-cli/src/utils/getClerkPackages.jspackages/upgrade/src/codemods/index.jspackages/upgrade/package.jsonpackage.jsonpackages/upgrade/src/runner.js
packages/*/package.json
📄 CodeRabbit inference engine (.cursor/rules/development.mdc)
packages/*/package.json: Packages should export TypeScript types alongside runtime code
Follow semantic versioning for all packagesAll packages must be published under @clerk namespace
packages/*/package.json: Framework packages should depend on@clerk/clerk-jsfor core functionality
@clerk/sharedshould be a common dependency for most packages in the monorepo
Files:
packages/dev-cli/package.jsonpackages/upgrade/package.json
**/package.json
📄 CodeRabbit inference engine (.cursor/rules/global.mdc)
Use pnpm as the package manager for this monorepo
Files:
packages/dev-cli/package.jsonpackages/upgrade/package.jsonpackage.json
**/*.{js,ts,jsx,tsx,json,md,yml,yaml}
📄 CodeRabbit inference engine (.cursor/rules/monorepo.mdc)
Use Prettier for code formatting across all packages
Files:
packages/dev-cli/package.jsonpackages/dev-cli/src/utils/getClerkPackages.jspackages/upgrade/src/codemods/index.jspackages/upgrade/package.jsonpackage.jsonpackages/upgrade/src/runner.js
**/*.{js,jsx,ts,tsx}
📄 CodeRabbit inference engine (.cursor/rules/development.mdc)
All code must pass ESLint checks with the project's configuration
Files:
packages/dev-cli/src/utils/getClerkPackages.jspackages/upgrade/src/codemods/index.jspackages/upgrade/src/runner.js
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (.cursor/rules/development.mdc)
Follow established naming conventions (PascalCase for components, camelCase for variables)
Files:
packages/dev-cli/src/utils/getClerkPackages.jspackages/upgrade/src/codemods/index.jspackages/upgrade/src/runner.js
packages/**/src/**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (.cursor/rules/development.mdc)
packages/**/src/**/*.{ts,tsx,js,jsx}: Maintain comprehensive JSDoc comments for public APIs
Use tree-shaking friendly exports
Validate all inputs and sanitize outputs
All public APIs must be documented with JSDoc
Use dynamic imports for optional features
Provide meaningful error messages to developers
Include error recovery suggestions where applicable
Log errors appropriately for debugging
Lazy load components and features when possible
Implement proper caching strategies
Use efficient data structures and algorithms
Implement proper logging with different levels
Files:
packages/dev-cli/src/utils/getClerkPackages.jspackages/upgrade/src/codemods/index.jspackages/upgrade/src/runner.js
**/*.{js,ts,jsx,tsx}
📄 CodeRabbit inference engine (.cursor/rules/monorepo.mdc)
Use ESLint with custom configurations tailored for different package types
Files:
packages/dev-cli/src/utils/getClerkPackages.jspackages/upgrade/src/codemods/index.jspackages/upgrade/src/runner.js
package.json
📄 CodeRabbit inference engine (.cursor/rules/development.mdc)
package.json: Requires Node.js 18.17.0+ and pnpm 9.15.9+
Regularly update dependencies
Files:
package.json
🧬 Code graph analysis (4)
packages/dev-cli/src/utils/getClerkPackages.js (1)
packages/upgrade/src/runner.js (1)
glob(40-40)
scripts/format-non-workspace.mjs (1)
packages/upgrade/src/runner.js (2)
matches(87-87)glob(40-40)
packages/upgrade/src/codemods/index.js (5)
scripts/renovate-config-generator.mjs (1)
__dirname(8-8)packages/upgrade/src/__tests__/helpers/create-fixture.js (1)
__dirname(6-6)packages/upgrade/src/__tests__/integration/cli.test.js (1)
__dirname(12-12)packages/upgrade/src/config.js (1)
__dirname(7-7)packages/upgrade/src/runner.js (2)
glob(40-40)GLOBBY_IGNORE(11-31)
scripts/renovate-config-generator.mjs (1)
packages/upgrade/src/runner.js (2)
files(72-76)glob(40-40)
⏰ 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). (26)
- GitHub Check: Integration Tests (quickstart, chrome, 16)
- GitHub Check: Integration Tests (nextjs, chrome, 15)
- GitHub Check: Integration Tests (billing, chrome)
- GitHub Check: Integration Tests (quickstart, chrome, 15)
- GitHub Check: Integration Tests (nextjs, chrome, 16)
- GitHub Check: Integration Tests (machine, chrome, RQ)
- GitHub Check: Integration Tests (machine, chrome)
- GitHub Check: Integration Tests (custom, chrome)
- GitHub Check: Integration Tests (nextjs, chrome, 16, RQ)
- GitHub Check: Integration Tests (vue, chrome)
- GitHub Check: Integration Tests (generic, chrome)
- GitHub Check: Integration Tests (handshake, chrome)
- GitHub Check: Integration Tests (react-router, chrome)
- GitHub Check: Integration Tests (nuxt, chrome)
- GitHub Check: Integration Tests (billing, chrome, RQ)
- GitHub Check: Integration Tests (astro, chrome)
- GitHub Check: Integration Tests (sessions:staging, chrome)
- GitHub Check: Integration Tests (tanstack-react-start, chrome)
- GitHub Check: Integration Tests (sessions, chrome)
- GitHub Check: Integration Tests (handshake:staging, chrome)
- GitHub Check: Integration Tests (localhost, chrome)
- GitHub Check: Integration Tests (ap-flows, chrome)
- GitHub Check: Integration Tests (express, chrome)
- GitHub Check: Build Packages
- GitHub Check: semgrep-cloud-platform/scan
- GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (9)
scripts/renovate-config-generator.mjs (1)
5-5: LGTM! Import and usage updated correctly.The migration from
globbytotinyglobby'sglobfunction is straightforward here. The pattern andcwdoption are compatible with tinyglobby's API.Also applies to: 113-113
scripts/notify.mjs (1)
4-4: LGTM! Migration to tinyglobby completed correctly.The import and usage are properly updated. The pattern array and
cwdoption are standard glob features that tinyglobby supports.Also applies to: 145-145
packages/dev-cli/package.json (1)
30-31: LGTM! Dependency updated correctly.The migration from
globbytotinyglobbyin the dependencies is consistent with the broader repository changes.packages/upgrade/package.json (1)
45-46: LGTM! Dependency updated correctly.The migration from
globbytotinyglobbyin the dependencies aligns with the codebase-wide migration.scripts/format-non-workspace.mjs (1)
3-3: LGTM! Migration completed correctly.The import and usage of
globfromtinyglobbyare properly updated. Theignoreoption is a standard glob feature that tinyglobby supports.Also applies to: 19-30
packages/upgrade/src/codemods/index.js (1)
5-5: Good improvement avoiding shadowing theglobimport.The migration to
tinyglobbyis implemented correctly. Renaming the parameter fromglobtopatternsmakes the parameter name more descriptive and conventional. The single internal caller inpackages/upgrade/src/runner.jsuses positional arguments (runCodemod(transform, glob, options)), so this parameter rename does not break the existing call.packages/dev-cli/src/utils/getClerkPackages.js (1)
4-4: Negation pattern is compatible with tinyglobby.tinyglobby supports negation patterns (prefixed with
!) in the patterns array, so'!*node_modules*'will work as intended to exclude node_modules directories. The syntax used at line 20 is valid and correct. Note that the codebase uses two different approaches for exclusions—negation patterns here and anignoreoption elsewhere (e.g., in packages/upgrade). Consider standardizing on one approach for consistency.package.json (1)
140-140: No action required. Version 0.2.15 is the latest stable release of tinyglobby and fully supports negation patterns, theignoreoption,cwd, andabsoluteoptions as required.packages/upgrade/src/runner.js (1)
6-6: tinyglobby import usage looks correctImporting
globdirectly fromtinyglobbymatches the documented API and is tree‑shaking friendly; no issues here.(superchupu.dev)
@clerk/agent-toolkit
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/dev-cli
@clerk/expo
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/localizations
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
brkalow
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
Description
Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.