feat: support TypeScript 7#87
Conversation
📝 WalkthroughWalkthroughThe PR updates plugin TypeScript option handling to use 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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: 2
🤖 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`:
- Around line 120-126: The documented default object for
tsCheckerOptions(options) is out of sync with runtime behavior because it shows
a tsgo field that is never actually set. Update the README snippet to match the
real defaultOptions.typescript shape by removing the tsgo entry and documenting
only the runtime-derived typescriptPath behavior so the example reflects what
users receive.
In `@src/index.ts`:
- Around line 98-119: applyTypeScriptPathCompat currently normalizes
TYPESCRIPT_PACKAGE_JSON only in the TS7 auto-enable branch, so the opt-out and
pre-TS7 fallback branches should also treat that path as equivalent to the
TypeScript package.json form. Update the conditional checks in
applyTypeScriptPathCompat so the tsgo === false branch and the tsgo &&
!projectPaths.supportsTsgo branch both match configuredPath ===
TYPESCRIPT_PACKAGE_JSON alongside the existing package.json/TypeScript package
cases, ensuring the path is rewritten consistently to
projectPaths.typescriptPath or projectPaths.previewPackageJsonPath as
appropriate.
🪄 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: dc6e3da9-71ca-4ef2-917c-684f181d5071
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (3)
README.mdpackage.jsonsrc/index.ts
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1d299fbd9e
ℹ️ 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.
Actionable comments posted: 1
🤖 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 `@src/index.ts`:
- Around line 102-108: The configuredPath branch in src/index.ts enables tsgo
for supported TypeScript Go packages but does not set
normalizedOptions.tsgoPackage, so the plugin cannot resolve the executable for
non-standard paths. Update the configuredPath handling to detect whether the
package is the stable typescript package or the preview package, assign
normalizedOptions.tsgoPackage accordingly, and keep the tsgo toggle behavior in
sync within the same logic block that uses isTypeScriptGoSupportedPackage and
typescriptOptions.tsgo.
🪄 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: 293762d8-2015-4908-881d-2074ec091356
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (6)
pnpm-workspace.yamlsrc/index.tstest/typescript-v7-rc/index.test.tstest/typescript-v7-rc/package.jsontest/typescript-v7-rc/src/index.tstest/typescript-v7-rc/tsconfig.json
✅ Files skipped from review due to trivial changes (4)
- test/typescript-v7-rc/package.json
- test/typescript-v7-rc/tsconfig.json
- test/typescript-v7-rc/src/index.ts
- pnpm-workspace.yaml
|
@codex review |
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
@Timeless0911 This branch has conflicts that must be resolved |
409c700 to
e7f4f06
Compare
Summary
ts-checker-rspack-pluginto^1.5.1.ts-checker-rspack-pluginviatypescript.resolveRootinstead of resolving and rewritingtypescriptPathin this plugin.