Old: Insert the same Node for every occurrence. The position was
repeatedly mutated during printing.
New: Thunk the Node so that a new one is constructed for every
occurrence.
Fixes#18857
Now that we're smarter about where we declare the extracted local, we
can ignore usage problems in the innermost script - it'll always have
access to the same symbols as the extracted expression.
...mostly by putting them closer to the extraction site.
They now also follow all leading comments in a file (unfortunately,
including the doc comment on the first declaration).
Bonus: Special case declaration lists - declare the new variable as part
of the list, rather than before it, in case it depends on an earlier
entry.
1) It assumed left-associativity and was, therefore, wrong for (e.g.)
exponentiation.
2) Arguably, if a user selects `a + |b + c|`, they want to extract `b +
c`, not `a + b + c`. Not being able to do so is surprising (and we may
eventually want to allow it), but so is having the rest of the
least-common subtree extracted.
Fixes#18268
Major changes:
1) Instead of skipping undesirable scopes, include them and mark them
with errors. Constants can be extracted into more scopes.
2) Update the tests to call through the "public" API. This caused some
baseline changes.
3) Rename refactoring to "Extract Symbol" for generality.
4) Return a second ApplicableRefactorInfo for constants. Distinguish
the two by splitting the action name.
* Handle translation between new and old log format styles
* Iteration
* Strip all backcompat
* Remove new parenthesis
* Handle directories in the test perf heuristic measurement
* Optional catch bindings!
* Always generate type & symbol baselines
* Accept changed shadowed baselines
* Accept brand new type and symbol baselines
* Allow `getTypeAtLocation` to return undefined in the type writer
* Accept baselines which had missing type information
* Bind container for dynamically names enum members so they may be printed
* Accept type/symbol baselines for enums with computed members
* First pass at reducing typeWriter memory overhead
* Use generators to allow for type and symbol baselines with no cache
* Accept new baselines for tests whose output was fixed by better newline splitting
* Hard cap on number of declarations printed, cache declaration print text
* handle differing newlines better still to handle RWC newlines
* Lower abridging count, accept abridged baselines
* Limit max RWC error output size, limit RWC type and symbol baseline input size
* Move skip logic into type and symbol baseliner to streamline error handling
* Accept removal of empty baselines
* Canonicalize path earlier to handle odd paths in input files
* Do canonicalization earlier still, also ensure parallel perf profiles for different targets do not trample one another
* No need to pathify again
* Keep a small reserve of tasks to not-batch, so all threads can have an initial task"
* Assign no weight to new tests, but still place them at the end of the list
* Remove batching on unittest thread
* Batch more things, improve output, use past test perf as a better heuristic for future test runs
* Fix merge sideeffect
* Fix typo
* Some tests depended on late execution
* Emulate mocha execution order
* Polyfill a synchronous done to handle that one unittest
* Accpept updates tsconfig baselines fixed by #18534
* Let the RWC harness iterate over files instead of building one big file
* Handle duplicated-only-in-case outputs better in the type baseliner
* Always lowercase output names
* Move common code into helper function
* Always write .delete for missing files even if there were errors
* Out with the old...
* Brave new world
* Throttle console output
* Batches test messages on large inputs initially
* Move parallel runner code into seperate files