Skip to content

Releases: nicoespeon/abracadabra

Grim Grinning Literals 👻

17 May 11:51
Compare
Choose a tag to compare

Changed

  • When triggering a refactoring from a quick fix (the 💡 icon), Abracadabra will use the code and position you were on when the fix was suggested. This should be invisible for most use-case, but will play nicely with extensions like cursorless. Thanks @jaresty for reporting, and @pokey for adding more context 😉
  • "Convert to Template String" will now preserve ${} and ${someValue} as-is, without escaping it. It's technically a bug (= changes the behavior of the code) but usage indicates these are meant to become interpolated variables. So it's more likely to do what you want.
automagic.mp4

9.1.3

07 May 13:43
Compare
Choose a tag to compare

Fixed

  • "Wrap in JSX Fragment" was preventing other valid refactorings to be suggested. It was fixed, so now you can easily convert some string prop into a template literal again!

9.1.2

26 Feb 21:37
Compare
Choose a tag to compare

Fixed

  • @waltergalvao found an issue with "Convert to Arrow Function" when the function was default exported. This should be working fine now!

9.1.1

09 Jan 12:32
Compare
Choose a tag to compare

No user-visible change. Attempting to fix CI deployment.

Knowing What I Know Now 👑

09 Jan 02:13
Compare
Choose a tag to compare

Added

  • New abracadabra.getMaxFileSizeKb option that will disable refactorings based on the size of a file. Default value is 250 (in kB). The idea is to complement abracadabra.maxFileLinesCount for files that would be minified.

Fixed

  • Trying to execute a refactoring in an untitled tab used to throw an error, but not anymore thanks to @j4k0xb!

9.0.2

28 Oct 18:48
Compare
Choose a tag to compare

No user-visible change. Mostly dependencies upgrades.

9.0.1

28 Oct 16:45
Compare
Choose a tag to compare

No user-visible change. Mostly dependencies upgrades.

On My Way 🐻

28 Oct 16:39
Compare
Choose a tag to compare

Breaking

  • Removed "Destructure Object" since VS Code has a native "Convert parameters to destructured object" since TS 3.4 works much better. Also, "Destructure Object" was causing performance trouble and was making the bundle much bigger than necessary, because it was using the whole TS library.
  • Removed "Extract useCallback" for a similar reason. Although the feature doesn't exist, this one-off refactoring had an unreasonable impact on the whole extension (bundle size and performance).

Added

  • New abracadabra.maxFileLinesCount option that will disable refactorings based on the number of lines of a file. Default value is 10,000. The goal is to reduce the impact on performance when you have a large file (eg. a bundle) in your codebase.

Fixed

  • @j4k0xb found even more occurrences of patterns that require parentheses when executing Inline Variable. These are now covered.

8.1.4

26 Jul 07:37
Compare
Choose a tag to compare

Fixed

  • Inline Variable now adds parentheses around expressions that should have one. Thanks @xixixao for catching these. Eg.
const x = a + b;
const result = x * 100;

// Used to wrongly result in
const result = a + b * 100;

// Will now result in
const result = (a + b) * 100;

8.1.3

24 Jul 09:04
Compare
Choose a tag to compare

No user-visible change. Mostly dependencies upgrades.