* Import of Intl.Locale from #39664
* Handle updating es2020.intl and add es2021 for new DateTimeFormatOptions options - re: #39664
* Extends DateTimeFormatOptions for new Intl APIs - re: #45420
* Handle migrating Intl.NumberFormat.formatToParts to es2018 (keeping esnext.intl around)
* Adds Intl.DisplayNames to es2020 - re: #44022
* Remove attributes added in es2021 from es2020 - re: #42944
* Add a reference to es2021 in the command line parser
* Adds some docs about the lib files
* Baselines
* Allow undefined in Intl inputs to allow for ergonomic usage of exactOptionalPropertyTypes - see #45652
* Adds some tests covering the APIs
* Apply suggestions from code review
Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
* Handle PR feedback
* More review improvements
Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
* Add support for raising if you set a tsconfig entry of target/module with the right setting in the root
* Switch to check for any compiler option in the root which doesn't include compilerOptions
* Get green
* Apply suggestions from code review
Co-authored-by: Andrew Branch <andrewbranch@users.noreply.github.com>
* Update src/compiler/commandLineParser.ts
Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
Co-authored-by: Andrew Branch <andrewbranch@users.noreply.github.com>
Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
* WIP on refining the new --help
* Fix types in the boolean trivial lint rule
* Update baselines
* More work
* Updates the color logic
* Simplifies the CLI color code
* Use cyan instead of blue for win powershell/command prompt
* Use bright white when blue is probably going to look off
* Fix NO_COLOR
* Adds a test to cover NO_COLOR
* Update src/compiler/diagnosticMessages.json
Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
* Update compiler diagnostic text
Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
* Add test showing how setting strict is not preserved in tsbuildinfo
Test for #44305
* Handle strict flag when writing tsbuildinfo
Fixes#44305
* Apply suggestions from code review
Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
* Add test case for 'useUnknownInCatchVariables'.
* Add new 'useUnknownInCatchVariables' flag.
* Accepted baselines.
* Add test for catch variable explicitly typed as 'any'.
* Accepted baselines.
* Move option under 'strict'.
* Accepted baselines.
* 'useUnknownInCatchVariables' is strict in command line help.
* Update the category descriptions for the tsconfig options
* Gets tests green
* Whitespace change
* Drop command line options from --init
* Go back to the old re-build baseline
* Fix numbers
* Remove formatting options from --showconfig
* Dpon't show output formatting changes in showConfig
* Update baselines
* Update baselines
* Cache parsed path mapping patterns
If a project has many of them (e.g. 1800), parsing the patterns
repeatedly can take up a lot of time.
* Move cache to ConfigFileSpecs
* Inline constants
* Simplify cache access
* Simplify or optimize regexes with polynomial time worst cases
* PR feedback & cleanup
Co-authored-by: David Michon <dmichon-msft@users.noreply.github.com>
* Use builtin scanner function for checking whitespace in fallback method (its faster)
Co-authored-by: David Michon <dmichon-msft@users.noreply.github.com>
* Specified diagnostic for CLI flags missing a required --build
* Switched to an alternateMode member
* Added --build-incompatible flags too
* Small fixups to remove a hardcoding
* Switched to ||= factories
* Not a function
* I think I get it now
* Test for not watchiong referenced projects fileNames and invalidating it
* Add watching wild card directories and caching parsed command line for projects so that its shared
* Handle config file watching and commandline cache together
* Watch extended files for commndline cache instead of project
* Use extended config cache now that we are watching extended config files
* Structure for getParsedCommandLine from the LS
* Adding some more skeleton with todos
* getParsedCommandLine on WatchCompilerHost
* Tests for Watch, LS scenarios
* Handle getParsedCommandLine so we are looking at all things for referenced
* Cleanup and commenting
* Test for transitive references with tsc-watch
* Cache parsed command line even if host implements getParsedCommandLine
* Cleanup
* Cleanup
* Some tests to verify exclude from referenced project doesnt trigger the update
* Baseline when program is same
* Test for incremental scenario
* Tests for output from referenced project
* Comments
* Improve JSON parser error recovery
* Add error baselines
* Move tsconfig root checking out of common JSON checking function
* Use new function in parseConfigFileTextToJson
* Fix test
* Replace non-null assertion with explicit debug assertion
* Test when config file extends is incorrectly computed
Test for #40720
* Keep extended config's raw file, include, exclude relative to itself and correct it when setting extending options
Fixes#40720
* --explainFiles currently hardcoded
* Move configFileSpecs to configFile so it can be used in program later
* Explain root file inclusion reason and explain include files in the log
* Baseline explainFiles
* Fix incorrectly reporting of file list two times in --b mode
* Fix unnecessary new lines in output represented incorretly in the baseline
* More tests
* More cleaning up
* Keep listing files in same order as list files, just add explaination
* Fix double listing of file names when the program has errors
* Make diagnostic chains for file include reason
* Add explaination for the file include to diagnostics for program
* Harness ls incorrectly adding tsconfig as the root file
* Fix incorrect use of path for calculating absolute path
* Fix the root file in fourslash
* Test project service options merge
* Add config file name to matched by include explaination
* Add test for when the file changes and program is reused completely but related file information is reattached to correct location
* Handle file preprocessing diagnostics updates when program is reused and related information location changes
* Moved types to types.ts
* Refactoring and cleanup
* More cleanup
* More refatoring
* Handle synthetic imports
* Baselines after merge
* Parse excludeDirectories and excludeFiles
* Use watch factory in typings installer
* Some refactoring for watchFactory
* Create Noop watcher if file or directory being watched is excluded
* Baselines without using exclude watch options
* Baselines including exclude option
* Handle exclude options in the system watches
* Add test without exclude option for recursive directory watching
* Test baselines with exclude option
* Always set sysLog
* Test for exclude option in server
* Add exclude options in the config file and fix the test
* Fix host configuration for server
* Handle host configuration for watch options
* Fix sysLog time log so baselines can be clean
* Handle reloadProjects to reload the project from scratch
* Ensure that file updates are reflected
* Feedback
* Feedback
* Initial implementation + tests
* linty
* Support destructuring declarations and assignments
* lint
* Fix destructuring assignment and element access into known properties
* Update baselines
* Rename flag to unUncheckedIndexedAccess
* Add test for unique symbol indexing
* Fix flag order in baselines
Co-authored-by: Andrew Branch <andrew@wheream.io>
* Updates Dom lib with TSJS changes, adding a new library for webworker iterable
Co-authored-by: Nathan Shively-Sanders <nathansa@microsoft.com>
* Fixes tests
Co-authored-by: Nathan Shively-Sanders <nathansa@microsoft.com>
* Adds support for declaring the bundled name of a dts module export
Co-authored-by: Wesley Wigham <wwigham@gmail.com>
* Adds baselines
* Update the tests
* Try to reduce the scope of the bundledPackageName error
* Use the flag in more baselines
* Get it green
* More tests
* Handle more feedback
* More test cleanup
* Set the moduleResolution for the tsconfigs
Co-authored-by: Wesley Wigham <wwigham@gmail.com>
* Use disableReferencedProjectLoad to stop loading child projects to allow users to disable loading large solutions
Fixes#39144
* Handle indirect references
* PR feedback
* Add full implemention of Map and Set to shims
* Update default Map interface
* Remove WeakMap/WeakSet
* Add tests for set shim
* Update most usages of Map<K, true> to Set
* PR Feedback
* Fix lint issues
* Change key in fsWatchCallback
* Simpler shim, more tests
* Fix typo in collection shim
* Start experiment
* Add logging
* Go back to a single program
* Fix forEachExternalModuleToImportFrom
* Move auxiliary program to language service
* Add logging
* Don’t use resolution cache
* Fix(?) containingProjects for ScriptInfo in auxiliary program
* Fix ScriptInfo project inclusion
* Add test for default project of auto-importable ScriptInfo
* Add fourslash server test
* Don’t create auto import provider inside node_modules
* Add monorepo-like test
* WIP
* Naively ensure autoImportProvider is up to date after package.json change
* Start limiting when auto update provider gets updated
* Respond to changes in node_modules
* Don’t create auto-import provider until a file is open that would use it
e.g., don’t create them during cross-project find-all-refs
* Clean up naming, @internal marking, and fix empty project creation bug
* Drop devDependencies, include peerDependencies
* Add additional compiler options
* Fix interaction with importSuggestionsCache
* Move option to UserPreferences, allow inclusion of devDependencies
* Don’t filter out peerDependencies
* Watch unparseable package.jsons
* But don’t filter packages out due to an invalid package.json
* Update test
* Don’t use autoImportProvider in codefixes where it can never be used (or any refactors)
* Add CompletionEntry property for telemetry
* Add assertion for isPackageJsonImport to fourslash
* Fix missing pushSymbol argument
* Add isPackageJsonImport to tests and API baselines
* Fix unit test
* Host auto import provider in new Project kind
* Fix InferredProject attaching on AutoImportProvider-included files, load eagerly
* Update Public APIs
* Simplify PackageJsonCache host
* Remove unneeded markAsDirty
* Defer project finished event until after AutoImportProvider is created
* Make AutoImportProviderProject always report isOrphan = true
* Close and remove AutoImportProviderProject when host project closes
* Don’t set pendingEnsureProjectForOpenFiles
* Use hasAddedOrRemovedFiles instead of hasNewProgram
* Use host-wide watchOptions for package.json watching
* Add to `printProjects`
* Clean up
* Get autoImportProvider directly from LanguageServiceHost
* Clean up
* Clean up
* Close auto import provider on disableLanguageService
* Move AutoImportProvider preload to project updateGraph
* Clear auto import suggestion cache when provider program changes
* Fix tests
* Revert yet-unneeded change
* Use projectService host for module resolution host
* Don’t re-resolve type directives if nothing has changed
* Update src/server/project.ts
Co-authored-by: Sheetal Nandi <shkamat@microsoft.com>
* Use ts.emptyArray
Co-authored-by: Sheetal Nandi <shkamat@microsoft.com>