What problem does it solve?
Upgrading @skyscanner/backpack-web from v41 to v42 introduces breaking changes—BpkButtonV2 removal, deep import elimination, and a rewritten BpkAutosuggest API—that require coordinated edits across hundreds of files, which is error-prone when done manually.
Core Features & Use Cases
- Scripted Button Migration: Renames BpkButtonV2 to BpkButton, fixes deep src/ imports, and converts named imports to default imports using a line-by-line parser that handles multi-line import statements.
- Guided Autosuggest Migration: Walks through each autosuggest file individually, applying the 12 documented breaking changes (BC-1 through BC-12) covering callback signatures, uncontrolled input patterns, ref forwarding, and race-condition fixes.
- Test Migration & Verification: Provides jsdom mocking patterns for @floating-ui/react, updated test interaction patterns, and a phased typecheck/test verification workflow.
- Use Case: A team upgrading a large React monorepo to Backpack v42 uses this skill to discover 260+ affected button files, migrate them via script, then carefully migrate each autosuggest wrapper with per-file review.
Quick Start
Migrate this codebase from @skyscanner/backpack-web v41 to v42, starting with a discovery scan of all affected files.