feat(typescript): support TypeScript 7#110
Conversation
|
Warning Review limit reached
More reviews will be available in 55 minutes and 38 seconds. Learn how PR review limits work. To continue reviewing without waiting, enable usage-based billing in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please see our Fair Usage Limits Policy for further information. 📝 WalkthroughWalkthroughThe PR extends tsgo support from only 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
test/unit/typescript/type-script-go-runner.spec.ts (1)
31-55: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value
createTypeScriptPackageis duplicated across three spec files.This helper (and the
tempDirs/afterEachcleanup) is copy-pasted intype-script-go-runner.spec.ts,type-script-support.spec.ts, andtype-script-worker-config.spec.tswith only the temp-dir prefix differing. Consider extracting to a shared test utility to keep the fixtures consistent as the package shape evolves.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@test/unit/typescript/type-script-go-runner.spec.ts` around lines 31 - 55, `createTypeScriptPackage`, along with the shared `tempDirs` cleanup and `afterEach` teardown, is duplicated across multiple TypeScript spec files. Extract this fixture setup into a common test utility and reuse it from `type-script-go-runner.spec.ts`, `type-script-support.spec.ts`, and `type-script-worker-config.spec.ts`, keeping only any truly file-specific differences such as the temp-dir prefix in one place.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@README.md`:
- Line 114: Fix the malformed default expression for the `mode` option in the
README table: the `mode` row currently shows an invalid nested ternary (`build
=== true ? 'write-tsbuildinfo' ? 'readonly'`). Update that documentation entry
so the default logic is expressed with the correct ternary syntax, using `build`
to choose `write-tsbuildinfo` when true and `readonly` otherwise, matching the
behavior described by the `mode` option.
---
Nitpick comments:
In `@test/unit/typescript/type-script-go-runner.spec.ts`:
- Around line 31-55: `createTypeScriptPackage`, along with the shared `tempDirs`
cleanup and `afterEach` teardown, is duplicated across multiple TypeScript spec
files. Extract this fixture setup into a common test utility and reuse it from
`type-script-go-runner.spec.ts`, `type-script-support.spec.ts`, and
`type-script-worker-config.spec.ts`, keeping only any truly file-specific
differences such as the temp-dir prefix in one place.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 72efb387-3c5e-4cd9-b525-e522574939b0
📒 Files selected for processing (9)
README.mdsrc/typescript/type-script-go-constants.tssrc/typescript/type-script-go-package.tssrc/typescript/type-script-go-runner.tssrc/typescript/type-script-support.tssrc/typescript/type-script-worker-config.tstest/unit/typescript/type-script-go-runner.spec.tstest/unit/typescript/type-script-support.spec.tstest/unit/typescript/type-script-worker-config.spec.ts
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2731d4c9c4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
🧹 Nitpick comments (1)
test/unit/typescript/type-script-go-runner.spec.ts (1)
31-59: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚖️ Poor tradeoffConsider extracting the duplicated
createTypeScriptPackagefixture into a shared test helper.This helper is nearly identical to the one in
test/unit/typescript/type-script-support.spec.ts(only the temp-dir prefix and return shape differ). Extracting it to a shared test utility would avoid the two copies drifting apart as the package layout evolves.Note: the ast-grep/CodeQL path-traversal and sanitization warnings on Lines 50-52 are false positives here — the paths derive from
mkdtempSyncand controlledpath.joinvalues, not external input.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@test/unit/typescript/type-script-go-runner.spec.ts` around lines 31 - 59, The `createTypeScriptPackage` fixture in `type-script-go-runner.spec.ts` is duplicated in another TypeScript test and should be extracted into a shared helper to prevent drift. Move the common setup into a reusable test utility, then update `createTypeScriptPackage` in this spec and the matching helper in `type-script-support.spec.ts` to call the shared implementation while preserving each test’s temp-dir prefix and return shape. Keep the existing `package.json`, `getExePath.js`, and `nativeTscPath` setup behavior unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@test/unit/typescript/type-script-go-runner.spec.ts`:
- Around line 31-59: The `createTypeScriptPackage` fixture in
`type-script-go-runner.spec.ts` is duplicated in another TypeScript test and
should be extracted into a shared helper to prevent drift. Move the common setup
into a reusable test utility, then update `createTypeScriptPackage` in this spec
and the matching helper in `type-script-support.spec.ts` to call the shared
implementation while preserving each test’s temp-dir prefix and return shape.
Keep the existing `package.json`, `getExePath.js`, and `nativeTscPath` setup
behavior unchanged.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 180f77cf-56d2-42d8-8db7-00c73f8991b6
📒 Files selected for processing (5)
README.mdsrc/typescript/type-script-go-runner.tssrc/typescript/type-script-support.tstest/unit/typescript/type-script-go-runner.spec.tstest/unit/typescript/type-script-support.spec.ts
✅ Files skipped from review due to trivial changes (1)
- README.md
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 79a0dd379b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Summary
This PR adds TypeScript 7+ support for the tsgo checker path now that the TypeScript 7 RC ships the Go-based compiler through the
typescriptpackage. It auto-enablestypescript.tsgowhen a configured or default installedtypescriptpackage has major version 7 or higher, keeps@typescript/native-previewas the explicit fallback when no customtypescriptPathis provided, and updates docs/tests for the new package resolution behavior.Related Links