Co-authored-by: Johanne Enama <jenama@users.noreply.github.com>
Co-authored-by: Kevin Wong <kwong0419@users.noreply.github.com>
Co-authored-by: Johanne Enama <jenama@users.noreply.github.com>
Co-authored-by: Kevin Wong <kwong0419@users.noreply.github.com>
* Test that forceConsistentCasingInFileNames does not apply to Windows drive roots
* Add file symlink baselines
* Add directory symlink baselines
* Update test to retain its meaning
Its purpose is (apparently) to demonstrate that
forceConsistenCasingInFileNames can interact badly with synthesized
react imports. Since the casing of the synthesized import has changed,
also modify the casing of the explicit reference to still conflict.
* Make VFSWithWatch.realpath use the path on disk
* Update VFS realpathSync to behave like realpathSync.native
* Use fs.realpathSync.native when available
In local measurements of an Office project, we saw initial project
loading get 5% faster on Windows and 13% faster on Linux. The only
identified behavioral change is that it restores the case used on disk,
whereas realpathSync retains the input lowercase.
* Rename SortedMap.getKeyAndValue to getEntry
* fix as suggestion.
* Update moduleSpecifiers.ts
* compare symbol rather than string
* fix typo.
* fix
* fix lint.
* better name and more clear code
* fix comment.
Co-authored-by: Orta Therox <git@orta.io>
* Have signature identity checks look at the base constraint of type parameters, allow identical type parameter lists to merge in union signatures
* Update text in fourslash test
* Add whitespace to fix lint, remove duplicate impl
* Consolidate names
* Remove comparisons of type parameter defaults, add more test cases
* Explore at least 10 levels of constraints before checking for deeply nested types
* Simplify constraint depth limiter logic
* Add regression test
* Accept new baselines
* Add text-based fastpaths into LS token matching
* Update src/services/utilities.ts
Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
* Update src/services/utilities.ts
Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
* Update src/services/utilities.ts
Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
* Limit search a bit
* Secretly, this was allowed to be `undefined` and was in fact used as such
Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
* Infer template literal types for template literal expressions
* Update test
* Update another test
* Accept new baselines
* Minor fixes
* Add tests
* Accept new baselines
* Make new TypeFlags internal
* Accept new API baselines
* Ensure template literals assignable to String, Object, {}, etc.
* Add tests
* Support find-all-references on triple-slash references that resolve to scripts
* Rename terrible name
* Add test for <reference types="..." />
* Actually accept baselines
* Naive implementation enough to build and write a test
* Add simple test
* Add project references test
* Add deduplication test, accept baselines
* Add test for referencing a script (doesn’t do anything)
* Update API baselines
* Use refFileMap for non-module references
* Fix find-all-refs on module specifier
* Remove unused util
* Don’t store text range on ts.RefFile
* Ensure string literal could itself be a file reference
* Remove unused utilities
* Improve baseline format
* Preserve old behavior of falling back to string literal references
* Update baselines from master
* Fix old RefFileMap code after merge
* Add test for additional response info
* Undo test change
* Watch extended configs if present
* Address code review comments
Added new `WatchType` for extended config files. Refactored watch map
update to separate function, relocated call sites. Removed unnecessary
test cases and relocated with new tests in programUpdates.
* Unify extended config file watching between tsc/tsserver
Update `updateExtendedConfigFilesWatch` to read from a
`TsConfigSourceFile` to get `extendedSourceFiles`. Add watcher map to
`ConfiguredProject` in the server. New test cases to verify correct
events triggered and extended files are being watched properly.
* Simplify watcher callback, fix tests
Removes unnecessary actions in extended config watcher callback
function. Updates tests to match.
* Share extended config watchers across projects in server
New shared watcher map in ProjectService that stores callbacks per
project to be invoked when the file watcher is triggered. The
FileWatcher is created with the watch options of the first Project to
watch the extended config.
* Refactor shared extended config map and watchers
Remove all server-related utility functions/types from
watchUtilities. Store config-project mapping and config file watchers
inside ProjectService with new private methods to add or remove
projects.
* Store projects in extended config file watcher
Creates SharedExtendedConfigFileWatcher in both editorServices
(tsserver) and tsbuildPublic. The file watcher is responsible for
triggering a full project reload for the contained projects. Upon
reload, any configs that are no longer related to a project have their
watchers updated to match. New test cases to confirm that the file
watchers for extended configs are closed when the project is closed.
* Apply suggestions from code review
Co-authored-by: Sheetal Nandi <shkamat@microsoft.com>
* Map extended config files by path
* Move shared watcher into utilities and add more tests
Co-authored-by: Sheetal Nandi <shkamat@microsoft.com>
* Detect comparisons between large unions or intersections
If their multiplied size is greater than 1E6 (chosen based on the repro
in #41517), then we'll expend a large amount of time and memory
comparing them, so record a trace event.
Related to #41517
* Make an exception for primitive union comparisons
* Address PR feedback
* Pick up baseline change from master
* Eliminate diagnostic and only trace
* Don't check reportErrors