-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Updated: Only auto-import from package.json #32517
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
andrewbranch
merged 126 commits into
microsoft:master
from
andrewbranch:enhancement/only-import-from-package-json
Sep 27, 2019
Merged
Changes from 113 commits
Commits
Show all changes
126 commits
Select commit
Hold shift + click to select a range
3e95a35
Move package.json related utils to utilities
andrewbranch c33bf88
Add failing test
andrewbranch 52a0a00
Make first test pass
andrewbranch 528f873
Don’t filter when there’s no package.json, fix scoped package imports
andrewbranch 5e60836
Use type acquisition as a heuristic for whether a JS project is using…
andrewbranch 9ca24b1
Make same fix in getCompletionDetails
andrewbranch 6d582c9
Fix re-exporting
andrewbranch c60d078
Change JS node core module heuristic to same-file utilization
andrewbranch 372265c
Remove unused method
andrewbranch e907863
Remove other unused method
andrewbranch 410ade0
Remove unused triple-slash ref
andrewbranch b646317
Update comment
andrewbranch 8b87aea
Refactor findAlias to forEachAlias to reduce iterations
andrewbranch d02d691
Really fix re-exporting
andrewbranch 341fb3a
Use getModuleSpecifier instead of custom hack
andrewbranch 426c28b
Fix offering auto imports to paths within node modules
andrewbranch 60478c6
Rename things and make comments better
andrewbranch af96ac4
Add another reexport test
andrewbranch c3437d1
Inline `symbolHasBeenSeen`
andrewbranch 8813f02
Simplify forEachAlias to findAlias
andrewbranch a5f2269
Add note that symbols is mutated
andrewbranch 5c2421d
Symbol order doesn’t matter here
andrewbranch 1f6e58d
Style nits
andrewbranch 670c8f6
Add test with nested package.jsons
andrewbranch 23daffe
Fix and add tests for export * re-exports
andrewbranch 19f829a
Don’t fail when alias isn’t found
andrewbranch f953b4d
Make some easy optimizations
andrewbranch a1ae6e2
Clean up memoization when done
andrewbranch ebbe996
Remove unnecessary semicolon
andrewbranch d483f5f
Make getSymbolsFromOtherSourceFileExports pure
andrewbranch 8ea4829
Cache auto imports
andrewbranch 7eaa6c6
Revert "Cache auto imports"
andrewbranch 46f605c
Handle merged symbols through cache
andrewbranch 7cb6a5e
Be safer with symbol declarations, add logging
andrewbranch eb342dd
Improve cache invalidation for imports and exports
andrewbranch b805651
Check symbol presence first
andrewbranch 3559193
Only run cache invalidation logic if there’s something to clear
andrewbranch a1f8c6f
Consolidate cache invalidation logic
andrewbranch eaa6709
Fix reuseProgramStructure test
andrewbranch a0ae197
Add more logging
andrewbranch 47bf2d5
Only clear cache if symbols are different
andrewbranch 3d8d03d
Refactor ambient module handling
andrewbranch 16b9dbb
Start caching package.json stuff
andrewbranch f14754b
Support package.json searching in fourslash
andrewbranch 9a15542
Move import suggestions cache to Project
andrewbranch c613772
Start making more module specifier work available without having the …
andrewbranch 51adf97
Going to backtrack some from here
andrewbranch 916abae
Get rid of dumb cache, fix node core modules stuff
andrewbranch 585f1c7
Start determining changes to a file have invalidated its own auto imp…
andrewbranch 655cb6d
Move package.json related utils to utilities
andrewbranch 9fe59a7
Add failing test
andrewbranch 3da34f8
Make first test pass
andrewbranch 50e4a4e
Don’t filter when there’s no package.json, fix scoped package imports
andrewbranch e125ba4
Use type acquisition as a heuristic for whether a JS project is using…
andrewbranch d3efd46
Make same fix in getCompletionDetails
andrewbranch 4059d74
Fix re-exporting
andrewbranch 06dc6ca
Change JS node core module heuristic to same-file utilization
andrewbranch 3b7caf9
Remove unused method
andrewbranch b6d7c38
Remove other unused method
andrewbranch 04eacbf
Remove unused triple-slash ref
andrewbranch 916b536
Update comment
andrewbranch c938d04
Refactor findAlias to forEachAlias to reduce iterations
andrewbranch ba6ff46
Really fix re-exporting
andrewbranch f266c5c
Use getModuleSpecifier instead of custom hack
andrewbranch b90e466
Fix offering auto imports to paths within node modules
andrewbranch adbce72
Rename things and make comments better
andrewbranch 186af80
Add another reexport test
andrewbranch 45a3b3e
Inline `symbolHasBeenSeen`
andrewbranch 6c4cf54
Simplify forEachAlias to findAlias
andrewbranch 47b3bfc
Add note that symbols is mutated
andrewbranch 5b4e9ed
Symbol order doesn’t matter here
andrewbranch 87cb6bc
Style nits
andrewbranch 34888d5
Add test with nested package.jsons
andrewbranch 67d332a
Fix and add tests for export * re-exports
andrewbranch 24d080e
Don’t fail when alias isn’t found
andrewbranch fb180ec
Make some easy optimizations
andrewbranch 8c5f227
Clean up memoization when done
andrewbranch c91a175
Remove unnecessary semicolon
andrewbranch 5a1c450
Make getSymbolsFromOtherSourceFileExports pure
andrewbranch 3d0b9ee
Cache auto imports
andrewbranch 5271962
Revert "Cache auto imports"
andrewbranch 325df3c
Handle merged symbols through cache
andrewbranch 74989aa
Be safer with symbol declarations, add logging
andrewbranch e318b1b
Improve cache invalidation for imports and exports
andrewbranch ae21c64
Check symbol presence first
andrewbranch 8680641
Only run cache invalidation logic if there’s something to clear
andrewbranch 738c8db
Consolidate cache invalidation logic
andrewbranch 8f0c929
Fix reuseProgramStructure test
andrewbranch adf3489
Add more logging
andrewbranch 3e114b7
Only clear cache if symbols are different
andrewbranch 975c7b8
Refactor ambient module handling
andrewbranch b521d9e
Merge branch 'enhancement/only-import-from-package-json' into more-ca…
andrewbranch 8d002fe
Finish(?) sourceFileHasChangedOwnImportSuggestions
andrewbranch 4e3322a
Make package.json info model better
andrewbranch 7cecbe0
Fix misplaced paren
andrewbranch b57ed78
Merge branch 'more-caching' into enhancement/only-import-from-package…
andrewbranch 0b53c08
Use file structure cache for package.json detection when possible
andrewbranch d77d4f2
Revert unnecessary changes in moduleSpecifiers
andrewbranch f7c8d35
Revert more unnecessary changes
andrewbranch 51164a9
Don’t watch package.jsons inside node_modules, fix tests
andrewbranch 0ad9dd8
Merge branch 'master' into enhancement/only-import-from-package-json
andrewbranch 3d5eb7a
Work around declaration emit bug
andrewbranch b6409f4
Sync submodules?
andrewbranch e23ed56
Delete unused type
andrewbranch 81b2e3d
Add server cache tests
andrewbranch 3e79dbf
Fix server fourslash editing
andrewbranch 81f5ca6
Fix packageJsonInfo tests
andrewbranch 04b4602
Add node core modules cache test and fix more fourslash
andrewbranch 779015c
Clean up symlink caching
andrewbranch 2f09159
Improve logging
andrewbranch a188425
Merge branch 'master' into enhancement/only-import-from-package-json
andrewbranch 28551bb
Merge branch 'master' into enhancement/only-import-from-package-json
andrewbranch 97f778a
Function name doesn’t make any sense anymore
andrewbranch 5ddd273
Merge branch 'master' into enhancement/only-import-from-package-json
andrewbranch a9b6369
Move symlinks cache to host
andrewbranch dcd8339
Fix markFileAsDirty from ScriptInfo
andrewbranch 2afb54e
Mark new Project members internal
andrewbranch 65d0255
Use Path instead of fileName
andrewbranch 0d8568b
Rename AutoImportSuggestionsCache
andrewbranch ba7a5c5
Merge branch 'master' into enhancement/only-import-from-package-json
andrewbranch 8ba6376
Improve WatchType description
andrewbranch 0d34bfe
Remove entries() from packageJsonCache
andrewbranch 368b31d
Merge branch 'master' into enhancement/only-import-from-package-json
andrewbranch b95cbc1
Fix path/fileName bug
andrewbranch 6bb70f2
Also cache symlinks on Program for benefit of d.ts emit
andrewbranch 213a370
Let language service use Program’s symlink cache
andrewbranch 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
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
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
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.