Repository navigation
fix(ci): run madge from an isolated install — typescript@7 has no JS API - #347
Merged
Merged
Conversation
The bun job's import-cycle step crashed on main with "TypeError: Cannot read properties of undefined (reading 'Cjs')" since the TypeScript 7.0.2 bump. madge parses .ts through @typescript-eslint/typescript-estree, which needs the TypeScript JS API; typescript@7 no longer ships it. As a workspace devDep, the root overrides entry (typescript: $typescript) forced madge's tree onto 7. Dropping the override instead breaks npm install (ERESOLVE: madge's typescript peer cannot be 5.x beside a root 7.x). madge leaves the workspace and CI runs a pinned bunx madge@8.0.0, whose own install resolves typescript 5.9. Same check, same scope: verified it still processes all 342 files and fails on an injected cycle. Also drops a stale Blacksmith comment left by the runner migration.
|
Warning Review limit reachedThe included review limit has been reached and this organization has disabled usage-based review continuation. Wait for reviews to reset or ask a billing admin to change After included review limits.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Next included review available in 28 minutes. View limit detailsLimit details: You’ve used the included review currently available. Your 105 included PR review attempts over the past 7 days set your current allowance at 1 review per hour. Review configuration: ⚙️ Run configuration
⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes the red `bun (test + lint)` job on main (since the TypeScript 7.0.2 bump, 2026-09-08).
Root cause: `bunx madge --circular` crashed with `TypeError: Cannot read properties of undefined (reading 'Cjs')`. madge parses .ts via `@typescript-eslint/typescript-estree`, which needs the TypeScript JS API — typescript@7 does not ship one. The root `overrides: { typescript: $typescript }` forced madge's tree onto 7. Removing the override instead breaks `npm install` (ERESOLVE: madge's typescript peer can't be 5.x next to root 7.x).
Fix: remove madge from root devDependencies; CI runs pinned `bunx madge@8.0.0 --circular packages/*/src`, an isolated install that resolves typescript 5.9. The check is unchanged: still 342 files, still fails on an injected cycle (verified locally). `npm install`, lint and typecheck verified locally.
Also removes a stale Blacksmith comment from the runner migration.
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.