| name | linear-upgrade-migration |
| description | Upgrade Linear SDK versions and handle breaking changes safely.
Use when updating to a new SDK version, handling deprecations,
or migrating between API versions.
Trigger: "upgrade linear SDK", "linear SDK migration",
"update linear", "linear breaking changes", "linear deprecation".
|
| allowed-tools | Read, Write, Edit, Bash(npm:*), Bash(npx:*), Grep |
| version | 1.12.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","linear","api","migration"] |
| compatibility | Designed for Claude Code, also compatible with Codex and OpenClaw |
Linear Upgrade Migration
Overview
Safely upgrade @linear/sdk versions with zero downtime. The SDK is auto-generated from Linear's GraphQL schema -- major versions can rename fields, change return types, add required parameters, or remove deprecated methods. This skill covers version checking, upgrade procedure, compatibility layers, and rollback.
Prerequisites
- Existing Linear integration with version control (Git)
- Test suite covering Linear SDK operations
- Understanding of semantic versioning
Instructions
Step 1: Check Current vs Latest Version
set -euo pipefail
npm list @linear/sdk 2>/dev/null || echo "Not installed"
npm view @linear/sdk version
npm view @linear/sdk versions --json | jq '.[-10:]'
Step 2: Review Changelog for Breaking Changes
set -euo pipefail
npm view @linear/sdk repository.url
Common breaking changes between major versions:
- Renamed fields: e.g.,
issue.state property vs lazy relation
- Changed return types: direct value to paginated connection
- New required parameters: mutations gaining mandatory fields
- Removed methods: deprecated methods dropped
- ESM/CJS: module system changes
Step 3: Create Upgrade Branch and Install
set -euo pipefail
git checkout -b upgrade/linear-sdk-$(npm view @linear/sdk version)
npm install @linear/sdk@latest
npx tsc --noEmit 2>&1 | head -50
Step 4: Fix Type Errors with Compatibility Layer