Skip to content

Releases: nicoespeon/abracadabra

6.14.3

14 Jun 02:59
Compare
Choose a tag to compare

Upgraded a few dependencies and added a sponsor badge to the extension.

6.14.2

14 Jun 02:42
Compare
Choose a tag to compare

No user-visible change. This release makes Abracadabra work in browser environments again.

6.14.1

14 Jun 01:59
Compare
Choose a tag to compare

No user-visible change. This release fixes the deployment of 6.14 in all the target environments.

A Cover Is Not the Book 📕

13 Jun 13:58
Compare
Choose a tag to compare

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 🏹

21 Apr 20:02
Compare
Choose a tag to compare

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 🍁

11 Mar 15:46
Compare
Choose a tag to compare

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 🦋

19 Feb 19:40
Compare
Choose a tag to compare

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 ⭐

17 Jan 13:41
Compare
Choose a tag to compare

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 with myArrayItem = 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

09 Jan 18:48
Compare
Choose a tag to compare

Changed

  • Thanks to @zardoy, installing the extension is much faster! In short, we don't bundle demo gifs in the extension anymore (🤦‍♂️), saving dozens of MBs.
  • Shoutout to @tjx666 who upgraded how the project is linted. No impact on you, but a useful improvement for maintainers ❤️

He's a Tramp 🐶

07 Jan 15:25
Compare
Choose a tag to compare

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.