fix(upgrade): improve CLI usability for monorepos and CI#7874
fix(upgrade): improve CLI usability for monorepos and CI#7874jacekradko wants to merge 1 commit intomainfrom
Conversation
- Traverse parent directories for lockfiles and packageManager field in package.json - Add -w flag for pnpm install/remove at workspace roots - Resolve catalog: protocol versions from pnpm-workspace.yaml - Show actionable example commands in non-interactive error messages - Pass verbose: 0 to jscodeshift for error-level file path logging
|
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
@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/hono
@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: |
|
No actionable comments were generated in the recent review. 🎉 📝 WalkthroughWalkthroughThis pull request enhances the Clerk upgrade tool to support pnpm catalog dependency resolution and improves user guidance. Key changes include: adding test fixtures for Next.js with catalog dependencies; implementing catalog version resolution by parsing pnpm-workspace.yaml files; enhancing package manager detection to traverse parent directories and support pnpm workspaces with -w flag handling; updating CLI error messages with actionable examples for non-interactive mode; refining codemod result reporting to distinguish error and success states; and expanding test coverage for new functionality across SDK detection and CLI scenarios. 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
Summary
detectPackageManager()now walks up the directory tree to find lockfiles and thepackageManagerfield inpackage.json(Corepack), fixing detection in monorepo subdirectories-wflag:getInstallCommand()andgetUninstallCommand()automatically add-wwhen the target directory containspnpm-workspace.yaml, preventing "Running this command will add the dependency to the workspace root" errorscatalog:protocol versions:getSdkVersion()now resolvescatalog:version specifiers by parsingpnpm-workspace.yamlcatalogs, enabling automatic version detection without requiring--releaseverbose: 0to jscodeshift so error-level logging (file paths + error messages) is printed instead of being swallowed; usesspinner.error()when errors occurTest plan
pnpm buildsucceedsnpx @clerk/upgrade --sdk=nextjs --dir=<monorepo-subdirectory>and verify package manager is detected from parentcatalog:protocol and verify version is resolved--sdkand verify error shows example commandSummary by CodeRabbit
Release Notes
New Features
Improvements