-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Add new option "libReplacement", disable by default #60829
base: main
Are you sure you want to change the base?
Conversation
@typescript-bot test it |
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. |
@jakebailey Here are the results of running the user tests with tsc comparing Everything looks good! |
Hey @jakebailey, the results of running the DT tests are ready. Everything looks the same! |
@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! |
Lib replacement (https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-5.html#supporting-lib-from-node_modules) allows specially-named packages in
node_modules
to replace TypeScript's bundledlib.d.ts
files. This feature is always on, so we always perform resolution to look for it in case it exists. This can have a negative perf impact; it's extra watchers, extra CPU time, extra IO, etc.This PR adds a new compiler option
libReplacement
to control the feature; by default, it's disabled.This is certainly a breaking change, but I'd like to run the extended tests / perf on this to see what happens.
The diff shows how much stuff we don't do when this option isn't enabled.