Skip to content

feat: support TypeScript 7#87

Merged
chenjiahan merged 5 commits into
mainfrom
david/feat-ts-checker-rspack-1-5
Jun 26, 2026
Merged

feat: support TypeScript 7#87
chenjiahan merged 5 commits into
mainfrom
david/feat-ts-checker-rspack-1-5

Conversation

@Timeless0911

@Timeless0911 Timeless0911 commented Jun 25, 2026

Copy link
Copy Markdown
Member

Summary

  • Upgrade ts-checker-rspack-plugin to ^1.5.1.
  • Delegate default TypeScript runtime resolution to ts-checker-rspack-plugin via typescript.resolveRoot instead of resolving and rewriting typescriptPath in this plugin.
  • Update the README default options and TypeScript Go guidance for the new behavior.
  • Add a TypeScript 7 RC fixture to cover automatic TypeScript Go type checking.

@Timeless0911 Timeless0911 changed the title feat: support ts-checker-rspack-plugin 1.5.0 feat: support TypeScript 7 Jun 25, 2026
@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The PR updates plugin TypeScript option handling to use resolveRoot for default resolution and simplifies production logging. It also refreshes the README for TypeScript Go support, bumps ts-checker-rspack-plugin, adds a workspace entry, and introduces a TypeScript v7 RC test fixture with build coverage.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately summarizes the main change: adding TypeScript 7 support.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The description matches the code changes, covering the dependency upgrade, TypeScript resolution change, docs updates, and new TypeScript 7 RC fixture.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch david/feat-ts-checker-rspack-1-5

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 616fbd2 and 1d299fb.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (3)
  • README.md
  • package.json
  • src/index.ts

Comment thread README.md Outdated
Comment thread src/index.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/index.ts Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 1d299fb and 25e448c.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (6)
  • pnpm-workspace.yaml
  • src/index.ts
  • test/typescript-v7-rc/index.test.ts
  • test/typescript-v7-rc/package.json
  • test/typescript-v7-rc/src/index.ts
  • test/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

Comment thread src/index.ts Outdated
@Timeless0911

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: b8c350476c

ℹ️ 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".

@chenjiahan

Copy link
Copy Markdown
Member

@Timeless0911 This branch has conflicts that must be resolved

@Timeless0911 Timeless0911 force-pushed the david/feat-ts-checker-rspack-1-5 branch from 409c700 to e7f4f06 Compare June 26, 2026 06:52
@chenjiahan chenjiahan merged commit 2150156 into main Jun 26, 2026
6 checks passed
@chenjiahan chenjiahan deleted the david/feat-ts-checker-rspack-1-5 branch June 26, 2026 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants