Skip to content

feat(ts-interface-generator): bundle TypeScript as direct dependency, allow usage in TS7 projects - #659

Open
akudev wants to merge 1 commit into
mainfrom
chore/ts7
Open

akudev wants to merge 1 commit into
mainfrom
chore/ts7

Conversation

@akudev

@akudev akudev commented Oct 2, 2026

Copy link
Copy Markdown
Member

Remove the typescript peer dependency (>=5.2.0 <7.0.0) and instead bundle TypeScript 6.0.3 as a direct dependency, matching the pattern already used by @ui5/dts-generator. This decouples the tool from the user's TypeScript version, allowing it to work in projects using any version including TypeScript 7.

Additional fixes included:

  • Fall back to the internal pathsBasePath compiler option when baseUrl is not set (baseUrl is removed in TS7, but TS6 populates pathsBasePath when paths is specified without baseUrl)
  • Filter diagnostic codes 5023/5025 (unknown compiler option) so that TS7-era tsconfig options don't produce noise from the bundled TS6
  • Replace throw with log.debug for unexpected diagnostic codes in reportWatchStatusChanged to avoid crashes on unforeseen diagnostics

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Run-once diagnostics remain unsuppressed, the key path fallback lacks coverage, and the lockfile contains unrelated dependency churn.

Review effort: Balanced
Findings: 3 Medium severity · 1 Low severity

Open (4)
What changed in this PR

Moves the interface generator to an internal TypeScript 6 dependency for compatibility with TypeScript 7 projects.

Changes:

  • Adds TypeScript 6.0.3 as a direct dependency.
  • Adds TS7-compatible path handling and diagnostic behavior.
  • Documents the migration and release impact.
File Description
package.json Adds the direct TypeScript dependency.
pnpm-lock.yaml Updates dependency resolution.
typeScriptEnvironment.ts Filters diagnostics and avoids watch-status crashes.
generateTSInterfacesAPI.ts Adds pathsBasePath fallback.
docs/​TS7.md Documents the migration strategy.
.changeset/​bundle-typescript6.md Records the minor release.
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread packages/ts-interface-generator/src/generateTSInterfacesAPI.ts
Comment thread packages/ts-interface-generator/src/typeScriptEnvironment.ts
Comment thread pnpm-lock.yaml Outdated
Comment thread docs/TS7.md Outdated
@akudev
akudev force-pushed the chore/ts7 branch 2 times, most recently from f01341d to 925e0aa Compare October 2, 2026 13:30
@akudev
akudev requested a balanced review from Copilot October 2, 2026 13:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Run-once mode now suppresses all compiler diagnostics, and the new fixture does not validate the fallback it targets.

Review effort: Balanced
Findings: 1 High severity · 1 Medium severity · 2 Low severity

Open (4)
Resolved since last review (4)
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

Comment thread packages/ts-interface-generator/src/typeScriptEnvironment.ts
Comment thread docs/TS7.md Outdated
Comment thread packages/ts-interface-generator/package.json
@akudev
akudev force-pushed the chore/ts7 branch 2 times, most recently from 68fbfa4 to 7bc2222 Compare October 2, 2026 13:55
@akudev
akudev requested a balanced review from Copilot October 2, 2026 13:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Run-once diagnostics lose essential source locations and codes, making CI failures difficult to diagnose.

Review effort: Balanced
Findings: 1 Medium severity · 1 Low severity

Open (2)
Resolved since last review (4)
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

Comment thread packages/ts-interface-generator/src/typeScriptEnvironment.ts Outdated
Comment thread docs/TS7.md

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Run-once compiler errors can be hidden by the supported error-only log level, and diagnostic filtering lacks regression coverage.

Review effort: Balanced
Findings: 2 Medium severity · 1 Low severity

Open (3)
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

Comment thread packages/ts-interface-generator/src/typeScriptEnvironment.ts
Remove the typescript peer dependency (>=5.2.0 <7.0.0) and instead
bundle TypeScript 6.0.3 as a direct dependency, matching the pattern
already used by @ui5/dts-generator. This decouples the tool from the
user's TypeScript version, allowing it to work in projects using any
version including TypeScript 7.

Additional fixes included:
- Fall back to the internal pathsBasePath compiler option when baseUrl
  is not set (baseUrl is removed in TS7, but TS6 populates pathsBasePath
  when paths is specified without baseUrl)
- Filter diagnostic codes 5023/5025 (unknown compiler option) so that
  TS7-era tsconfig options don't produce noise from the bundled TS6
- Replace throw with log.debug for unexpected diagnostic codes in
  reportWatchStatusChanged to avoid crashes on unforeseen diagnostics

This branch has not been deployed

No deployments
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