Releases: nicoespeon/abracadabra
Releases · nicoespeon/abracadabra
8.1.3
No user-visible change. Mostly dependencies upgrades.
8.1.2
Fixed
- Flip If/Else refactoring would mess up code if you were styling code without semicolons. Thanks to @victor-homyakov for reporting!
8.1.1
Fixed
- Fix a scenario where extracting a variable could mess up with the code. Eg.
function updateQuality() {
for (var i = 0; i < items.length; i++) {
// Extracting `items[i]` used to produce invalid code, not anymore!
if (items[i].name != "SULFURAS") {
items[i].sellIn = items[i].sellIn - 1;
}
}
return items;
}
- Fix "Lift Up Conditional" when the parent if has an alternate node. The original specs were incorrect and have been fixed.
// Lifting up `if (isCorrect)` used to produce invalid code, not anymore!
if (isValid) {
if (isCorrect) {
doSomething();
}
} else {
doAnotherThing();
}
You’ll Be in My Heart 🌳
Fixed
- "Change Signature" was not working on multi-line calls. Thanks to @pomeh, this has been fixed!
Added
- [New Refactoring] "Remove JSX Fragment" thanks to @DerTimonius. This allows you to switch back and forth with "Wrap in JSX Fragment".
8.0.1
Bump version (8.0.1)
Let It Go 🏔️
Breaking Changes
The following refactorings were removed from Abracadabra (until re-implemented):
- Extract Class
- Convert to Pure Component (React)
Why? There are causing trouble that aren't worth it (see detailed ADR).
7.1.1
No user-visible change. Mostly dependencies upgrades.
Two Worlds, One JSX 🌴
Fixed
- Change Signature wasn't working on nested functions. It has been reported by @SamB and fixed!
- Extract Variable may declare the new variable before another variable it references under some circumstances. These have been fixed. Kudos to @tjx666 for finding that!
Added
- [New Refactoring] "Wrap in JSX Fragment" thanks to @DerTimonius. This will help you refactor JSX code to add more elements within a single root.
Bella Note 🍝
Changed
- (Breaking) Change Windows key bindings for the Toggle Highlight feature. It was hijacking the default shortcut to replace code on this OS, which is not cool. Thanks @stevebeauge for reporting.
Fixed
- Inline Variable was producing invalid code when inlining an async arrow function expression. Not anymore! Thanks @automatensalat for reporting, as always 😉
Let’s go Highlight an Identifier 🪁
Added
- New feature to support refactorings: Highlight Identifiers. It can help you highlight all references to different variables.
Changed
- Generated interfaces now have a consistent
;
at the end of each line. This is a side-effect of upgrading Recast to solve #795
Fixed
- Fixed a bug where the parser would not handle comments within an object that uses the
satisfies
operator. Kudos to @byronwall for the detailed report! - Inlining JSX in a JSX attribute doesn't remove the curly braces anymore. Thanks, @automatensalat for reporting.
- Extracting a variable when the cursor is on a JSX attribute name used to break the code. Now it will resolve the closest extractable chunk (the JSX Element). Thanks again @automatensalat for reporting.