Skip to content

fix(api/spec): set explicit rootDir for TypeScript 7 SDK build - #4802

Merged
tothandras merged 1 commit into
mainfrom
fix/aip-sdk-tsconfig-rootdir
Jul 28, 2026
Merged

tothandras merged 1 commit into
mainfrom
fix/aip-sdk-tsconfig-rootdir

Conversation

@tothandras

@tothandras tothandras commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

TypeScript 7 (tsgo) no longer infers rootDir from the common source directory and fails with TS5011, breaking the publish-aip-sdk job.

Summary by CodeRabbit

  • Bug Fixes
    • Fixed TypeScript build/publishing issues by explicitly setting the production source root.
    • Improved test type-checking by adjusting the test TypeScript source root to match the files being checked.

Greptile Summary

This PR makes the AIP JavaScript SDK’s TypeScript source roots explicit.

  • Sets the production build root to src so TypeScript 7 can compile and publish the SDK with the intended src-to-dist layout.
  • Overrides the test configuration root to the package directory so both src and tests remain valid type-checking inputs.

Confidence Score: 5/5

The PR appears safe to merge, with both root directory settings aligned to their respective production and test input sets.

The production configuration includes only files beneath src, while the no-emit test configuration explicitly uses the package root to cover both src and tests; no conflicting imports, inputs, or output-layout changes were identified.

Important Files Changed

Filename Overview
api/spec/packages/aip-client-javascript/tsconfig.json Adds an explicit src root that matches the production include pattern and emitted package layout.
api/spec/packages/aip-client-javascript/tsconfig.tests.json Broadens the inherited root for the no-emit test configuration so test files outside src can still be type-checked.

Reviews (1): Last reviewed commit: "fix(api/spec): set explicit rootDir for ..." | Re-trigger Greptile

@tothandras
tothandras requested a review from a team as a code owner July 28, 2026 08:59
@tothandras tothandras added the release-note/bug-fix Release note: Bug Fixes label Jul 28, 2026
@coderabbitai

coderabbitai Bot commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

TypeScript compiler configurations now explicitly set rootDir for source compilation and override it for test type-checking.

Changes

TypeScript root directory configuration

Layer / File(s) Summary
Align source and test compiler roots
api/spec/packages/aip-client-javascript/tsconfig.json, api/spec/packages/aip-client-javascript/tsconfig.tests.json
The package config sets rootDir to ./src; the test config overrides it to . for included test files.

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
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 Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: adding an explicit rootDir to the TypeScript SDK build config.
✨ 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 fix/aip-sdk-tsconfig-rootdir

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.

TypeScript 7 (tsgo) no longer infers rootDir from the common source
directory and fails with TS5011, breaking the publish-aip-sdk job.
@tothandras
tothandras force-pushed the fix/aip-sdk-tsconfig-rootdir branch from 31f5698 to 4552058 Compare July 28, 2026 09:00
@tothandras
tothandras enabled auto-merge (squash) July 28, 2026 09:00
@tothandras
tothandras disabled auto-merge July 28, 2026 09:06
@tothandras
tothandras merged commit ea9f54d into main Jul 28, 2026
29 checks passed
@tothandras
tothandras deleted the fix/aip-sdk-tsconfig-rootdir branch July 28, 2026 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-note/bug-fix Release note: Bug Fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants