Skip to content

Latest commit

 

History

History
210 lines (125 loc) · 6.76 KB

CHANGELOG.md

File metadata and controls

210 lines (125 loc) · 6.76 KB

2.0.2 (2023-04-20)

Bug Fixes

2.0.1 (2023-04-19)

Bug Fixes

2.0.0 (2022-08-01)

Features

Bug Fixes

Breaking Changes

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'
  ]
}

1.6.0 (2019-09-20)

Chores

1.5.1 (2017-01-01)

Chores

1.5.0 (2016-12-19)

Features

1.4.1 (2016-07-22)

Bug Fixes

1.4.0 (2016-05-02)

Features

1.3.1 (2015-12-08)

Bug Fixes

  • remove assertion if and only if its parent is an ExpressionStatement (6515857a, closes #4)

1.3.0 (2015-10-06)

Features

1.2.1 (2015-09-29)

Bug Fixes

  • remove assignment if and only if operator is = (f14bcd3e)

1.2.0 (2015-09-25)

Features

  • support removal of assert variable assignment (82cbeea8)

1.1.0 (2015-08-11)

Features

  • support removal of CommonJS assert declaration (1c3dc425)
  • support removal of CommonJS power-assert declaration (5925b38a)

1.0.0 (2015-05-27)

The first release.