-
Notifications
You must be signed in to change notification settings - Fork 653
Port lib replacement and --libReplacement #1262
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
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
bdb5cba
Begin libReplacement
jakebailey f2d4ab3
Get it working
jakebailey d7ed374
Caching
jakebailey 4b04689
Small simplification
jakebailey 04401da
Small simplification
jakebailey 5529763
Stick lib file resolutions into the resolvedModules cache for watching
jakebailey b59f4c3
Use a cache per resolveFrom
jakebailey File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
15 changes: 15 additions & 0 deletions
15
testdata/baselines/reference/submodule/compiler/libTypeScriptOverrideSimple.errors.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
index.ts(6,1): error TS2304: Cannot find name 'window'. | ||
|
||
|
||
==== /node_modules/@typescript/lib-dom/index.d.ts (0 errors) ==== | ||
interface ABC { abc: string } | ||
==== index.ts (1 errors) ==== | ||
/// <reference lib="dom" /> | ||
const a: ABC = { abc: "Hello" } | ||
|
||
// This should fail because libdom has been replaced | ||
// by the module above ^ | ||
window.localStorage | ||
~~~~~~ | ||
!!! error TS2304: Cannot find name 'window'. | ||
|
19 changes: 0 additions & 19 deletions
19
testdata/baselines/reference/submodule/compiler/libTypeScriptOverrideSimple.errors.txt.diff
This file was deleted.
Oops, something went wrong.
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
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
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
12 changes: 0 additions & 12 deletions
12
testdata/baselines/reference/submodule/compiler/libTypeScriptOverrideSimple.types.diff
This file was deleted.
Oops, something went wrong.
6 changes: 3 additions & 3 deletions
6
testdata/baselines/reference/submodule/compiler/libTypeScriptOverrideSimpleConfig.errors.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
/somepath/index.ts(2,10): error TS2304: Cannot find name 'ABC'. | ||
/somepath/index.ts(6,1): error TS2304: Cannot find name 'window'. | ||
|
||
|
||
==== /somepath/tsconfig.json (0 errors) ==== | ||
{ } | ||
==== /somepath/index.ts (1 errors) ==== | ||
/// <reference lib="dom" /> | ||
const a: ABC = { abc: "Hello" } | ||
~~~ | ||
!!! error TS2304: Cannot find name 'ABC'. | ||
|
||
// This should fail because libdom has been replaced | ||
// by the module above ^ | ||
window.localStorage | ||
~~~~~~ | ||
!!! error TS2304: Cannot find name 'window'. | ||
|
||
==== /somepath/node_modules/@typescript/lib-dom/index.d.ts (0 errors) ==== | ||
interface ABC { abc: string } |
23 changes: 0 additions & 23 deletions
23
.../baselines/reference/submodule/compiler/libTypeScriptOverrideSimpleConfig.errors.txt.diff
This file was deleted.
Oops, something went wrong.
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
23 changes: 5 additions & 18 deletions
23
...ata/baselines/reference/submodule/compiler/libTypeScriptOverrideSimpleConfig.symbols.diff
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,8 @@ | ||
--- old.libTypeScriptOverrideSimpleConfig.symbols | ||
+++ new.libTypeScriptOverrideSimpleConfig.symbols | ||
@@= skipped -3, +3 lines =@@ | ||
/// <reference lib="dom" /> | ||
const a: ABC = { abc: "Hello" } | ||
>a : Symbol(a, Decl(index.ts, 1, 5)) | ||
->ABC : Symbol(ABC, Decl(index.d.ts, 0, 0)) | ||
+>ABC : Symbol(ABC) | ||
>abc : Symbol(abc, Decl(index.ts, 1, 16)) | ||
|
||
// This should fail because libdom has been replaced | ||
// by the module above ^ | ||
window.localStorage | ||
- | ||
-=== /somepath/node_modules/@typescript/lib-dom/index.d.ts === | ||
-interface ABC { abc: string } | ||
->ABC : Symbol(ABC, Decl(index.d.ts, 0, 0)) | ||
@@= skipped -13, +13 lines =@@ | ||
=== /somepath/node_modules/@typescript/lib-dom/index.d.ts === | ||
interface ABC { abc: string } | ||
>ABC : Symbol(ABC, Decl(index.d.ts, 0, 0)) | ||
->abc : Symbol(ABC.abc, Decl(index.d.ts, 0, 15)) | ||
+>window.localStorage : Symbol(localStorage, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --)) | ||
+>window : Symbol(window, Decl(lib.dom.d.ts, --, --)) | ||
+>localStorage : Symbol(localStorage, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --)) | ||
+>abc : Symbol(abc, Decl(index.d.ts, 0, 15)) |
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
16 changes: 0 additions & 16 deletions
16
testdata/baselines/reference/submodule/compiler/libTypeScriptOverrideSimpleConfig.types.diff
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.