Migration guides
Every major release of @wallarm-org/design-system has a guide:
- v4.0.0: TreeBase is removed.
- v3.0.0: Avatar sizes and the user-item composition.
- v2.0.0: NumericBadge
typesplits intotypeandcolor. - v1.0.0: Table moves to TanStack Table v9.
Since v2.0.0, every breaking change ships a codemod in @wallarm-org/migrator
(v1.0.0 has none). Some codemods only report what to change by hand. Renovate can run it after a design-system upgrade, and you can run it by hand. The
Storybook upgrade guide
has the same instructions and lists every codemod with its version.
Run it by hand
After upgrading, run the migrator from the package directory with the version you upgraded from:
Usage
--from(required): the exact stable design-system version you are migrating from. A prerelease--fromis rejected: pass the stable version your code matches.--to: the target version (default: the installed@wallarm-org/design-system).--dry-run: print the changes, write nothing.--help,--version.
Without paths, tracked files under the current directory are scanned. The exit code is 0 for
completed runs (even with manual items) and 1 for usage or version errors.
When something needs a manual change, or a file could not be parsed, the migrator writes
wds-migration.md (its heading contains @wds-migration), and each manual spot also gets an
in-code marker right after the tag name:
Fix each marker, then delete the report.
Consumer setup
Renovate
Add a package rule to the repository config (or to a shared preset):
workingDirTemplateruns the migrator from each upgradedpackage.json's directory, so each package runs with its own--fromand only touches files under it. From the repo root, one package's--fromwould rewrite every package (for example, turn an already-migratedsmintolg). In a monorepo each package gets its ownwds-migration.md, hence the recursive filter.currentVersionis the locked version when a lockfile exists (Renovate has no separatelockedVersiontemplate), so commit your lockfile.installTools.nodeis needed on the default slim Renovate image (binarySource=install), wherenpxisn't onPATH. The-fullimage already has it. WithbinarySource=globalthe runner image has to provide node and npm.- On a self-hosted runner, allow the command in the admin config:
allowedCommands: ["^npx --yes @wallarm-org/migrator@latest --from \\d+\\.\\d+\\.\\d+\\S* --to \\d+\\.\\d+\\.\\d+\\S*$"]. prBodyNotesdeliberately avoids the literal@wds-migration, so the tracked Renovate config does not trip the CI check below.
CI check
Add one job that fails while manual steps remain:
Both the in-code markers and the report heading contain @wds-migration, so the job fails (and
prints the hits) until every marker is fixed and wds-migration.md is deleted. It works under
set -e.