evaluating-sdk-internal-updates

Evaluates sdk-internal version bump PRs for compile-time and runtime breaking changes.

13.7k|2.0k|Updated Mar 9, 2016
One-click install
npx skills add https://github.com/bitwarden/clients --skill evaluating-sdk-internal-updates
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: evaluating-sdk-internal-updates
Source: https://github.com/bitwarden/clients/tree/main/.claude/skills/evaluating-sdk-internal-updates
Command: npx skills add https://github.com/bitwarden/clients --skill evaluating-sdk-internal-updates

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires typescript, and includes scripts (resource) components.

What problem does it solve?

Reviewing an "Update sdk-internal to" pull request in bitwarden/clients is risky because the SDK's TypeScript surface is not committed anywhere, so breaking changes hide inside published npm tarballs and can cause compile errors or silent runtime data corruption.

Core Features & Use Cases

  • Surface Diffing: Reconstructs the TypeScript declaration surface from two published @bitwarden/sdk-internal tarballs and diffs it at member granularity (REMOVED, ADDED, MUTATED).
  • Commit Range Analysis: Walks the sdk-internal commit range between versions, classifying each hunk as breaking or safe, including serde attribute and enum wire-value changes.
  • Call Site Mapping: Greps the repo for every affected symbol, including blind spots like @ts-strict-ignore files, app spec files, and jest.mock factories.
  • Use Case: When a PR bumps @bitwarden/sdk-internal in package.json, run this Skill to produce a structured report of compile-time breaks and runtime considerations, then apply in-scope fixes.

Quick Start

Ask the assistant to evaluate the sdk-internal bump in the current PR against the sibling sdk-internal clone and report any breaking changes.

Frequently Asked Questions about evaluating-sdk-internal-updates

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I review an sdk-internal version bump PR in bitwarden/clients?

Run the sdk-surface-diff.mjs script with the old and new versions to diff the published TypeScript declarations, then walk the sdk-internal commit range and grep the repo for call sites of every changed symbol. Report findings under compile-time breaks and runtime considerations before fixing.

How do I find breaking changes between two @bitwarden/sdk-internal versions?

Use node sdk-surface-diff.mjs <old-version> <new-version>, optionally with --commercial. It downloads both npm tarballs, extracts bitwarden_wasm_internal.d.ts, and prints REMOVED, ADDED, and MUTATED declarations keyed per member.

Does the sdk-internal version number map to a commit SHA?

No, the npm version encodes no commit. The sdk-internal SHA lives in the VERSION file inside the published tarball, which the diff script reads to determine the commit range to inspect.

Why can an sdk-internal bump break the build even when type checking passes?

The root tsconfig sets skipLibCheck and app spec files are excluded from type checking, while @ts-strict-ignore files discard errors. Enum member renumbering also compiles cleanly but corrupts wire values at runtime.

What prerequisites are required to evaluate an sdk-internal update?

A sibling clone of bitwarden/sdk-internal must exist at ../sdk-internal, matching where CI places it. The Skill does not clone it for you and stops if the clone is missing.