Skip to content

Latest commit

 

History

History
277 lines (133 loc) · 10.8 KB

CHANGELOG.md

File metadata and controls

277 lines (133 loc) · 10.8 KB

2.1.2 (2019-01-11)

Bug Fixes

Refactor

Chore

2.1.1 (2018-05-15)

  • Update default ecmaVersion to 2018 (f315b49)

2.1.0 (2017-05-21)

Features

2.0.3 (2017-02-19)

Bug Fixes

2.0.2 (2017-01-12)

Bug Fixes

2.0.1 (2016-11-16)

Bug Fixes

2.0.0 (2016-11-11)

Features

Breaking Changes

We stopped providing prebuilt bundle for browsers. Please build your own by using browserify, webpack and so on. We also dropped bower support. Please use npm instead.

  • Internal classes espower.Instrumentor and espower.AssertionVisitor are not exported any more.

(afa380f9)

The destructive option has been removed.

New behavior is like destructive: true, means that passed AST is modified directly. If you do not want your AST to be modified directly, you should deep-clone your AST by yourself.

1.3.2 (2016-06-22)

Bug Fixes

  • fix breaking changes introduced in 1.3.0 and 1.3.1

1.3.1 (2016-06-21)

Bug Fixes

  • stop capturing SequenceExpression itself since SequenceExpressions are not enclosed in parentheses in some cases (e8acbc61)

1.3.0 (2016-06-21)

Features

1.2.1 (2015-11-06)

1.2.0 (2015-11-05)

1.1.0 (2015-11-03)

1.0.7 (2015-09-21)

  • update escodegen to 1.7.0 (feb96b0)
  • update source-map to 0.5.0 (7bc824b)

1.0.6 (2015-06-07)

  • SourceMap's sourceRoot should have precedence over options.sourceRoot if sourceRoot is URL (dcf9642d)

1.0.5 (2015-06-05)

  • update escallmatch to 1.4.2 and espurify to 1.3.0 (62973ed)
  • use licensify to prepend license header (d3bc5e8)

1.0.4 (2015-06-04)

  • try to create relative path if sourceMap.sourceRoot is locating source files on on a server (ec0a91ba)
  • never show absolute path or URL in power-assert output (252b043f)

1.0.3 (2015-05-31)

  • use basename when sourceRoot in options.sourceMap is locating source files on a server (7822df1b)

1.0.2 (2015-05-30)

  • use basename when incoming options.path is absolute and it conflicts with options.sourceRoot or sourceRoot in options.sourceMap (02f7b35a)

1.0.1 (2015-05-29)

  • apply options.sourceRoot if and only if incoming options.path is absolute (65b4012a)

1.0.0 (2015-05-25)

Features

0.11.0 (2015-04-18)

Bug Fixes

  • throw Error if AST is already instrumented (1d47bdc3)

Features

0.10.0 (2014-11-11)

0.9.1 (2014-09-15)

Bug Fixes

  • espower: decide to be skipped first, then enter node (9d0a778a)

0.9.0 (2014-08-21)

Features

  • espower:
    • adjust filepath in power-assert output if sourceMap option is given (f919d59d)
    • adjust line number in power-assert output if sourceMap option is given (8c035d89)

0.8.0 (2014-08-12)

Features

Breaking Changes

  • option powerAssertVariableName is now deprecated and ignored. Please use patterns option instead (2f023f91)
  • option targetMethods is now deprecated and ignored. Please use patterns option instead (e75e5d35)

If you already customize instrumentation pattern using powerAssertVariableName and targetMethods, you need to migarte. To migrate, change your code from the following:

var options = {
    powerAssertVariableName: 'yourAssert',
    targetMethods: {
        oneArg: [
            'okay'
        ],
        twoArgs: [
            'equal',
            'customEqual'
        ]
    }
};
var modifiedAst = espower(jsAst, options);

To:

var options = {
    patterns: [
        'yourAssert(value, [message])',
        'yourAssert.okay(value, [message])',
        'yourAssert.equal(actual, expected, [message])',
        'yourAssert.customEqual(actual, expected, [message])'
    ]
};
var modifiedAst = espower(jsAst, options);