Project references need to be detached from the project when closing project
In SourceMapDecoder handle when the redirected file to project reference is set as the output of the project
Keep configured project alive if project it references has open ref
Fixes#26164
* importFixes: When one file redirects to another, consider both for global import specifiers
* Add test for #26044
* Avoid a symlinked package globally importing itself (fixes another case of #26044)
* Compare to node_modules with getCanonicalFileName
* findAllReferences/rename: Search in all open projects
* Avoid needing a dummy location when location is unused
* Remove Program#getDeclarationEmitPath
* Only iterate over enabled projects
Keep emit flags set on the original node on a namespace or enum node.
This prevents dropping flags like NoComments, which caused duplicated
comment emits.
Additionally, TypeScript would emit synthetic comments twice, once for
the variable declaration, once for the module statement. This explicitly
clears away synthetic comments on namespaces and enums if their
synthetic comments have already been emitted on the corresponding
variable statement.
Previously, TypeScript would only set the text range when transforming
import and export declarations, leading it to drop synthetic comments
and emit flags.
This commit sets the original node on the statements that contains the
generated `require()` call (or similar, depending on module system),
retaining emit flags and synthetic comments.
Variables that do not have a local variable created get transformed into
a single exports assignment expression. TypeScript previously just
created a new expression and set the text range to retain original
comments, but for synthetic comments, merging the emit nodes by setting
the original node is required.
* mapTextChangesToCodeEditsUsingScriptInfo: Handle tsconfig.json text change
* Can't use `program.getSourceFile()` to determine file existence when multiple projects exist
* Use direct union instead of discriminated union
* navigateTo: Collect results from all referenced projects.
* Don't use project references, just source maps
* Move more code to session
* Test when implementation file is deleted
* Use tsserver tests instead of fourslash tests to ensure session is used
* Support find-all-references
* Restore fourslash tests
* Update emit baselines (added missing newline)
* Support rename
* @weswigham code review
* Don't open/close files
* Avoid growing `toDo` too eagerly
* @sheetalkamat code review
* Also get symlinked projects for originalLocation
* Update API (#24966)
* More @sheetalkamat code review
* Remove unnecessary test
* Update API (#24966)
* Optimize sourcemap application more
* Remove test-only memory hog sourceMapDecodedMappings field
* Update for style, remove unused function that triggers warnings in node 10
* Avoid all raw buffer constructor calls
* Small TDZ fix