Conversation
TS6 introduced three breaking changes that affected runCheck: 1. moduleResolution "Node16" rejects bare-specifier ambient module declarations (declare module "sap/ui/core/Control") — switched to module: ESNext + moduleResolution: Bundler which supports them. 2. The default types list is now empty, so @types packages are no longer auto-included — added discovery logic that reads declared @types/* from the nearest package.json and walks up from CWD to locate them in potentially hoisted node_modules directories. 3. In monorepo/workspace setups the walk-up could find unrelated @types packages (e.g. @types/openui5) that conflict with the .d.ts files being checked — scoped discovery to only declared dependencies.
Runs the runCheck CLI against the snapshot .d.ts files as part of CI. This would have caught the TS6 module resolution and @types discovery regressions before they reached consumers.
There was a problem hiding this comment.
Pull request overview
This PR updates the dts-generator runCheck compile check for TypeScript 6 compatibility, especially around module resolution and explicit inclusion of declared @types packages.
Changes:
- Switches compile-check module settings from Node16 to ESNext/Bundler.
- Adds discovery of declared
@types/*dependencies from package.json. - Walks ancestor
node_modules/@typesfolders to configuretypeRootsandtypes.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TS6 introduced three breaking changes that affected runCheck:
moduleResolution "Node16" rejects bare-specifier ambient module declarations (declare module "sap/ui/core/Control") — switched to module: ESNext + moduleResolution: Bundler which supports them.
The default types list is now empty, so @types packages are no longer auto-included — added discovery logic that reads declared @types/* from the nearest package.json and walks up from CWD to locate them in potentially hoisted node_modules directories.
In monorepo/workspace setups the walk-up could find unrelated @types packages (e.g. @types/openui5) that conflict with the .d.ts files being checked — scoped discovery to only declared dependencies.