Skip to content

Releases: haltcase/param.macro

v3.2.1

12 Jul 02:32
Compare
Choose a tag to compare
BUG FIXES
  • handle assignment expressions properly below top level (#21) (7bf4645), closes #20

v3.2.0

25 Jan 23:41
Compare
Choose a tag to compare
FEATURES
  • improve error messages with code frames (2d8bf53)
BUG FIXES
  • it should not wrap regular template literals (33a0a9e)

v3.1.0

25 Jan 05:56
Compare
Choose a tag to compare
FEATURES
  • support assignment expressions similarly to declarations (41a8159)
BUG FIXES
  • pipeline: placeholders consider pipeline a tail path when on LHS (af1934d)
PERFORMANCE
  • use a set instead of an array (da59106)

v3.0.0

17 Jan 05:54
Compare
Choose a tag to compare

This release improves the expected results of the macro. There is a breaking
change but if you weren't using it within tagged template expressions,
you're probably in the clear!

BREAKING CHANGES
  • The output has changed when placeholders are used within tagged template
    expressions. foo`${it}` will now replace the it in place rather
    than wrap the entire tagged template expression.
FEATURES
  • it: stop traversal at template expressions (9d69f9f), closes #12
BUG FIXES
  • pipeline: improve interop with pipe operator (8dc1895), closes #13

v2.1.0

28 Jun 19:52
Compare
Choose a tag to compare

And now for a totally backward compatible but no less ground-breaking release 🎉.

A third export is now available called lift that allows for more flexible placeholder usage, making it possible to define inline functions with more than one argument.

See the new section in the readme for more information.

PLAYGROUND

The online playground now supports shareable permalinks! The URL in your address bar is automatically updated as you type or when you use a code block from the readme — just copy it and share it to send examples like this one:

Example of the new lift modifier

FEATURES
  • add lift() modifier to support binary+ functions (f92542c)

v2.0.0

26 Dec 05:42
Compare
Choose a tag to compare
PLAYGROUND

The online playground received a pretty major upgrade:

  • contains all new features of param.macro
  • supports all current features of Babel (pipeline operator, optional catch binding, etc — see here for more)
  • it's now smaller & more efficient since minification's been restored
FEATURES
  • include tail paths, support spread, default params (8a47350)
BREAKING CHANGES

spread placeholders

Input:

import { _ } from 'param.macro'
const log = console.log(..._)

Output (before):

const log = (_arg) => {
  return console.log(..._arg);
};

Output (after):

const log = (..._arg) => {
  return console.log(..._arg);
};

tail paths

Input:

import { _ } from 'param.macro' 
const fn = String(_).toUpperCase() === 'HELLO'

Output (before):

const fn = (_arg => {
  return String(_arg)
}).toUpperCase() === 'HELLO'

Output (after):

const fn = _arg => {
  return String(_arg).toUpperCase() === 'HELLO'
}

v1.1.4

06 Dec 05:37
Compare
Choose a tag to compare
BUG FIXES
  • restore babel 6 compatibility (f0232f9)

v1.1.3

04 Dec 06:14
Compare
Choose a tag to compare
BUG FIXES
  • placeholders: improve argument hoist logic (dfffd97)

v1.1.2

28 Nov 01:34
Compare
Choose a tag to compare

Small patch to add the standalone plugin file to the npm package (it wasn't included in the published version previously).

BUG FIXES

v1.1.1

27 Nov 23:59
Compare
Choose a tag to compare

All changes are live in the online playground

BUG FIXES
  • placeholders: compile assigned expressions correctly (c2eb7e2)