* Make the non relative name resolution cache generic
* Add cache for non relative type reference resolution
* Add getter only methods so we can use these in future for sharing resolutions across the projects
* Mark existing non relative module name cache getOrCreate as deprecated
* Prefer getters for getting directory results
* Remove webServer
First draft; I may move some things around to be more readable.
* Refactor moved code
1. Move StartSessionOptions to common next to where it's first used.
2. Inline single-use BaseLogger base class into its only child class,
Logger.
3. Start using direct imports, eg `import {} from './common'`. I hope
this is OK?!
* Fix lint
* move imports back to namespace import
* hereby tsserver: remove exportIsTsObject
* 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
* 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
* When fsEvent for change is repeated
* When trying to check if program is uptodate, read the files from disk to determine the version instead of delaying so that new program is not created if file contents have not changed
* Modify all usages of file name lower casing to use custom lower casing method
* Baseline reuse program structure tests for easy update when making changes to module resolution
* Numeric literal assignable to enum literal only when values match
* Accept new baselines
* Update compiler sources
* Accept new baselines
* Fix test runner
* Any numeric literal type is assignable to a computed numeric enum type
* Refactor `Extensions`, fix lookup priorities
* Update baselines
* Clean up
* Temporarily apply same fix to `node` for testing
* Revert ancestor node_modules lookups back to two passes
* Revert "Temporarily apply same fix to `node` for testing"
This reverts commit 4014f3005a2a01a5c71a88e6418cc635498a83bc.
* Update baselines
* Add new test for node_modules searching behavior
* Update new baseline
* 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
* Remove unnecessary redirection now that we are not in namespaces
* Move the tsc helpers in one place
* Move virtual file system with watch in unittests folder instead of harness since harness doesnt use it anyways
* Replace protocol and commandNames
* Revert incorrect pick
In namespaces, we'd have access to a variable named "ts" when debugging,
because that was just the ts namespace in the current file. But when
modules, that variable doesn't exist, either because we are pure modules
(so no ts variable), or named something else (when bundled, for export).
Tack a "ts" object onto the globals, which should make this easier. Of
course, someone may eventually declare a variable in the top level scope
named "ts" and break this, but we can cross that bridge when we come to
it.
This configures the existing build tasks to use esbuild by default. If
using the plain files is desired, passing `--bundle=false` will build
using plain files and still produce a runnable system.
This is only a basic build; a more efficient build is provided later
when gulp is replaced by hereby.
Although the existing require calls would work fine, it's more
consistent to make them actual imports and let them be converted at
compile/bundle time. It also lets us emit ESM if needed.
There are still conditional requires present for things like the node
System, but that's a more difficult problem to solve.
Now that we are modules, there's no reason to ban multiple namespaces
per file; each file is its own scope and declaring a namespace won't
merge it into any other files.