Upgrading
How to upgrade StartupKit packages and configuration
The upgrade command keeps your StartupKit project up to date with the latest packages and configuration.
Basic Usage
npx startupkit upgradeThis upgrades both:
- Packages - All
@startupkit/*npm packages - Config - Configuration files from the latest template
Command Options
npx startupkit upgrade [options]| Option | Description |
|---|---|
--packages | Only upgrade npm packages |
--config | Only sync config files |
--dry-run | Preview changes without applying |
Examples
Upgrade Everything
npx startupkit upgradeUpgrade Packages Only
npx startupkit upgrade --packagesUpgrades @startupkit/analytics, @startupkit/auth, @startupkit/seo, etc.
Sync Config Only
npx startupkit upgrade --configSyncs configuration files from the latest template:
biome.jsoncturbo.json- TypeScript configs
Preview Changes
npx startupkit upgrade --dry-runShows what would change without modifying files.
What Gets Upgraded
Package Upgrades (--packages)
Updates all @startupkit/* dependencies in your workspace:
{
"dependencies": {
"@startupkit/analytics": "^1.2.0", // Updated
"@startupkit/auth": "^1.2.0", // Updated
"@startupkit/seo": "^1.2.0" // Updated
}
}Config Sync (--config)
Syncs configuration files that may have changed upstream:
| File | Description |
|---|---|
turbo.json | Turbo pipeline configuration |
biome.jsonc | Linting and formatting rules |
config/typescript/*.json | TypeScript configurations |
.github/workflows/* | CI/CD workflows |
Upgrade Strategy
The upgrade command follows these principles:
- Non-destructive - Won't overwrite your custom code
- Additive for config - Adds new options, preserves existing
- Semantic versioning - Follows semver for packages
When to Upgrade
- After major releases - New features and improvements
- Security updates - Patch vulnerabilities in dependencies
- Bug fixes - Resolve issues reported by the community
Check the changelog for release notes.
Manual Upgrades
If you prefer manual control:
Upgrade npm Packages
pnpm update @startupkit/analytics @startupkit/auth @startupkit/seoSync Specific Config
# Get latest turbo.json
npx degit ian/startupkit/templates/repo/turbo.json turbo.json
# Get latest biome config
npx degit ian/startupkit/templates/repo/biome.jsonc biome.jsoncHandling Conflicts
If config sync encounters conflicts:
- Backup your changes - The CLI won't overwrite without asking
- Review diffs - Use
--dry-runto see what would change - Merge manually - For complex customizations
Post-Upgrade Steps
After upgrading:
# Install any new dependencies
pnpm install
# Run type checking
pnpm typecheck
# Run linting
pnpm lint
# Test your app
pnpm devTroubleshooting
Version Conflicts
If you see peer dependency warnings:
pnpm install --forceBreaking Changes
Check migration guides in release notes for major version bumps.
Config Overwritten
If you accidentally overwrote custom config:
git checkout -- turbo.json # Restore from gitSee Troubleshooting for more solutions.