Skip to content

Releases: nicoespeon/abracadabra

8.1.3

24 Jul 09:04
Compare
Choose a tag to compare

No user-visible change. Mostly dependencies upgrades.

8.1.2

24 Jul 08:41
Compare
Choose a tag to compare

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

31 May 13:14
b039921
Compare
Choose a tag to compare

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 🌳

19 May 19:51
5c14ee6
Compare
Choose a tag to compare

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

14 Apr 02:04
Compare
Choose a tag to compare
Bump version (8.0.1)

Let It Go 🏔️

14 Apr 01:56
Compare
Choose a tag to compare

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

13 Apr 22:28
Compare
Choose a tag to compare

No user-visible change. Mostly dependencies upgrades.

Two Worlds, One JSX 🌴

13 Apr 14:19
Compare
Choose a tag to compare

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 🍝

16 Feb 02:29
Compare
Choose a tag to compare

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 🪁

03 Feb 22:07
Compare
Choose a tag to compare

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.