fix(cli): don't crash on TypeScript 7; lazy-load rollup transpile stack - #4877
Open
furuchanchan wants to merge 1 commit into
Open
furuchanchan wants to merge 1 commit into
furuchanchan wants to merge 1 commit into
Conversation
Contributor
|
This PR has been automatically marked as stale because it has had no recent activity. It will be closed if no further activity occurs. |
The eager import of @rollup/plugin-typescript at module scope crashed every tsci command (including --version) in projects with typescript@7 installed, because the plugin reads ts.ModuleKind.ES2015 which the TS7 native port removed. Defer loading rollup/plugin-typescript/etc into transpileFile, and check the installed compiler first so unsupported versions fail with an actionable message instead of a startup TypeError.
devin-ai-integration
Bot
force-pushed
the
fix/ts7-transpile-crash
branch
from
September 25, 2026 03:04
aad7b9e to
76c7c51
Compare
Contributor
|
This PR has been automatically marked as stale because it has had no recent activity. It will be closed if no further activity occurs. |
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.
Summary
cli/build/transpile/index.tseagerly importedrollup,@rollup/plugin-typescript, andtypescriptat module scope, so everytscicommand (even--version) crashed in projects withtypescript@7— the plugin readsts.ModuleKind.ES2015, which the TS7 native port removedtranspileFile, and the installed TypeScript is validated first; unsupported versions fail with an actionable message (Pin typescript@^5 ...) instead of aTypeErrorat startuptypescript@5.9.3as an explicit devDependency since the code imports it directlyVerified:
typescript@7.0.2installed:tsci --versionworks,transpileFilereturnsfalsewith the actionable error (was: hard crash)typescript@5.9.3: transpile producesindex.js/index.cjs/index.d.tsas before;bun test tests/cli/transpile6/6 pass,tests/cli/build12/12 passCloses #4706