feat: add postinstall script to synchronize core package versions #1640
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.
Overview
Implement a postinstall script that automatically synchronizes package versions in
@tscircuit/evalwith the main@tscircuit/corerepository, preventing version drift between the two packages.Changes
New file:
scripts/postinstall.ts- Postinstall script that:@tscircuit/evaland@tscircuit/coreUpdated:
package.json"postinstall": "bun run scripts/postinstall.ts || true"to scripts sectionbun install(or npm/yarn equivalents)How It Works
@tscircuit/coreand@tscircuit/evalDO_NOT_SYNC_PACKAGEallowlist for exceptions)Implementation Details
DO_NOT_SYNC_PACKAGE List
The following packages are excluded from synchronization (either eval-specific or not applicable):
@biomejs/biome- Eval-specific linting@tscircuit/import-snippet- Eval-specific feature@tscircuit/layout- Eval-specific feature@tscircuit/log-soup- Eval-specific feature@tscircuit/common- Eval-specific feature@tscircuit/schematic-autolayout- Eval-specific feature@types/*- Type definitions (managed separately)tsup- Build tool (eval-specific)react-reconciler,react-reconciler-18- Eval-specific dependenciesbun-match-svg,chokidar-cli,pkg-pr-new,howfat,live-server,looks-same,ts-expect- Dev/test toolsconcurrently,nanoid,eecircuit-engine- Eval-specific@flatten-js/core,@lume/kiwi,calculate-packing,css-select,format-si-unit,performance-now,transformation-matrix- Core-only dependenciesError Handling
package.jsonor add them to theDO_NOT_SYNC_PACKAGElist.|| truefallbackBenefits
bun installDO_NOT_SYNC_PACKAGElist for eval-specific packagesTesting
Script has been tested and validates successfully:
Related Issue
Closes #357
Checklist
/fix #357