Releases: nicoespeon/abracadabra
Releases · nicoespeon/abracadabra
6.14.3
Upgraded a few dependencies and added a sponsor badge to the extension.
6.14.2
No user-visible change. This release makes Abracadabra work in browser environments again.
6.14.1
No user-visible change. This release fixes the deployment of 6.14 in all the target environments.
A Cover Is Not the Book 📕
Added
- "Extract Interface" will let you know when it couldn't determine the return type of a method.
- "Move to existing file" can now move interfaces with generics. Kudos @jtwigg for raising that up!
- Make "Inline Function" work if an object key matches one of the parameter names in the function body. Props to @automatensalat for spotting this one!
- [New Refactoring] "Extract useCallback()" for React, kudos to @ianobermiller for this one!
Oo-De-Lally 🏹
Fixed
- "Inline Function" now works on async function without creating a double
await
. Thanks @automatensalat for catching this! - Fixed an issue with "Convert to Template Literal" and backticks. Thanks @fabien0102!
- Extract Interface doesn't remove existing interface implements anymore. Thanks @BuZZ-dEE!
Changed
- Expose "Inline Variable" as a quick fix, as suggested by @brunnerh
Added
- Make Convert Switch to If-Statement handle switches with only a
default
statement. Thanks @11joselu for the suggestion!
Some Things Never Change 🍁
Added
- Move to Existing File now supports moving exported elements. It will preserve the export, so your module API won't break.
- Move to Existing File can now move variable declarations too!
Dos Oruguitas 🦋
Fixed
- Inline Variable won't remove the extraneous
${}
if it can't, so you don't end up with broken code. Thanks @rsxdalv for reporting this one 👍
Added
- Move Statements now support JSX attributes, so you can swap them with a single keystroke 🏇
- Remove Redundant Else will now work if the If statement has no sibling next. It will insert the necessary
return
statement to create a guard clause for you.
When You Wish Upon a Star ⭐
Fixed
- "Convert For to ForEach" used to singularize the array name for naming each individual item. That's naive, not all array variables are plural! It will now fall back on
<arrayName>Item
if it can't find a singular name for the array. - Likewise, "Convert For to ForEach" was breaking re-assignment by replacing
myArray[i] = xyz
withmyArrayItem = xyz
, which doesn't work. Not anymore! Thanks to @alanhussey for reporting these bugs 🙏 - "Extract Interface" now works on default exports too. Thanks @kevintechie for spotting this one.
Added
- Make "Move Statements" work with JSX expressions too, so you can swap some
{variable}
in your JSX code! - Move Statements Up/Down now work on object expressions that are nested inside arrays. For instance:
const d = [
{
a: 5
},
{
b: 5
}
];
You can swap these multi-line objects with a single shortcut (defaults are Alt + Shift + U
for moving up, Alt + Shift + D
for moving down):
const d = [
{
b: 5
},
{
a: 5
}
];
6.9.1
He's a Tramp 🐶
Fixed
- @j4k0xb fixed the action provider for the "Convert For to Foreach" refactoring. Great catch!
Added
- Inline Variable inside a template literal will remove the extraneous
${}
so you don't end up with${"some string"}
in the middle of your template string. - Extract Variable now works in for..of statements.
- Abracadabra is now available on VS Code web! That means you can install (and use) the extension when working on https://vscode.dev or https://github.dev for instance.