Releases: nicoespeon/abracadabra
9.4.8
9.4.7
Fixed
- Abracadabra was not working well with Vue files with content above the script tag. This has been fixed and refactorings should work fine again! Thanks @yinluobing and @acabreragnz for reporting 🙏
9.4.6
Fixed
- Made Abracadabra parse
<X> y
type assertions on regular TS files. It was failing to handle these as it was considering them as invalid JSX code. It won't break anymore with this syntax.
9.4.5
No user-visible change. Attempting to fix CI deployments with vsce not being compatible with Yarn v4.
9.4.4
No user-visible change. Attempting to fix CI deployments with vsce not being compatible with Yarn v4.
9.4.3
No user-visible change. Attempting to fix CI deployments with vsce not being compatible with Yarn v4.
9.4.2
Fixed
Extracting a variable (Ctrl + Alt + V
/ ⌥ ⌘ V
) while selecting a portion of the value may result in a partial selection when you get to name the extracted variable. Annoying!
Not anymore… The whole identifier is now selected, so you can just write the name right away 😉
Before:
before.mp4
After:
after.mp4
9.4.1
Fixed
The extension stopped working because the tool we are using to package it (esbuild) had a change that was incompatible with our code. The upgrade from 0.19 to 0.22 broke the extension.
Fortunately, that was fixed with esbuild 0.23, and upgrading to this latest version seems to have fixed the build.
Boolean Mine 🐘
Added
- [New Refactoring] "Simplify Boolean" thanks to @ipanasenko suggestion. Some refactorings may left you with logical expressions that look like
someCondition && true
and that can be simplified. This refactoring will take care of figuring out how.
Fixed
- @j4k0xb fixed "Inline Variable" when there was a shadowed parameter involved.
You've Got a Type in Me 🚀
Added
- "Extract Type" can now extract type literals. This is particularly handy when you have such a union type:
type Context =
| { state: "reading"; value: string }
| {
state: "editing";
value: string;
draftValue: string;
};
Put your cursor wherever within { state: "reading"; value: string }
, hit Ctrl+Shift+V (⌘ ⇧ V) and there you have it:
type ReadingContext = { state: "reading"; value: string };
type Context =
| ReadingContext
| {
state: "editing";
value: string;
draftValue: string;
};
The ReadingContext
name was inferred, it it can be. In any case, you are in "rename mode" right away so you can type whatever is better, press Enter, be done.
In action: