ecmaVersion to 2018 (f315b49)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.
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.
sourceRoot should have precedence over options.sourceRoot if sourceRoot is URL (dcf9642d)sourceRoot in options.sourceMap is locating source files on a server (7822df1b)options.path is absolute and it conflicts with options.sourceRoot or sourceRoot in options.sourceMap (02f7b35a)options.sourceRoot if and only if incoming options.path is absolute (65b4012a)deepStrictEqual and notDeepStrictEqual (9d98bc17)sourceRoot option. If set, filepath in power-assert output will be relative from sourceRootvisitorKeys option to customize AST traversalbrowser.assert.element(selector) (ea0a3ce9)powerAssertVariableName is now deprecated and ignored. Please use patterns option instead (2f023f91)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);