-
Notifications
You must be signed in to change notification settings - Fork 13k
Remove no-default-lib #62435
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Remove no-default-lib #62435
Conversation
Looks like you're introducing a change to the public API surface area. If this includes breaking changes, please document them on our wiki's API Breaking Changes page. Also, please make sure @DanielRosenwasser and @RyanCavanaugh are aware of the changes, just as a heads up. |
@typescript-bot test it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR removes the no-default-lib
TypeScript compiler directive feature. The change ensures that default TypeScript libraries are always included in compilation unless explicitly excluded through compiler options, eliminating a source of confusion where individual files could opt out of standard library inclusion.
- Removes processing and handling of the
no-default-lib
directive - Updates test baselines to reflect that default libraries are now always included
- Marks the
hasNoDefaultLib
property as deprecated in the public API
Reviewed Changes
Copilot reviewed 59 out of 62 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
tests/baselines/reference/tsxResolveExternalModuleExportsTypes.types | Updates performance stats to reflect increased type counts from including libraries |
tests/baselines/reference/tsserver/configuredProjects/should-not-close-configured-project-after-closing-last-open-file,-but-should-be-closed-on-next-file-open-if-its-not-the-file-from-same-project.js | Adds default library information in project output |
tests/baselines/reference/tscWatch/programUpdates/when-skipLibCheck-and-skipDefaultLibCheck-changes.js | Removes library-related errors that no longer occur |
tests/baselines/reference/tscWatch/libraryResolution/*.js | Updates library resolution order and removes duplicate lib entries |
tests/baselines/reference/tsc/libraryResolution/*.js | Updates shape signatures order for library files |
tests/baselines/reference/tsc/incremental/ts-file-with-no-default-lib-that-augments-the-global-scope.js | Adds additional library files and errors from forced inclusion |
tests/baselines/reference/project/noDefaultLib/*.json | Adds default library files to resolved inputs |
tests/baselines/reference/noDefaultLib.* | Shows library symbols now merged with user-defined interfaces |
tests/baselines/reference/api/typescript.d.ts | Marks hasNoDefaultLib and isLibFile properties as deprecated |
tests/baselines/reference/declarationEmitPreservesHasNoDefaultLibDirective. | Removes the no-default-lib directive from emitted declarations |
Hey @jakebailey, the results of running the DT tests are ready. There were interesting changes: Branch only errors:Package: miniprogram-wxs
|
@jakebailey Here are the results of running the user tests with tsc comparing There were infrastructure failures potentially unrelated to your change:
Otherwise... Everything looks good! |
@jakebailey Here they are:
tscComparison Report - baseline..pr
System info unknown
Hosts
Scenarios
Developer Information: |
@jakebailey Here are the results of running the top 400 repos with tsc comparing Everything looks good! |
...ines/reference/tsc/incremental/ts-file-with-no-default-lib-that-augments-the-global-scope.js
Outdated
Show resolved
Hide resolved
...aselines/reference/tsc/libraryResolution/when-one-of-the-file-skips-default-lib-inclusion.js
Outdated
Show resolved
Hide resolved
...lines/reference/tscWatch/programUpdates/when-skipLibCheck-and-skipDefaultLibCheck-changes.js
Show resolved
Hide resolved
This PR fails in CI but passes locally. I have no idea what's going on with that. |
Try printing diff on failing baseline and see what it is? |
Oh, I just have to merge main. I'm touching new tests. |
97df5c9
to
db2decd
Compare
@typescript-bot user test this |
Hey @jakebailey, the results of running the DT tests are ready. There were interesting changes: Branch only errors:Package: miniprogram-wxs
|
@jakebailey Here are the results of running the user tests with tsc comparing There were infrastructure failures potentially unrelated to your change:
Otherwise... Everything looks good! |
@jakebailey Here are the results of running the top 800 repos with tsc comparing Everything looks good! |
This is basically impossible to review, so I tried to split the PR into two commits. |
Fixes #62209