fix(diffs): use catalog reference for @shikijs/core to ensure consistent version resolution #252
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
When installing
@pierre/diffsin a project that has Shiki 3.20.0 defined, the@shikijs/coredependency would resolve to version 3.19.0 instead of the expected 3.20.0, causing version mismatches.Root Cause
The
@shikijs/coredependency inpackages/diffs/package.jsonwas using a semver range (^3.0.0) instead of thecatalog:reference that other shiki packages were using:"dependencies": { - "@shikijs/core": "^3.0.0", + "@shikijs/core": "catalog:", "@shikijs/engine-javascript": "catalog:", "@shikijs/transformers": "catalog:", ... }This inconsistency caused Bun to resolve
@shikijs/coreto 3.19.0 from the stale lockfile entry, ignoring the catalog-defined version of 3.20.0. Meanwhile, other shiki packages (@shikijs/engine-javascript,@shikijs/transformers,shiki) correctly usedcatalog:and resolved to 3.20.0.Fix
@shikijs/coreto usecatalog:reference, consistent with other shiki packagesbun.lockto resolve all shiki packages to the catalog-defined version (3.20.0)Impact
This ensures downstream consumers get consistent shiki versions across all
@shikijs/*packages when installing@pierre/diffs.