Component commits:
94cf1272e5 Fix `isVariableDeclarationInitializedToBareOrAccessedRequire` returning true on binding elements
fae1bbedc1 Undo auto format change
Co-authored-by: Andrew Branch <andrew@wheream.io>
* Remove Node12, add Node16.
* Accepted baselines.
* Refactor checking for top-level await, give a better error message in CJS files.
* Accepted baselines.
* Stop erroring on JSON module imports in node ESM since they're no longer experimental.
* Accepted baselines.
* More refactoring, do the same checks for for-await loops.
* Accepted baselines.
* Adjust phrasing to permit for-await on CJS error.
* Accepted baselines.
* Accepted baselines.
* Fix lints.
* WIP
* fix cross-project renaming logic
* only use configure if prefix opt is defined
* refactor skipAlias into stopAtAlias
* fix stopAtAlias
* update another stopAtAlias location
processChildNodes needs to skip processing when the node array is
outside the target range, just like processChildNode already does for a
single node.
Fixes#48006
* Added unit test
* Added baseline test
* Dirty solution
* Code refactoring and improvements
* Added more test cases
* Refactor to use flatMap
* Added utility function to get all Nodes with JSDocs
* Minor improvements
* Use recursion to check all tree levels
* Removed unit test
* Removed previous changes
* Updated resolveEntityName call
* Updated dontResolveAlias clause
* Updated symbol flags
* Updated baseline
* Fix dont resolve alias problem
* Updated tests
* Add failing test
* Block auto-import module specifiers including node_modules path
* Eagerly resolve module specifiers in completions in nodenext so failures can be filtered
* Add completion info flags for telemetry
* Update API baseline
* Update completions baselines
* Fix missed boolean flip
* Fix remaining tests
* change error message on Promise
* fix(46570): Unhelpful Promise type argument hint in JS file
* refactor: Reword void Promise message for JSDoc type hint to provide better feedback
Co-authored-by: Osa <osaimola@gmail.com>
By copying the kludge in @typedef. @callback's order is simpler, so the
kludge is simpler. However, it's wrong here, and in @typedef. Parsing
tag comments is normally supposed to happen at the end of a tag, but in
@callback and @typedef happens *before* parsing the nested
@param/@property tags.
I still need to figure out what a real fix is -- but for the beta,
copying the existing crash-avoidance kludge from @typedef is best
anyway. I added a test case for typedefs for future use as well.
* Prototype resolving to JS when go-to-def aliases all resolve to ambient declarations
* Add test infrastructure
* Start fleshing out test coverage
* Fix some go-to-def stuff
* Finish lodash test case
* Make go-to-implementation never return ambient results
* Build new functionality into go-to-implementation
* Update baselines
* Two more test cases
* Refine definition searches for unresolved imports
* Revert "Build new functionality into go-to-implementation"
This reverts commit 381799d0f104000c676334c8e08fcdff9ccac896.
* Fix tests
* Revert go-to-implementation changes
* Wow a bunch of code was unnecessary
* Update baselines and go-to-def test
* Fix navigation on symbols that are not aliases but resolve through aliases in chain
* Temporarily replace go-to-def with new command implementation
* Revert "Temporarily replace go-to-def with new command implementation"
This reverts commit 34c6cfdebbb9e2506ea5e6d528d2cb57b2cdeb2e.
* Revert "Wow a bunch of code was unnecessary"
This reverts commit 1cb2ba646c9e80d1ca08b6fc3f6a2219aac44f67.
* Bring back some deleted code needed for a new test case
* Clean up a little
* Rename more stuff
* Update test
* Update API baseline
* Temporarily replace go-to-def with new command implementation
* PR review fixes
* Fix getTopMostDeclarationNamesInFile
* Rename local
* Use hash set
* Remove option from commandLineParser
* Keep noDtsResolution project around
* Handle AuxiliaryProject kind in ScriptInfo getDefaultProject etc.
* Do not run updateGraph in the background for AuxiliaryProject
* Don’t create auxiliary project outside of semantic mode
* No-op on scheduled invalidation
* Add comments to unit test
* Sync compiler options to auxiliary project
* Fix case sensitivity
* Update extensionIsOk with new file extensions
* PR feedback
* Update API baseline
* Mark scheduleInvalidateResolutionsOfFailedLookupLocations internal
* Use same heuristics on property accesses of loosely-resolvable aliases as unresolvable named imports
* Rename command, and no need to return the bound span
* Update API baseline
* Don't report isDefinition unless the starting node is a declaration
* Drop isDefinition everywhere it isn't specifically needed
* Fix tsserver tests
* Update shim comment
* Update baselines
* Add tests for isDefinition
* Update doc comment
* Clear isDefinition from all references if the first one lacks it
* fix(48540): Remove comments from jsdoc union type expression
* fix(48540) - Remove comment for top level import and add extract typedef tests
* fix(48540) - Remove comments from jsdoc's descendant
* fix(48540) - Using no nested comments instead of traversing
* Add 'extends' clause to 'infer' type
* Revise parse for infer..extends, improve parenthesizer
* More aggressive parens to match existing DT tests
* tests 'infer' constraint using outer type parameter
* Adds a test showing 'infer' cannot reference other 'infer' in same 'extends'
* Emit extends clause for synthetic infer typesduring declaration emit
* fix(48109) - Remove extra indent when converting to arrow function
* fix(48109) - Only treat curly brace in object literal as block
* Apply suggestions from code review
Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
* Convert referenceToClass to baselining
* Delete stray marker from findAllRefsInsideWithBlock
* Bulk convert tests that just call verify.singleReferenceGroup
* Update tests with duplicate names
* Bulk update verify.singleReferenceGroup tests with BOMs
* Semi-automatically convert FAR tests with explicit range code
* Convert findAllReferencesDynamicImport2 to baselines
* add label details to completion entry
* Use label details for obj literal method completions
* add label details support flag
* add label details support to fourslash
* support both label details and non-label details in object literal method snippets
* CR fixes
* fixes after rebasing
* fix tsserver tests
* skeleton of new feature
* working prototype
* refactor print and format code into its own function
* minor changes; don't support overloads
* have two completion entries
* get rid of accessor support
* add snippet support
* add formatting
* add trailing comma
* add sourcedisplay
* support auto-imports via completion details
* add user preference option and fix ordering of entries
* cleanup
* don't return code actions for no import fixes
* make sortText lower priority for snippets
* get rid of flag
* use optional member sort text
* update baselines
* don't collect method symbols if insert text is not supported
* remove comment
* return undefined if type is not function type
* only slice if needed
* use union reduction; more test cases
* WIP: modify sort text system
* Improve new sort text system
* add signature and union type check
* re-add flag
* fix tests
* rename sort text helper
* fix test and code for union case
* add new flag to protocol type
* fix spaces
* CR: minor fixes
* CR: more fixes
* CR: restructure main flow
* minor fix