Every @cratis/components.migrator@4.1.0 CLI fails its own compatibility preflight and exits before doing any work:
$ npx --package "@cratis/components.migrator@4.1.0" cratis-components-change-handler --check ./Source
Compatibility preflight failed: Bundled compatibility manifest has stale migrator package metadata.
Expected the codemod to report what it would rewrite. Instead nothing runs — this affects cratis-components-change-handler, cratis-components-button-variant-tone, and cratis-components-remove-root-namespace-imports alike, since they all share lib/compatibility.js.
Cause
compat-manifest.json bundled in the 4.1.0 tarball still carries the 4.0.0 entry:
{ "name": "@cratis/components.migrator", "role": "migrator", "version": "4.0.0",
"releaseMajorRange": ">=4 <5", "independentRelease": false, ... }
while package.json says "version": "4.1.0". lib/compatibility.js requires exact equality:
if (packageEntry?.version !== migratorVersion || ...) {
throw new Error('Bundled compatibility manifest has stale migrator package metadata.');
}
toolingCompatibility.migrator is >=4 <5 and passes; it is only the packages[] entry's pinned version that fails. So the manifest is not regenerated (or not re-pinned) as part of cutting a release, and the check is exact rather than range-based — which means the same breakage recurs on every future release.
@cratis/components.migrator@4.0.0 runs fine, so the workaround is to pin the older version.
Why it matters
The migrator is the tool the 3 → 4 migration guide points people at for the Dropdown onChange → ChangeHandler<T> change and the Button variant/tone cleanup. Every consumer upgrading to the current Components release hits a preflight failure with no indication that an older migrator would work, so it reads as "the migration tooling is broken" rather than "pin 4.0.0". Found while migrating Cratis/Stagehand to Components 4 (Cratis/Stagehand#356); we did the 23 Dropdown call sites by hand.
Every
@cratis/components.migrator@4.1.0CLI fails its own compatibility preflight and exits before doing any work:Expected the codemod to report what it would rewrite. Instead nothing runs — this affects
cratis-components-change-handler,cratis-components-button-variant-tone, andcratis-components-remove-root-namespace-importsalike, since they all sharelib/compatibility.js.Cause
compat-manifest.jsonbundled in the 4.1.0 tarball still carries the 4.0.0 entry:{ "name": "@cratis/components.migrator", "role": "migrator", "version": "4.0.0", "releaseMajorRange": ">=4 <5", "independentRelease": false, ... }while
package.jsonsays"version": "4.1.0".lib/compatibility.jsrequires exact equality:toolingCompatibility.migratoris>=4 <5and passes; it is only thepackages[]entry's pinnedversionthat fails. So the manifest is not regenerated (or not re-pinned) as part of cutting a release, and the check is exact rather than range-based — which means the same breakage recurs on every future release.@cratis/components.migrator@4.0.0runs fine, so the workaround is to pin the older version.Why it matters
The migrator is the tool the 3 → 4 migration guide points people at for the
DropdownonChange→ChangeHandler<T>change and the Button variant/tone cleanup. Every consumer upgrading to the current Components release hits a preflight failure with no indication that an older migrator would work, so it reads as "the migration tooling is broken" rather than "pin 4.0.0". Found while migratingCratis/Stagehandto Components 4 (Cratis/Stagehand#356); we did the 23Dropdowncall sites by hand.