一键导入
upgrade-package
Systematic approach for upgrading packages in the Baseplate monorepo, ensuring consistency between monorepo dependencies and generated project code.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Systematic approach for upgrading packages in the Baseplate monorepo, ensuring consistency between monorepo dependencies and generated project code.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Workflow for adding a new UI component to ui-components (with Storybook + optional tests) and optionally to the react-generators template system.
Step-by-step workflow for creating a new Baseplate plugin package, including root configuration files, source structure, and platform modules.
Workflow for modifying generated code in Baseplate, including template extraction, generator updates, and project synchronization.
| name | upgrade-package |
| description | Systematic approach for upgrading packages in the Baseplate monorepo, ensuring consistency between monorepo dependencies and generated project code. |
| argument-hint | ["package-name"] |
Use this skill to upgrade the following packages in the Baseplate monorepo: $ARGUMENTS
Baseplate has a dual-location package management system:
pnpm-workspace.yaml) - Defines versions for the Baseplate development environmentBoth locations must be kept in sync to ensure generated projects use the intended package versions.
Before upgrading, identify where the package is defined:
Common generator constants locations:
packages/react-generators/src/constants/react-packages.ts - React, Vite, Tailwind, UI librariespackages/fastify-generators/src/constants/fastify-packages.ts - Fastify, server-side packagespackages/core-generators/src/constants/core-packages.ts - Core Node.js utilitiesSearch commands:
# Search for package in catalog
grep "package-name" pnpm-workspace.yaml
# Search for package in generator constants
grep -r "package-name" packages/*/src/constants/
# Get latest version from npm
pnpm view package-name version
# Get all available versions (helpful for major version planning)
pnpm view package-name versions --json
Before upgrading, especially for major versions:
Edit pnpm-workspace.yaml:
catalog:
package-name: NEW_VERSION
Find and update the appropriate constants file:
export const PACKAGES = {
'package-name': 'NEW_VERSION',
} as const;
# Install new versions
pnpm install
# Resolve duplicate dependencies and conflicts
pnpm dedupe
Note: pnpm dedupe is crucial as it resolves version conflicts that can occur when upgrading packages with complex dependency trees.
Update all example projects to use the new package versions:
mcp__baseplate_dev_server__sync_all_projects({
overwrite: true,
});
This command:
examples/ directorypackage.json files with new versions# Run type checking across all packages
pnpm typecheck
# Run linting (with auto-fix)
pnpm lint:only:affected -- --fix
# Run tests if available
pnpm test:affected
# Build all packages to ensure compatibility
pnpm build
After verifying the monorepo, also check that example projects still build and typecheck correctly. Example projects are standalone monorepos not included in the pnpm workspace, so use the run:example script:
# Install updated dependencies in an example project
pnpm run:example todo-with-better-auth -- pnpm install
# Typecheck an example project
pnpm run:example todo-with-better-auth -- pnpm typecheck
# Build an example project
pnpm run:example todo-with-better-auth -- pnpm build
Repeat for each example that may be affected by the upgrade. To run a command across all examples at once:
pnpm run:all -- pnpm typecheck
After successfully upgrading packages, create a changeset:
echo "---
'@baseplate-dev/react-generators': patch
---
Upgrade package-name to X.Y.Z
- package-name: OLD_VERSION → NEW_VERSION" > .changeset/upgrade-package-name.md
Changeset guidelines:
Location: packages/react-generators/src/constants/react-packages.ts
Common packages: react, react-dom, vite, @vitejs/plugin-react, tailwindcss, @tailwindcss/vite, @tanstack/react-router, @apollo/client, graphql
Location: packages/fastify-generators/src/constants/fastify-packages.ts
Common packages: fastify, @pothos/core, prisma, zod
Location: packages/core-generators/src/constants/core-packages.ts
Common packages: typescript, eslint, prettier, vitest
pnpm dedupe to resolve conflicts@types/* packages if neededpnpm run:example <name> -- pnpm typecheck)