Skip to content

Commit 02b9de7

Browse files
committed
docs(CHANGELOG): add CHANGELOG for 2.0.0
1 parent 8b9d331 commit 02b9de7

File tree

1 file changed

+101
-0
lines changed

1 file changed

+101
-0
lines changed

CHANGELOG.md

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,104 @@
1+
## [2.0.0](https://github.com/unassert-js/unassert/releases/tag/v2.0.0) (2022-08-01)
2+
3+
4+
#### Features
5+
6+
* [Replace default exported `unassert` with named exported `unassertAst`](https://github.com/unassert-js/unassert/pull/27)
7+
* [Variable Tracking: remove assertion calls based on their imported variable names](https://github.com/unassert-js/unassert/pull/34)
8+
* [Migrate codebase to ESM and provide CJS/ESM dual package](https://github.com/unassert-js/unassert/pull/29)
9+
* [Support strict assertion mode newly exposed as 'node:assert/strict'](https://github.com/unassert-js/unassert/pull/31)
10+
* [Support destructured assignment of strict property](https://github.com/unassert-js/unassert/pull/32)
11+
* [Support safe removal of loop invariants in for-of statement](https://github.com/unassert-js/unassert/pull/35)
12+
* [Support removal of async assertion such as `assert.rejects`](https://github.com/unassert-js/unassert/pull/36)
13+
14+
15+
#### Bug Fixes
16+
17+
* [unassert causes SyntaxError when body of LabeledStatement is single ExpressionStatement](https://github.com/unassert-js/unassert/pull/37)
18+
19+
20+
#### Breaking Changes
21+
22+
* [Replace default exported `unassert` with named exported `unassertAst`](https://github.com/unassert-js/unassert/pull/27)
23+
24+
`unassert` function is removed in favor of named exports aiming ESM era. Please use `unassert.unassertAst` instead.
25+
26+
before:
27+
```js
28+
const unassert = require('unassert');
29+
```
30+
31+
after:
32+
```js
33+
const { unassertAst } = require('unassert');
34+
```
35+
36+
37+
* [Replace AST matcher with simpler and robust logic](https://github.com/unassert-js/unassert/pull/25)
38+
39+
Configuration options are simplified a lot. Patterns are aggregated into `modules`.
40+
41+
before:
42+
```js
43+
{
44+
assertionPatterns: [
45+
'assert(value, [message])',
46+
'assert.ok(value, [message])',
47+
'assert.equal(actual, expected, [message])',
48+
'assert.notEqual(actual, expected, [message])',
49+
'assert.strictEqual(actual, expected, [message])',
50+
'assert.notStrictEqual(actual, expected, [message])',
51+
'assert.deepEqual(actual, expected, [message])',
52+
'assert.notDeepEqual(actual, expected, [message])',
53+
'assert.deepStrictEqual(actual, expected, [message])',
54+
'assert.notDeepStrictEqual(actual, expected, [message])',
55+
'assert.fail(actual, expected, message, operator)',
56+
'assert.throws(block, [error], [message])',
57+
'assert.doesNotThrow(block, [message])',
58+
'assert.ifError(value)',
59+
'console.assert(value, [message])'
60+
],
61+
requirePatterns: [
62+
'assert = require("assert")'
63+
],
64+
importPatterns: [
65+
'import assert from "assert"',
66+
'import * as assert from "assert"'
67+
]
68+
}
69+
```
70+
71+
after:
72+
```js
73+
{
74+
modules: [
75+
'assert',
76+
'assert/strict',
77+
'node:assert',
78+
'node:assert/strict'
79+
]
80+
}
81+
```
82+
83+
84+
* [Drop power-assert support from default patterns since power-assert works transparently](https://github.com/unassert-js/unassert/pull/28)
85+
86+
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.
87+
88+
after:
89+
```js
90+
{
91+
modules: [
92+
'assert',
93+
'assert/strict',
94+
'node:assert',
95+
'node:assert/strict',
96+
'power-assert'
97+
]
98+
}
99+
```
100+
101+
1102
## [1.6.0](https://github.com/unassert-js/unassert/releases/tag/v1.6.0) (2019-09-20)
2103

3104
#### Chores

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy