Sheetal Nandi
3234d102ed
Instead of iterating over resolutions to invalidate per global cache pass, invalidate them at usage site
2024-09-20 11:45:37 -07:00
Sheetal Nandi
4f34cae519
Use globalCacheResolution to invalidate resolutions on typings update
2024-09-20 11:45:37 -07:00
Sheetal Nandi
f01df5f73f
If typing installer is disabled invalidate all the resolutions from typings cache
...
This change finally makes all tests pass incremental tests for matching resolutions and program structuture
2024-09-20 11:45:37 -07:00
Isabel Duan
52eaa7b02f
Enable --isolatedDeclarations on TS codebase ( #59635 )
...
Co-authored-by: Sheetal Nandi <shkamat@microsoft.com>
Co-authored-by: Andrew Branch <andrew@wheream.io>
2024-09-15 18:10:52 -07:00
Sheetal Nandi
ea699093ce
We may not always get file notifications for file creation, so always check for failed lookups starting with the path as well as exact path ( #59882 )
2024-09-06 12:20:13 -07:00
Sheetal Nandi
87d0e771a8
Fix issues with global typings cache and what gets watches ( #59869 )
2024-09-05 13:06:30 -07:00
Jake Bailey
195203e971
Add regex eslint plugin, fix lints ( #59371 )
2024-08-13 14:16:53 -07:00
Sheetal Nandi
f37482cd16
Always watch package jsons for the sourceFile ( #59311 )
2024-07-16 16:01:33 -07:00
Sheetal Nandi
9c093c13e6
Do not reuse ambient module name resolution from other files while determining if resolution can be reused ( #59243 )
2024-07-12 14:43:00 -07:00
Sheetal Nandi
247a98335d
In project, instead of iterating over program files to determine if file needs to be detached, do it through existing mechanism of releasing oldSourceFile ( #59181 )
2024-07-08 13:37:44 -07:00
Lars Kappert
752135eb40
Remove unused exports & dead code (using Knip) ( #56817 )
...
Co-authored-by: Jake Bailey <5341706+jakebailey@users.noreply.github.com>
2024-06-27 14:24:01 -07:00
Sheetal Nandi
f7833b2a72
On linux or editor with canUseEvents to prefer immediate directory if its not in root or node_modules ( #58866 )
2024-06-27 11:32:33 -07:00
Sheetal Nandi
a6bc4ecbe5
Remove refCount from resolutions as we dont need it explicitly since its tracked by files it references ( #59041 )
2024-06-26 12:46:53 -07:00
Sheetal Nandi
7c011e766e
Refactor resolving module or type reference name ( #59040 )
2024-06-26 12:46:39 -07:00
Jake Bailey
16beff101a
Use explicit extensions for imports within src ( #58421 )
2024-05-06 17:07:54 -07:00
Sheetal Nandi
b006768548
When watching failed lookups, watch packageDir if its a symlink otherwise the path we use to watch ( #58139 )
2024-04-12 11:03:51 -07:00
Sheetal Nandi
12402f2609
Ensure that we are checking if correct file with resolved path is present in the new program when removing the existing packageJson watching ( #57988 )
2024-03-28 12:02:45 -07:00
Sheetal Nandi
ac962eaa1f
Fix incorrect use of "path" instead of "resolvedPath" when watching file's package json locations ( #57931 )
2024-03-25 11:00:33 -07:00
Andrew Branch
6cb6fc94ae
Add --module preserve, support require in --moduleResolution bundler ( #56785 )
2024-01-19 12:03:24 -08:00
Andrew Branch
69f2e2ae65
Issue better error when unresolvable package in --moduleResolution node10 resolves with --moduleResolution bundler ( #56949 )
2024-01-16 09:36:14 -08:00
Sheetal Nandi
b6121e400c
Replace disk path operations to use fileNames instead of path ( #56476 )
...
Co-authored-by: Andrew Branch <andrewbranch@users.noreply.github.com>
2023-11-27 22:21:29 -08:00
Sheetal Nandi
9473195b6c
noDts project resolutions verification and updates for incremental behaviour ( #56016 )
2023-10-10 10:24:08 -07:00
Sheetal Nandi
dcb0fa7f44
Incremental testing for program structure and resolutions and fixes ( #55814 )
2023-09-22 10:53:19 -07:00
Sheetal Nandi
fc418a2e61
Special case "/workspaces" for watching root so that codespaces work correctly ( #55738 )
2023-09-14 11:34:19 -07:00
Sampo Kivistö
ec2bd4e252
perf: replace String and Array indexOf method calls with includes method call ( #55482 )
2023-08-25 11:27:55 -07:00
Jake Bailey
5e8c261b6a
dprint the codebase ( #54820 )
2023-08-16 14:26:38 -07:00
Sheetal Nandi
9261ca7a13
Share redirects cache key calculation between multiple caches used for module resolution and type reference directive ( #55376 )
2023-08-14 18:46:55 -07:00
Sheetal Nandi
8b825f7aaa
Handle module node found error reporting in incremental and watch scneario ( #54115 )
2023-05-09 13:42:26 -07:00
Sheetal Nandi
ddd5084659
Add resolveLibrary method on hosts and store resolvedLibraries in program so that resolutions can be reused ( #53877 )
2023-04-20 13:50:22 -07:00
Sheetal Nandi
b846033000
Instead of clearing out all resolutions and closing all the directory watchers, mark everything as invalidated when changes affect module resolution ( #53882 )
2023-04-18 10:21:17 -07:00
Sheetal Nandi
9919f6da1d
Dont defer non relative type reference directive resolutions watching since we dont need to check ambient module presence to determine whether to watch them ( #53875 )
2023-04-17 12:37:51 -07:00
Sheetal Nandi
53d378720a
When installing unrelated package inside scoped packages dont invalidate resolutions from everything in the scoped package ( #53873 )
2023-04-17 12:37:32 -07:00
Sheetal Nandi
df3bec6674
Tweak module resolution failed lookup watching ( #53591 )
2023-04-13 14:50:50 -07:00
Sheetal Nandi
d07b1b93ab
Fix incorrect setting of nonRecursive watch field ( #53675 )
2023-04-05 14:17:52 -07:00
Sheetal Nandi
2eab265a2b
Baseline some watch related path determinations so its easy to track changes ( #53598 )
2023-03-31 15:13:06 -07:00
Jake Bailey
ac55b297b7
Upgrade "boolean-trivia" lint to new "argument-trivia" lint that uses type info, has quick fixes, etc. ( #53002 )
2023-03-23 16:26:39 -07:00
Jake Bailey
913f65c28d
Remove most "import * as ts" imports, except for const enum reverse mapping and plugins ( #53329 )
2023-03-20 10:50:40 -07:00
Sheetal Nandi
9c5b09cd21
Updates to type reference directive resolution and module resolution when failed ( #51715 )
2023-03-01 10:57:47 -08:00
Jake Bailey
ca1cf3dd85
Deprecate UnderscoreEscapedMap and remove internal uses ( #53032 )
2023-02-28 16:55:29 -08:00
Jake Bailey
f1ff0de943
Use native generators/iterables, remove helper cruft ( #51921 )
2023-01-06 14:40:56 -08:00
Sheetal Nandi
84e475c105
Make resolution cache use sets instead of arrays for easier checking ( #51735 )
2022-12-06 14:25:19 -08:00
Sheetal Nandi
9e845d2248
Api cleanup for Module and Type Reference directive resolution ( #51546 )
...
* Refactoring so CacheWithRedirects has Key and Value type parameters
* ModuleResolutionCache or TypeRefDirectiveCache will look in directory before solving, so ResolutionCache doesnt need this check
* Test showing module resolution is not shared because resolution cache doesnt update own options
* Enable traceResolution on some of the project reference tests
* Simplify CacheWithRedirects and ensure the options are set in all common scenarios so cache can be shared between redirects
* Make failedlookup etc optional in ResolvedModule/TypeRefefWithFailedLookupLocations
Also make accidental public failed lookup internal
* Add new API for module and type ref resolution
* Store auto type reference resolutions
* Modify test to show how using program partially doesnt report resolution diagnostics
* Ensure that resolution diagnostics are reported in filePreocessingDiagnostics so they can be reused when program is reused
* Some cleanup
* Remove the newly added ReoslutionInfo in favor of new APIs
* update
2022-12-05 11:56:33 -08:00
Sheetal Nandi
7b7f6a75ea
Code refactoring for module resolution api ( #51675 )
...
* Refactoring so CacheWithRedirects has Key and Value type parameters
* ModuleResolutionCache or TypeRefDirectiveCache will look in directory before solving, so ResolutionCache doesnt need this check
* Test showing module resolution is not shared because resolution cache doesnt update own options
* Enable traceResolution on some of the project reference tests
* Simplify CacheWithRedirects and ensure the options are set in all common scenarios so cache can be shared between redirects
2022-12-01 10:17:58 -08:00
Jake Bailey
00dc0b6674
Flip imports to case insensitive sorting ( #51579 )
2022-11-17 15:35:28 -08:00
Jake Bailey
2d2a4343b8
Reformat imports to be one identifier per line ( #51565 )
2022-11-17 13:42:18 -08:00
Sheetal Nandi
9ede7ce006
Fix incorrect spelling of packageId ( #51483 )
2022-11-10 16:55:49 -08:00
Sheetal Nandi
c5aea89230
Add alias ResolutionMode for ModuleKind.ESNext | ModuleKind.CommonJs | undefined ( #51482 )
...
* Add alias ResolutionMode for ModuleKind.ESNext | ModuleKind.CommonJs | undefined
* ResolutionMode | undefined = ResolutionMode
* More
2022-11-10 16:47:46 -08:00
Sheetal Nandi
3eafb64faf
Handle reusing type reference resolution in resolution cache correctly ( #51475 )
...
* Add tests where typeRef resolution is not in the cache
* Ensure that type ref reuse is actually handled since type ref resolution only sends containingSourceFileMode and not containingSourceFile
2022-11-10 16:03:25 -08:00
Jake Bailey
9f64a3a58c
Remove ts.{Map,Set,ESMap,Iterator} and associated types ( #51439 )
2022-11-09 15:06:31 -08:00
Sheetal Nandi
48aebcdcdb
TypeReference directive reuse ( #49750 )
2022-11-07 15:15:11 -08:00