* 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>
* Add deprecated related feature
* Add more support
* fix navtree
* Add identifier check
* Add more deprecated
* fix crash
* fix more crash
* fix crash
* improve diagnostic
* avoid new tag
* avoid tags
* accept baseline
* Check deprecated in binder
* fix baseline
* fix jsdoc cache
* fix incorrect fix
* Avoid useless changes
* Accept baseline
* Add tests
* fix perf
* fix public api
* Adjust deprecated mark on qualifed name
* Revolve alias symbol
* Use modifier flags insted of symbol props
* Fix modifier flag resolve
* Make lint happy
* Fix crash
* fix crash
* Add cached utils function
* Accept baseline
* Add more tests
* try pinning octokit again
* Avoid tests
* Use utils some
* Deprecated perf test (#3)
* check valueDeclaration only
* check without modifierFlags
* donot check alias
* use cached tag
* remove call to jsdoc
* use deprecated tag
* revert changes
* Revert mission changes
* use node flags
* cache result
* cache
* avoid modifier flags
* Opts
* fix jsdoc include modifier
* fix tests
* fix again
* use symbol flag
* set @octokit/rest back to latest
* fix trailing spacel int
Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
* use canonical file name when resolve module
* renameSync in vfs supports same folder.
* Update src/harness/vfsUtil.ts
Co-authored-by: Ron Buckton <ron.buckton@microsoft.com>
* change tss rather than compiler.
* remove useless comment.
* use fileName rather than path.
Co-authored-by: Song Gao <song.gao@laserfiche.com>
Co-authored-by: Ron Buckton <ron.buckton@microsoft.com>
* Refactor node factory API, use node factory in parser
* Move UnparsedSource nodes to factory
* Make most Node properties read-only
* Make pos/end/parent and JSDoc 'comment' read-only
* Update function/constructor-type factories
* Remove treeStateObserver
* Simplify Debug.deprecate
* Remove unused factory methods, simplify lazy factory methods
* Fix base factory used for source file updates
* Update test baseline due to merge from master
* Rename factory methods to be more consistent (#39058)
* Ensure formatter can always get a newline character
* Make FormatContext.host optional since it’s not necessary if format options are all applied
* Make FormattingHost required again
* Special-case window, self, global, globalThis methods
* Disambiguate global and this property completions in details requests
* Hide the Map<boolean> implementation
* Update old tests
* Replace SymbolOriginKind stringification with dedicated enum
* Sort the arrays of fileNames in the build info
Earlier we did this in testing to ensure we could baseline now moved to actual build info writing
Fixes#37156
* Sort using compareStringsCaseSensitive
* Allow emitter to write multiple newlines in node lists
* Progress
* Progress
* Fix recomputeIndentation
* Add tests, fix leading line terminator count
* Do a bit less work when `preserveNewlines` is off
* Fix accidental find/replace rename
* Restore some monomorphism
* Fix single line writer
* Fix other writers
* Revert "Fix other writers"
This reverts commit 21b0cb8f3b.
* Revert "Fix single line writer"
This reverts commit e535e279f9.
* Revert "Restore some monomorphism"
This reverts commit e3ef42743a.
* Add equal position optimization to getLinesBetweenRangeEndAndRangeStart
* Add one more test
* Actually save the test file
* Rename preserveNewlines to preserveSourceNewlines
* Make ignoreSourceNewlines internal
* Optimize lines-between functions
* Add comment;
* Fix trailing line terminator count bug for function parameters
* Preserve newlines around parenthesized expressions
* Back to speculative microoptimizations, yay
* Don’t call getEffectiveLines during tsc emit at all
* Convert symlink scenarios to virtual FS where its symlinks are correctly maintained
Adds test for #36866
* Fix the casing issue when redirects differ in casing of the file
* Make ModuleSpecifierResolutionHost internal
* Refactoring for ModuleSpecifierResolutionHost
* If any of the file path option is from node_modules folder, consider only paths in node_modules folder
* Update src/services/utilities.ts
Co-Authored-By: Andrew Branch <andrewbranch@users.noreply.github.com>
Co-authored-by: Andrew Branch <andrewbranch@users.noreply.github.com>
* Add tests that fail because of symlink to non common directory node_modules
* When the imported module is through node_modules and symlink to folder that isnt node_modules
Most of the monorepo like scenarios are like this so looking at symlink to decide if file can be imported is essential
Fixes#28689
* Adds some docs to the LSP dts
* Ensure that getProgramDiagnostic is included everywhere that getCompilerOptionsDiagnostic is
* Update baselines
* Apply suggestions from code review
Co-Authored-By: Andrew Branch <andrewbranch@users.noreply.github.com>
* Remove the getCompilerOptionsDiagnostics -> getProgramDiagnostics change
Co-authored-by: Andrew Branch <andrewbranch@users.noreply.github.com>
* Make the systems for baselining default to pretty
* Ensure that we have seenAffectedFiles map when files are added to pending emit because they were present in the old state
This happens in build scenarios since semantic diagnostics are queried before emit and hence files are added to seenAffectedFiles pending emit
Fixes#37269
* Fix tests when there are project references but has disableSourceOfProjectReferenceRedirect
* Handle getScriptVersion correctly to ensure program structure is checked correctly
Fixes#36748
* Harness's language service host doesnt have getProjectVersion.
This means earlier we were creating fresh program everytime we did LS operation
Now we reuse same program, so quick info depends on order of quickinfo demands
* Because same program is used, it unvails a bug that if `export=` is evaluated before finding references, it cant find all definitions from the merge
* Update src/server/project.ts
Co-Authored-By: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
* Make clearSourceMapperCache required
Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
* Adds floating block comments to the outlining spans response
* Only use one route for grabbing outline nodes, which now includes special casing the EOF token
* Allow 'find references' to work on most declaration keywords
* Add support for rename
* Add more keywords, move logic out of checker and into services
* Add additional type and expression keywords
* Add test case to verify directory casing preservation when watching
* Fix unicode file name handling when watching failed lookup locations
* Add special file name lower conversion routine and use that instead of toLowerCase
Fixes#31819 and #35559
* Remove unicode from code
* Replace toLocaleLowerCase on filenames with ts.toFileNameLowerCase
* Make the intent of using toFileNameLowerCase more clear and why we make the restriction on turkish I with dot on top of it
* Update baselines for newly added tests in master
* WIP
* Test no longer crashes, but emit trampoline is incomplete and skips pipeline phases
* Fix lints, use non-generator trampoline in emit (still skips pipeline)
* Final version with emitBinaryExprssion work stack that is only used if possible
* Fix lints
* retarget to es2015 for testing
* Use bespoke state machine trampolines in binder and checker
* Remove now extraneous code in parser
* Adjust fixupParentReferences to use a depth first preorder traversal rather than breadth first
* Reintroduce incremental fast bail in fixupParentReferences
* Revert target to es5
* PR feedback
* Small edit for devops rebuild with updated definition
* Fix comment nits, add internally extraneous check back into transformer
* Adds support for showing default exports in the navtree - Fixes#34601
* Handle the feedback in #35477
* Navigation items using default export or export = will get noted if they are a const vs function
* Add test that demonstrates npm install watch behaviour some times
* Use watch invoked with `node_modules/.staging` as watch for refreshing complete node_modules, so that npm install is reflected correctly
Fixes#35966
* Add type-only support for export declarations
* Use a synthetic type alias instead of binding type-only exports as a type alias
* Works for re-exports!
* isolatedModules works fine
* Diagnostic for type-only exporting a value
* Start isolated modules codefix
* Update for LKG control flow changes
* Type-only import clause parsing
* Type-only default import checking
* Type-only named imports
* Fix isolated modules error
* Filter namespaces down to type-only
* Fix class references
* Test nested namespaces
* Test circular type-only imports/exports
* Fix getTypeAtLocation for type-only import/export specifiers
* Fix type-only generic imports
* Update public APIs
* Remove unused WIP comment
* Type-only namespace imports
* Fix factory update calls
* Add grammar errors for JS usage and mixing default and named bindings
* Update updateExportDeclaration API baseline
* Fix grammar checking import clauses
* Enums, sort of
* Dedicated error for type-only enum
* Skip past type-only alias symbols in quick info
* Update error code in baseline
* WIP: convertToTypeOnlyExport
* isolatedModules codefix (single export declaration)
* isolatedModules code fix (all)
* Stop eliding non-type-only imports by default, add compiler flag
* Update to match updated diagnostic messages
* Update more baselines
* Update more tests
* Auto-import as type-only
* Add codefix for splitting type-only import with default and named bindings
* Add more services tests
* Add targeted error message for "export type T;" when T exists
* Add targeted error for "import type T = require(...)"
* Flip emit flag
* Add test for preserveUnusedImports option
* Fix flag flip on import =
* Make compiler option string-valued
* Fix merge conflicts
* Add --importsNotUsedAsValue=error
* Phrasing of messages.
Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
* Add support for Call Hierarchies in language server
* Use baselines for callHierarchy tests
* Clean up commented code
* Support multiple hierarchy items when an implementation can't be found
* Use optional chaining in a few places
* Use getFileAndProject
* Add ignoreInterpolations util to fourslash for fuzzy diagnostic matching
* Simplify
* It’s not Swift
* Fix regexp
* Remove unnecessary type assertion
* Test
* Handle import type node when handling the namespace import and reexport
Fixes#33017
* Handle qualifier of the importTypeNode
* Handle export specifier
* Fix rename prefix when search for rename starts at qualifier in import type ndoe
* Fix rename of qualifier with importType node when invoked without provideSuffixAndPrefix option
* Create different watch options in compiler options
* Thread through the new watch options
* Actually use the options passed through for watch strategy
* Support delay on updating child directory watches
* Make watchOptions separate from compilerOptions
* Support passing watch options from command line
* Handle displaying of watchOptions
* Add isInferredProject, isConfiguredProject and isExternalProject
* Add test for rename on file with case change that fails
Test for #25460
* Dont store fileName on text storage
* Store root file names in the root file map to reflect their name
* Delay open file triggering watches
* Correct the name of source file as we query it (eg. it could be same source file returned in old program with different casing on case insensitive file name)
* More tests
* Refactoring
* Cache bind And check diagnostics and always get program diagnostics from the program
* Another test
* Try to report conflicting file error on file instead of global diagnostics
* Create better tests for module resolution diagnostics check
* Fix lint errors
* Move most harness globals into namespaces
* Remove forward declaration from `createMapShim` and move all `Map` declarations into one file
* A small pile of more changes to get the harness transforming
* Move codefix types into services/types.ts
* Also split apart refactorProvider
* Move all meanings of DocumentHighlights into one file
* Use setter for object allocator
* Remove unneeded namespace reference
* Remove some shorthand references to nonlocal namespace variables
* Convert WatchType string enum to a structure that can be merged across modules
* Rename harness to harnessIO
* Move accidental globals into namespace
* Remove unused globals
* Suppress lints - these qualifiers are needed for the migration to go smoothly
* Hide global declaration
* Fix up quotation marks in error messages in JavaScript files.
* Accepted baselines.
* Typescript -> TypeScript
* Accepted baselines.
* Migrate syntactic diagnostics tests to baselining tests.
* Accepted baselines.
* Update diagnosticMessages.json
* Removed markers.
* Add ability to baseline both semantic and syntactic diagnostics.
* Fix up broken diagnostics when using a server LS.
* Accepted baselines.
* Lints.
* Fake up sourcefile objects in the tsserver session client instead.
* Fewer allocations.
* Add preceding semicolon on await insertion when parentheses are included
* Just start with precedingToken
* Fix semicolon formatter regression
* Delete test with debatable expected behavior
* Lint after control flow changes
* Move package.json related utils to utilities
* Add failing test
* Make first test pass
* Don’t filter when there’s no package.json, fix scoped package imports
* Use type acquisition as a heuristic for whether a JS project is using node core
* Make same fix in getCompletionDetails
* Fix re-exporting
* Change JS node core module heuristic to same-file utilization
* Remove unused method
* Remove other unused method
* Remove unused triple-slash ref
* Update comment
* Refactor findAlias to forEachAlias to reduce iterations
* Really fix re-exporting
* Use getModuleSpecifier instead of custom hack
* Fix offering auto imports to paths within node modules
* Rename things and make comments better
* Add another reexport test
* Inline `symbolHasBeenSeen`
* Simplify forEachAlias to findAlias
* Add note that symbols is mutated
* Symbol order doesn’t matter here
* Style nits
* Add test with nested package.jsons
* Fix and add tests for export * re-exports
* Don’t fail when alias isn’t found
* Make some easy optimizations
* Clean up memoization when done
* Remove unnecessary semicolon
* Make getSymbolsFromOtherSourceFileExports pure
* Cache auto imports
* Revert "Cache auto imports"
This reverts commit 8ea4829587.
* Handle merged symbols through cache
* Be safer with symbol declarations, add logging
* Improve cache invalidation for imports and exports
* Check symbol presence first
* Only run cache invalidation logic if there’s something to clear
* Consolidate cache invalidation logic
* Fix reuseProgramStructure test
* Add more logging
* Only clear cache if symbols are different
* Refactor ambient module handling
* Start caching package.json stuff
* Support package.json searching in fourslash
* Move import suggestions cache to Project
* Start making more module specifier work available without having the importing file
* Going to backtrack some from here
* Get rid of dumb cache, fix node core modules stuff
* Start determining changes to a file have invalidated its own auto imports
* Move package.json related utils to utilities
* Add failing test
* Make first test pass
* Don’t filter when there’s no package.json, fix scoped package imports
* Use type acquisition as a heuristic for whether a JS project is using node core
* Make same fix in getCompletionDetails
* Fix re-exporting
* Change JS node core module heuristic to same-file utilization
* Remove unused method
* Remove other unused method
* Remove unused triple-slash ref
* Update comment
* Refactor findAlias to forEachAlias to reduce iterations
* Really fix re-exporting
* Use getModuleSpecifier instead of custom hack
* Fix offering auto imports to paths within node modules
* Rename things and make comments better
* Add another reexport test
* Inline `symbolHasBeenSeen`
* Simplify forEachAlias to findAlias
* Add note that symbols is mutated
* Symbol order doesn’t matter here
* Style nits
* Add test with nested package.jsons
* Fix and add tests for export * re-exports
* Don’t fail when alias isn’t found
* Make some easy optimizations
* Clean up memoization when done
* Remove unnecessary semicolon
* Make getSymbolsFromOtherSourceFileExports pure
* Cache auto imports
* Revert "Cache auto imports"
This reverts commit 8ea4829587.
* Handle merged symbols through cache
* Be safer with symbol declarations, add logging
* Improve cache invalidation for imports and exports
* Check symbol presence first
* Only run cache invalidation logic if there’s something to clear
* Consolidate cache invalidation logic
* Fix reuseProgramStructure test
* Add more logging
* Only clear cache if symbols are different
* Refactor ambient module handling
* Finish(?) sourceFileHasChangedOwnImportSuggestions
* Make package.json info model better
* Fix misplaced paren
* Use file structure cache for package.json detection when possible
* Revert unnecessary changes in moduleSpecifiers
* Revert more unnecessary changes
* Don’t watch package.jsons inside node_modules, fix tests
* Work around declaration emit bug
* Sync submodules?
* Delete unused type
* Add server cache tests
* Fix server fourslash editing
* Fix packageJsonInfo tests
* Add node core modules cache test and fix more fourslash
* Clean up symlink caching
* Improve logging
* Function name doesn’t make any sense anymore
* Move symlinks cache to host
* Fix markFileAsDirty from ScriptInfo
* Mark new Project members internal
* Use Path instead of fileName
* Rename AutoImportSuggestionsCache
* Improve WatchType description
* Remove entries() from packageJsonCache
* Fix path/fileName bug
* Also cache symlinks on Program for benefit of d.ts emit
* Let language service use Program’s symlink cache
* Allow allowJs and declaration to be used together
This intorduces a new symbol-based declaration emitter - currently this
is only used for JSON and JavaScript, as the output is likely worse than
what the other declaration emitter is capable of. In addition, it is
still incomplete - it does not yet support serializaing namespaces.
* Add tests for various import/export forms, add notes on export as namespace and fix export * from
* Tests & fixes for computed names
* Add test with current @enum tag behavior
* fix declaration emit for jsdoc @enum tags
* Small adjustments to base class serialization to fix bugs in it
* Guard against type/type parameter confusion when using typeParameterToName a bit
* Integrate feedback from PR
* Fix issue with export= declarations visibility calculation and type declaration emit that impacted all forms of declaration emit
* Only make one merged getCommonJsExportEquals symbol for a symbol
* Support preserving type reference directives in js declarations
* Skip declare mdoifiers for namespace members in ambient contexts
* FAKE ALIASES AND NAMESPACES EVERYWHERE
* Dont do namespace sugar when type members contain keyword names
* Fix json source file export modifier under new output
* Such clean nested aliasing, very wow
* Fix lint
* Add visibility errors, reuse type nodes where possible
* Suppoer having correctly named import types in bundled js declaration emit & adjust binding to allow namespaces with aliases to merge when the aliases look to be type-only
* Better support for module.exports = class expression
* Fix discovered crash bug
* Allow export assigned class expressions to be reachable symbols from external declarations
* Add missing semicolon
* Support @enum tag post-merge
* preserve comments on signatures and declarations where possible
* Basic support for js classy functions
* Add example we should do better with
* Prototype assignments make things a bit wonky, but the example from the PR seems OK
* Make a ton of changes to support the new way js classes are bound
* Remove some old comments, fix import and export default names
* Fix bug in object define handling and add tests for object define property declaration emit
* Fix organization nits from PR comments
* Preserve comments from jsdoc declarations on properties and js declaration type aliases
* Merge export declarations with identical specifiers
* Remove completed TODO comment
* Split lint
* Remove now-unused function
* PR feedback
* Add some project references tests, remove some checks from project refs codepaths that are now invalid
* Update project references tests again
* Merge and update project references tests
* Rename case
* Update test to include declaration output
* Remove yet another project refernces redirect extension check
* Update comment
* Add additional import ref to test
* Add shorthand prop to test
* Fix comment text
* Extract var to temp
* Simplify function and add whitespace
* Update project refs test to use incremental edit entry
* Stylistic refactors in the symbol serializer
* Another round of PR feedback, mostly style, small bugfix with constructors, and test showing bug in export assigned class expression name shadowing
* Use x instead of index
* Add UserPreferences for semicolons
* Prototype formatter semicolon removal
* Implement semicolon insertion
* Fix existing tests
* Start adding tests
* Fix some edge cases of semicolon deletion
* Fix semicolon removal before comments
* Fix indentation
* Test on checker
* Replace semicolon-omitting writer with formatter preference
* Fix writing new nodes, update protocol
* Rename option
* Really fix formatting synthetic nodes
* Fix refactoring misses
* Un-update submodules gahhhh
* Update APIs
* Update for ESLint
* Revert accidental test change
* De-kludge deduplication of EOF processing
* Omit last element semicolon from single-line object-like types
* Revert "Omit last element semicolon from single-line object-like types"
This reverts commit 5625cb0237.
* Fix straggler test
* Add test for leading semicolon class members
* Rename a lot of stuff for clarity
* Invert some boolean logic
* Add test that fails because file is written multiple times
Reported from #33061
* Handle seenEmittedFiles which was not being set when emit of a file was complete.
It was issue only when errors are reported before emitting (which puts the files into pendingEmit that needs to check only in seenEmittedFiles)
If emit happens before semantic diagnostics query this issue is not repro, because the affected files come into play and those are being set correctly
Fixes#31398
* make baselining source map optional
* Handle emitDeclarationOnly in --build scenario
* Ensure we are using d.ts emit as signature even when --declarationMap is on (map files are emitted before d.ts)
* Move module specifiers to verifyTsBuildOutput
* implement create Hash to be default hashing plus data so we can verify it easily in baseline
* Remove failing baseline
* Accept correct baseline name
* Add test case
* Fix infer from usage property assignment
Property assignment and shorthand property assignment were incorrectly
treated differently; both have ObjectLiteralExpression as a parent, but
the code previously assumed that property assignments had
ObjectLiteralExpression as parent.parent.
Also make fourslash directives case insensitive and less whitespace
sensitive.
* Add "incorrect 3-slash" error to fourslash parsing.
* Resolve module specifier relative to moduleFile.originalFileName
* Use baseline testing for outputs
* Added skipLibCheck to test
* Switch to using vfs.formatPatch for output
* Fix emit for object rest on a module export
* Add tests for exports of empty object/array binding patterns
* Add delay for exec to ensure diff tool has enough time to start
* Add failing tests
* Use default import or namespace import for import fixes when compiler options allow
* Don’t do import * for export=, ever
* Only do import default for export equals if nothing else will work
* Never do import/require in a JavaScript file
* Update tests for changes in master
* Add const/require fix for JS and select based on usage heuristic
* Fix JS UMD import
* Update LKG
* Add @types/node version bump
* Small paatches/casts to be compatible with latest node
* Accept API baseline update
* Make internal NodeBuffer compatable with latest Buffer
* Why do we even have an internal buffer type
* Sync up internal buffer type better
* Fix lint
* Readd mroe missing Buffer methods
* Bind a jsdoc enum as SymbolFlags.TypeAlias and not SymbolFlags.Enum
* Actually include an @enum tag as a declaration
* Add enum tag refs into a couple more syntax kind lists
* accept symbol baseline update
* Fix type keyword completions
1. In functions, type keywords were omitted.
2. In All context, no keywords were omitted.
(1) fixes#28737
(2) removes 17 keywords that should not be suggested, even at the
toplevel of a typescript file:
* private
* protected
* public
* static
* abstract
* as
* constructor
* get
* infer
* is
* namespace
* require
* set
* type
* from
* global
* of
I don't know whether we have a bug tracking this or not.
* Change keyword filter in filterGlobalCompletion
Instead of changing FunctionLikeBodyKeywords
* Add more tests cases
* Make type-only completions after < more common
Because isPossiblyTypeArgumentPosition doesn't give false positives now
that it uses type information.
* Move package.json related utils to utilities
* Add failing test
* Make first test pass
* Don’t filter when there’s no package.json, fix scoped package imports
* Use type acquisition as a heuristic for whether a JS project is using node core
* Make same fix in getCompletionDetails
* Fix re-exporting
* Change JS node core module heuristic to same-file utilization
* Remove unused method
* Remove other unused method
* Remove unused triple-slash ref
* Update comment
* Refactor findAlias to forEachAlias to reduce iterations
* Really fix re-exporting
* Use getModuleSpecifier instead of custom hack
* Fix offering auto imports to paths within node modules
* Rename things and make comments better
* Add another reexport test
* Inline `symbolHasBeenSeen`
* Simplify forEachAlias to findAlias
* Add note that symbols is mutated
* Symbol order doesn’t matter here
* Style nits
* Add test with nested package.jsons
* Fix and add tests for export * re-exports
* Start prototyping addMissingAwait codefix
* Filter by diagnostics that have missing-await related info
* Start writing tests and checking precedence
* Implement codeFixAll, add test for binary expressions
* Add test for iterables
* Add test for passing argument
* Add test for call/construct signatures
* Add test for awaiting initializer
* Improve assertion error
* Replace specific property access error with general one and add await related info
* Add test for property access
* Require code to be inside a function body to offer await
* Accept suggestion
Co-Authored-By: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
* Add explicit test for code fix being not available unless something is a Promise
* Skip looking for function body if already in AwaitContext flags
* Inline getCodeActions function for symmetry
* Improve typing for Generators and Async Generators
* Add TReturn and TNext to Iterator, IterableIterator, etc.
* Update ts internal Iterator to be assignable from global Iterator
* Make 'done' optional in IteratorYieldResult
* Revert Iterable and IterableIterator to simpler versions plus other fixes
* Add additional inference tests
* Added additional tests
* PR cleanup and minor async iteration type fix
* Updated diagnostics message and added non-strict tests
* Fix expected arity of Iterator/AsyncIterator