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.
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-libdirective - Updates test baselines to reflect that default libraries are now always included
- Marks the
hasNoDefaultLibproperty 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 |
|
Its very difficult to add comment at right place so just writing at a comment here If we can add "defaultLibName" as well into the libFiles path, then isDefaultLibrary becomes just check to see if path is in "LibFiles" set. (Check corsa) |
|
Which |
|
|
That does work, but has some strange effects. I've pushed a commit to show. |
|
For some reason, Windows Node 22 always fails with a timeout. I have no idea why that would be, but it is consistent. |
|
|
This seems correct change |
| s = replaceAll(s, lib.stringified, `${fileName}-Text`); | ||
| s = replaceAll(s, lib.file.text, `${fileName}-Text`); |
There was a problem hiding this comment.
This stringify accounted for a large amount of runtime as more files are being loaded in the tests; moving it fixes the test perf issue.
| MissingPaths:: [ | ||
| "lib.d.ts" | ||
| ] |
There was a problem hiding this comment.
@sheetalkamat Is this okay? I am not entirely familiar with this to know if the test needs to be updated in some way.
There was a problem hiding this comment.
Modified part of the test to avoid this; the file was never loaded previously and only because of no-default-lib in the other random file.
There was a problem hiding this comment.
However, I am happy to revert it instead if we're okay with the random missing file message. Either way we have it, it seems.
|
@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! |
Fixes #62209