Changelog
2.0.0 (2022-08-01)
Variable Tracking
Restructured codebase
Performance improvement
Newly supported syntaxes and features
unassert
function is removed in favor of named exports aiming ESM era. Please use unassert.unassertAst
instead.
before:
const unassert = require('unassert');
after:
const { unassertAst } = require('unassert');
Configuration options are simplified a lot. Patterns are aggregated into modules
.
before:
{
assertionPatterns: [
'assert(value, [message])',
'assert.ok(value, [message])',
'assert.equal(actual, expected, [message])',
'assert.notEqual(actual, expected, [message])',
'assert.strictEqual(actual, expected, [message])',
'assert.notStrictEqual(actual, expected, [message])',
'assert.deepEqual(actual, expected, [message])',
'assert.notDeepEqual(actual, expected, [message])',
'assert.deepStrictEqual(actual, expected, [message])',
'assert.notDeepStrictEqual(actual, expected, [message])',
'assert.fail(actual, expected, message, operator)',
'assert.throws(block, [error], [message])',
'assert.doesNotThrow(block, [message])',
'assert.ifError(value)',
'console.assert(value, [message])'
],
requirePatterns: [
'assert = require("assert")'
],
importPatterns: [
'import assert from "assert"',
'import * as assert from "assert"'
]
}
after:
{
modules: [
'assert',
'assert/strict',
'node:assert',
'node:assert/strict'
]
}
Move power-assert support away from default patterns since power-assert empowers default assert function transparently, so should not be required explicitly. If power-assert is still required explicitly, add 'power-assert' to modules
in customized configuration.
after:
{
modules: [
'assert',
'assert/strict',
'node:assert',
'node:assert/strict',
'power-assert'
]
}
Changelog
1.5.0 (2016-12-19)
createVisitor
to make assertion and declaration patterns configurable