Release History

v6.2.1

Version v6.2.1

What’s Changed

  • chore: add renovate config by @43081j in https://github.com/chaijs/chai/pull/1709
  • chore: use new renovate schema by @43081j in https://github.com/chaijs/chai/pull/1713
  • chore(deps): update actions/setup-node action to v5 (main) by @renovate[bot] in https://github.com/chaijs/chai/pull/1711
  • chore(deps): update actions/checkout action to v5 (main) by @renovate[bot] in https://github.com/chaijs/chai/pull/1710
  • chore(deps): update dependency eslint to v9 (main) by @renovate[bot] in https://github.com/chaijs/chai/pull/1715
  • chore(deps): update dependency @rollup/plugin-commonjs to v28 (main) by @renovate[bot] in https://github.com/chaijs/chai/pull/1714
  • chore(deps): update dependency mocha to v11 (main) by @renovate[bot] in https://github.com/chaijs/chai/pull/1717
  • chore(deps): update dependency eslint-plugin-jsdoc to v60 (main) by @renovate[bot] in https://github.com/chaijs/chai/pull/1716
  • chore: disable renovate for 4.x.x by @43081j in https://github.com/chaijs/chai/pull/1722
  • chore(deps): update dependency eslint-plugin-jsdoc to v61 by @renovate[bot] in https://github.com/chaijs/chai/pull/1727
  • chore(deps): update actions/setup-node action to v6 by @renovate[bot] in https://github.com/chaijs/chai/pull/1729
  • chore(deps): update dependencies by @renovate[bot] in https://github.com/chaijs/chai/pull/1726
  • chore(deps): update dependencies by @renovate[bot] in https://github.com/chaijs/chai/pull/1730
  • chore(deps): update dependency node to v24 by @renovate[bot] in https://github.com/chaijs/chai/pull/1731
  • chore(deps): update dependency @rollup/plugin-commonjs to v29 by @renovate[bot] in https://github.com/chaijs/chai/pull/1732
  • chore(deps): update dependencies by @renovate[bot] in https://github.com/chaijs/chai/pull/1734
  • build(deps): bump koa from 2.14.2 to 2.16.1 by @dependabot[bot] in https://github.com/chaijs/chai/pull/1683
  • docs: update browser usage by @43081j in https://github.com/chaijs/chai/pull/1736
  • chore(deps): update dependencies by @renovate[bot] in https://github.com/chaijs/chai/pull/1740
  • docs: add comprehensive documentation for containSubset assertion by @Aashish-Jha-11 in https://github.com/chaijs/chai/pull/1739
  • Set esbuild target to es2021 to support Safari < 16.4 by @larabr in https://github.com/chaijs/chai/pull/1737

New Contributors

  • @renovate[bot] made their first contribution in https://github.com/chaijs/chai/pull/1711
  • @Aashish-Jha-11 made their first contribution in https://github.com/chaijs/chai/pull/1739
  • @larabr made their first contribution in https://github.com/chaijs/chai/pull/1737

Full Changelog: https://github.com/chaijs/chai/compare/v6.2.0…v6.2.1

v6.2.0

Version v6.2.0

What’s Changed

  • feat(events): add addChainableMethod event by @perrin4869 in https://github.com/chaijs/chai/pull/1707

Full Changelog: https://github.com/chaijs/chai/compare/v6.1.0…v6.2.0

v6.1.0

Version v6.1.0

What’s Changed

  • build(deps-dev): bump tar-fs from 3.0.9 to 3.1.1 by @dependabot[bot] in https://github.com/chaijs/chai/pull/1706
  • feat: add eventEmitter (https://github.com/chaijs/chai/pull/1693) Adds an event emitter for hooking into method/property creation in https://github.com/chaijs/chai/pull/1693

Full Changelog: https://github.com/chaijs/chai/compare/v6.0.2…v6.1.0

v6.0.1

Version v6.0.1

What’s Changed

  • fix: keep function/class names in bundle by @43081j in https://github.com/chaijs/chai/pull/1701

Full Changelog: https://github.com/chaijs/chai/compare/v6.0.0…v6.0.1

v6.0.0

Version v6.0.0

BREAKING CHANGES

Chai is now bundled into a single file. The lib/*.js files are no longer present, and so any code that imports those files directly will need to change. The only file that can be imported now is ./index.js.

What’s Changed

  • feat: remove unbundled sources by @43081j in https://github.com/chaijs/chai/pull/1700

Full Changelog: https://github.com/chaijs/chai/compare/v5.3.2…v6.0.0

v5.3.3

Version v5.3.3

What’s Changed

  • fix: keep names in bundle by @43081j in https://github.com/chaijs/chai/pull/1702
  • chore: support publishing v5 by @43081j in https://github.com/chaijs/chai/pull/1703
  • chore: update npm tag name by @43081j in https://github.com/chaijs/chai/pull/1704

Full Changelog: https://github.com/chaijs/chai/compare/v5.3.2…v5.3.3

v5.3.2

Version v5.3.2

Reverts the removal of the bundled version of chai in 5.3.1

What’s Changed

  • Update core contributors by @keithamus in https://github.com/chaijs/chai/pull/1697
  • feat: reintroduce bundle by @43081j in https://github.com/chaijs/chai/pull/1699

Full Changelog: https://github.com/chaijs/chai/compare/v5.3.1…v5.3.2

v5.3.1

Version v5.3.1

What’s Changed

  • chore: remove bundled chai by @43081j in https://github.com/chaijs/chai/pull/1694

Full Changelog: https://github.com/chaijs/chai/compare/v5.3.0…v5.3.1

v5.3.0

Version v5.3.0

What’s Changed

  • chore: change main to point at chai directly by @43081j in https://github.com/chaijs/chai/pull/1696

Full Changelog: https://github.com/chaijs/chai/compare/v5.2.2…v5.3.0

v5.2.2

Version v5.2.2

What’s Changed

  • chore: use files for publishing by @43081j in https://github.com/chaijs/chai/pull/1695

Full Changelog: https://github.com/chaijs/chai/compare/v5.2.1…v5.2.2

v5.2.1

Version v5.2.1

What’s Changed

Mostly internal changes but @SuperchupuDev realised the package.json engines field was out of date, so it has been updated to reflect that v5.0.0 onwards only supports Node >=18.

  • build(deps): bump serialize-javascript and mocha by @dependabot in https://github.com/chaijs/chai/pull/1673
  • build(deps-dev): bump esbuild from 0.19.10 to 0.25.0 by @dependabot in https://github.com/chaijs/chai/pull/1671
  • Enable no-var rule and fix violations by @koddsson in https://github.com/chaijs/chai/pull/1675
  • Convert Assertion function to a class by @koddsson in https://github.com/chaijs/chai/pull/1677
  • More typing by @koddsson in https://github.com/chaijs/chai/pull/1679
  • build(deps-dev): bump tar-fs from 3.0.6 to 3.0.8 by @dependabot in https://github.com/chaijs/chai/pull/1682
  • build(deps-dev): bump tar-fs from 3.0.8 to 3.0.9 by @dependabot in https://github.com/chaijs/chai/pull/1688
  • chore: fix lint errors and add lint to CI by @43081j in https://github.com/chaijs/chai/pull/1689
  • docs: update minimum node version in readme by @SuperchupuDev in https://github.com/chaijs/chai/pull/1691
  • chore: update minimum node version by @SuperchupuDev in https://github.com/chaijs/chai/pull/1692

New Contributors

  • @SuperchupuDev made their first contribution in https://github.com/chaijs/chai/pull/1691

Full Changelog: https://github.com/chaijs/chai/compare/v5.2.0…v5.2.1

v5.2.0

Version v5.2.0

What’s Changed

  • fix: ability to register more plugins inside a plugin by @tpluscode in https://github.com/chaijs/chai/pull/1639
  • chore: bump playwright to fix CI by @43081j in https://github.com/chaijs/chai/pull/1663
  • chore: introduce prettier and run it by @43081j in https://github.com/chaijs/chai/pull/1660
  • chore: drop old CJS entrypoints by @43081j in https://github.com/chaijs/chai/pull/1662
  • chore: enable eslint recommended config by @43081j in https://github.com/chaijs/chai/pull/1659
  • Integrated chai-subset and added assert-based negation to containSubset by @BreadInvasion in https://github.com/chaijs/chai/pull/1664
  • Add coverage check to tests by @koddsson in https://github.com/chaijs/chai/pull/1669
  • fix floating point precision in closeTo assertion by @koddsson in https://github.com/chaijs/chai/pull/1667

New Contributors

  • @tpluscode made their first contribution in https://github.com/chaijs/chai/pull/1639
  • @BreadInvasion made their first contribution in https://github.com/chaijs/chai/pull/1664

Full Changelog: https://github.com/chaijs/chai/compare/v5.1.2…v5.2.0

v5.1.2

Version v5.1.2

What’s Changed

  • Fix secret name in publish action by @koddsson in https://github.com/chaijs/chai/pull/1614
  • Publish npm packages with provenance by @koddsson in https://github.com/chaijs/chai/pull/1615
  • build(deps-dev): bump braces from 3.0.2 to 3.0.3 by @dependabot in https://github.com/chaijs/chai/pull/1625
  • chore: bump loupe and deep-eql by @43081j in https://github.com/chaijs/chai/pull/1635
  • build(deps-dev): bump @75lb/deep-merge from 1.1.1 to 1.1.2 by @dependabot in https://github.com/chaijs/chai/pull/1636
  • build(deps): bump rollup from 4.9.1 to 4.22.4 by @dependabot in https://github.com/chaijs/chai/pull/1637
  • chore: update deep dependencies by @43081j in https://github.com/chaijs/chai/pull/1641
  • chore: upgrade loupe by @43081j in https://github.com/chaijs/chai/pull/1646
  • Support big int in approximently by @koddsson in https://github.com/chaijs/chai/pull/1606

Full Changelog: https://github.com/chaijs/chai/compare/v5.1.1…v5.1.2

v4.5.0

Version v4.5.0

  • Update type detect (#1631) 1a36d35

https://github.com/chaijs/chai/compare/v4.4.1…v4.5.0

What’s Changed

  • Update type detect by @koddsson in https://github.com/chaijs/chai/pull/1631

Full Changelog: https://github.com/chaijs/chai/compare/v4.4.1…v4.5.0

v5.1.1

Version v5.1.1

What’s Changed

  • Set up ESLint for JSDoc comments by @koddsson in https://github.com/chaijs/chai/pull/1605
  • build(deps-dev): bump ip from 1.1.8 to 1.1.9 by @dependabot in https://github.com/chaijs/chai/pull/1608
  • Correct Mocha import instructions by @MattiSG in https://github.com/chaijs/chai/pull/1611
  • fix: support some virtual contexts in toThrow by @43081j in https://github.com/chaijs/chai/pull/1609

New Contributors

  • @MattiSG made their first contribution in https://github.com/chaijs/chai/pull/1611

Full Changelog: https://github.com/chaijs/chai/compare/v5.1.0…v5.1.1

v5.1.0

Version v5.1.0

What’s Changed

  • Remove useless guards and add parentheses to constuctors by @koddsson in https://github.com/chaijs/chai/pull/1593
  • Cleanup jsdoc comments by @koddsson in https://github.com/chaijs/chai/pull/1596
  • Convert comments in “legal comments” format to jsdoc or normal comments by @koddsson in https://github.com/chaijs/chai/pull/1598
  • Implement iterable assertion by @koddsson in https://github.com/chaijs/chai/pull/1592
  • Assert interface fix by @developer-bandi in https://github.com/chaijs/chai/pull/1601
  • Set support in same members by @koddsson in https://github.com/chaijs/chai/pull/1583
  • Fix publish script by @koddsson in https://github.com/chaijs/chai/pull/1602

New Contributors

  • @developer-bandi made their first contribution in https://github.com/chaijs/chai/pull/1601

Full Changelog: https://github.com/chaijs/chai/compare/v5.0.3…v5.1.0

v5.0.3

Version v5.0.3

Fix bad v5.0.2 publish.

Full Changelog: https://github.com/chaijs/chai/compare/v5.0.2…v5.0.3

v5.0.2

Version v5.0.2

What’s Changed

  • build(deps): bump nanoid and mocha by @dependabot in https://github.com/chaijs/chai/pull/1558
  • remove bump-cli by @koddsson in https://github.com/chaijs/chai/pull/1559
  • Update developer dependencies by @koddsson in https://github.com/chaijs/chai/pull/1560
  • fix: removes ?? for node compat (5.x) by @43081j in https://github.com/chaijs/chai/pull/1576
  • Update loupe to latest version by @koddsson in https://github.com/chaijs/chai/pull/1579
  • Re-enable some webkit tests by @koddsson in https://github.com/chaijs/chai/pull/1580
  • Remove a bunch of if statements in test/should.js by @koddsson in https://github.com/chaijs/chai/pull/1581
  • Remove a bunch of unused files by @koddsson in https://github.com/chaijs/chai/pull/1582
  • Fix 1564 by @koddsson in https://github.com/chaijs/chai/pull/1566

Full Changelog: https://github.com/chaijs/chai/compare/v5.0.1…v5.0.2

v4.4.1

Version v4.4.1

What’s Changed

  • fix: removes ?? for node compat by @43081j in https://github.com/chaijs/chai/pull/1574

Full Changelog: https://github.com/chaijs/chai/compare/v4.4.0…v4.4.1

v4.4.0

Version v4.4.0

What’s Changed

  • Allow deepEqual fonction to be configured globally (4.x.x branch) by @forty in https://github.com/chaijs/chai/pull/1553

Full Changelog: https://github.com/chaijs/chai/compare/v4.3.10…v4.4.0

v5.0.0-rc.0

Version v5.0.0-rc.0

The first Release Candidate of chai@v5 is here!

We’ve put out a few alpha versions and tested them out in various projects with good success. This RC includes all those changes plus any fixes that we’ve discovered since then.

Please try it out in your projects and let us know if you run into any issues so we can make fixes before version 5!

Thanks for using Chai 🙏🏻

What’s Changed

  • feat: use chaijs/loupe for inspection by @pcorpet in https://github.com/chaijs/chai/pull/1401
  • docs: fix URL in README by @Izzur in https://github.com/chaijs/chai/pull/1413
  • Remove get-func-name dependency by @koddsson in https://github.com/chaijs/chai/pull/1416
  • Convert Makefile script to npm scripts by @koddsson in https://github.com/chaijs/chai/pull/1424
  • Clean up README badges by @koddsson in https://github.com/chaijs/chai/pull/1422
  • fix: package.json - deprecation warning on exports field by @stevenjoezhang in https://github.com/chaijs/chai/pull/1400
  • fix: deep-eql bump package to support symbols by @snewcomer in https://github.com/chaijs/chai/pull/1458
  • ES module conversion PoC by @43081j in https://github.com/chaijs/chai/pull/1498
  • chore: drop commonjs support by @43081j in https://github.com/chaijs/chai/pull/1503
  • Update pathval by @koddsson in https://github.com/chaijs/chai/pull/1527
  • Update check-error by @koddsson in https://github.com/chaijs/chai/pull/1528
  • update deep-eql to latest version by @koddsson in https://github.com/chaijs/chai/pull/1542
  • Inline type-detect as a simple function by @koddsson in https://github.com/chaijs/chai/pull/1544
  • Update loupe by @koddsson in https://github.com/chaijs/chai/pull/1545
  • Typo ‘Test an object’ not ‘Test and object’ by @mavaddat in https://github.com/chaijs/chai/pull/1460
  • Update assertion-error to it’s latest major version! by @koddsson in https://github.com/chaijs/chai/pull/1543
  • Replacing Karma with Web Test Runner by @koddsson in https://github.com/chaijs/chai/pull/1546
  • remove codecov by @koddsson in https://github.com/chaijs/chai/pull/1548
  • remove chai version constant by @koddsson in https://github.com/chaijs/chai/pull/1550
  • Remove istanbul by @koddsson in https://github.com/chaijs/chai/pull/1549

New Contributors

  • @Izzur made their first contribution in https://github.com/chaijs/chai/pull/1413
  • @koddsson made their first contribution in https://github.com/chaijs/chai/pull/1416
  • @stevenjoezhang made their first contribution in https://github.com/chaijs/chai/pull/1400
  • @43081j made their first contribution in https://github.com/chaijs/chai/pull/1498

Full Changelog: https://github.com/chaijs/chai/compare/v4.3.10…v5.0.0-rc.0

v5.0.0

Version v5.0.0

BREAKING CHANGES

  • Chai now only supports EcmaScript Modules (ESM). This means your tests will need to either have import {...} from 'chai' or import('chai'). require('chai') will cause failures in nodejs. If you’re using ESM and seeing failures, it may be due to a bundler or transpiler which is incorrectly converting import statements into require calls.
  • Dropped support for Internet Explorer.
  • Dropped support for NodeJS < 18.
  • Minimum supported browsers are now Firefox 100, Safari 14.1, Chrome 100, Edge 100. Support for browsers prior to these versions is “best effort” (bug reports on older browsers will be assessed individually and may be marked as wontfix).

What’s Changed

  • feat: use chaijs/loupe for inspection by @pcorpet in https://github.com/chaijs/chai/pull/1401
  • docs: fix URL in README by @Izzur in https://github.com/chaijs/chai/pull/1413
  • Remove get-func-name dependency by @koddsson in https://github.com/chaijs/chai/pull/1416
  • Convert Makefile script to npm scripts by @koddsson in https://github.com/chaijs/chai/pull/1424
  • Clean up README badges by @koddsson in https://github.com/chaijs/chai/pull/1422
  • fix: package.json - deprecation warning on exports field by @stevenjoezhang in https://github.com/chaijs/chai/pull/1400
  • fix: deep-eql bump package to support symbols by @snewcomer in https://github.com/chaijs/chai/pull/1458
  • ES module conversion PoC by @43081j in https://github.com/chaijs/chai/pull/1498
  • chore: drop commonjs support by @43081j in https://github.com/chaijs/chai/pull/1503
  • Update pathval by @koddsson in https://github.com/chaijs/chai/pull/1527
  • Update check-error by @koddsson in https://github.com/chaijs/chai/pull/1528
  • update deep-eql to latest version by @koddsson in https://github.com/chaijs/chai/pull/1542
  • Inline type-detect as a simple function by @koddsson in https://github.com/chaijs/chai/pull/1544
  • Update loupe by @koddsson in https://github.com/chaijs/chai/pull/1545
  • Typo ‘Test an object’ not ‘Test and object’ by @mavaddat in https://github.com/chaijs/chai/pull/1460
  • Update assertion-error to it’s latest major version! by @koddsson in https://github.com/chaijs/chai/pull/1543
  • Replacing Karma with Web Test Runner by @koddsson in https://github.com/chaijs/chai/pull/1546

New Contributors

  • @Izzur made their first contribution in https://github.com/chaijs/chai/pull/1413
  • @stevenjoezhang made their first contribution in https://github.com/chaijs/chai/pull/1400
  • @43081j made their first contribution in https://github.com/chaijs/chai/pull/1498

Full Changelog: https://github.com/chaijs/chai/compare/4.3.1…v5.0.0

v5.0.0-alpha.2

Version v5.0.0-alpha.2

What’s Changed

  • update deep-eql to latest version by @koddsson in https://github.com/chaijs/chai/pull/1542
  • Inline type-detect as a simple function by @koddsson in https://github.com/chaijs/chai/pull/1544
  • Update loupe by @koddsson in https://github.com/chaijs/chai/pull/1545
  • Typo ‘Test an object’ not ‘Test and object’ by @mavaddat in https://github.com/chaijs/chai/pull/1460
  • Update assertion-error to it’s latest major version! by @koddsson in https://github.com/chaijs/chai/pull/1543
  • Replacing Karma with Web Test Runner by @koddsson in https://github.com/chaijs/chai/pull/1546

Full Changelog: https://github.com/chaijs/chai/compare/v5.0.0-alpha.1…v5.0.0-alpha.2

v4.3.10

Version v4.3.10

This release simply bumps all dependencies to their latest non-breaking versions.

What’s Changed

  • upgrade all dependencies by @keithamus in https://github.com/chaijs/chai/pull/1540

Full Changelog: https://github.com/chaijs/chai/compare/v4.3.9…v4.3.10

v4.3.9

Version v4.3.9

Upgrade dependencies.

This release upgrades dependencies to address CVE-2023-43646 where a large function name can cause “catastrophic backtracking” (aka ReDOS attack) which can cause the test suite to hang.

Full Changelog: https://github.com/chaijs/chai/compare/v4.3.8…v4.3.9

v4.3.8

Version v4.3.8

What’s Changed

  • 4.x.x: Fix link to commit logs on GitHub by @bugwelle in https://github.com/chaijs/chai/pull/1487
  • build(deps): bump socket.io-parser from 4.0.4 to 4.0.5 by @dependabot in https://github.com/chaijs/chai/pull/1488
  • Small typo in test.js by @mavaddat in https://github.com/chaijs/chai/pull/1459
  • docs: specify return type of objDisplay by @scarf005 in https://github.com/chaijs/chai/pull/1490
  • Update CONTRIBUTING.md by @matheus-rodrigues00 in https://github.com/chaijs/chai/pull/1521
  • Fix: update exports.version to current version by @peanutenthusiast in https://github.com/chaijs/chai/pull/1534

New Contributors

  • @bugwelle made their first contribution in https://github.com/chaijs/chai/pull/1487
  • @mavaddat made their first contribution in https://github.com/chaijs/chai/pull/1459
  • @scarf005 made their first contribution in https://github.com/chaijs/chai/pull/1490
  • @matheus-rodrigues00 made their first contribution in https://github.com/chaijs/chai/pull/1521
  • @peanutenthusiast made their first contribution in https://github.com/chaijs/chai/pull/1534

Full Changelog: https://github.com/chaijs/chai/compare/v4.3.7…v4.3.8

v5.0.0-alpha.1

Version v5.0.0-alpha.1

What’s Changed

  • chore: drop commonjs support by @43081j in https://github.com/chaijs/chai/pull/1503
  • Update pathval by @koddsson in https://github.com/chaijs/chai/pull/1527
  • Update check-error by @koddsson in https://github.com/chaijs/chai/pull/1528

Full Changelog: https://github.com/chaijs/chai/compare/v5.0.0-alpha.0…v5.0.0-alpha.1

v5.0.0-alpha.0

Version v5.0.0-alpha.0

This release is the first alpha release for Chai 5. The changes from v4.x:

  • This package now uses ESM modules. CommonJS environments are no longer supported. If you wish to use a CommonJS environment, please continue to use Chai 4.
  • Drop support for NodeJS versions less than 16. If you are using NodeJS v4-v15, please continue to use Chai 4.
  • Drop support for Internet Explorer 10 & 11. If you wish to test against Internet Explorer 10 or 11 please continue to use Chai 4.
  • Drop support for Safari versions less than 14. If you wish to test against Safari v10-v13 please continue to use Chai 4.
  • Drop support for EdgeHTML. If you wish to test against Edges older than 18 (as in, not Chromium Edge) please continue to use Chai 4.
  • Drop support for Firefox versions less than 102. If you wish to test against Firefox 60 through to 101 please continue to use Chai 4.
  • Drop support for Chrome versions less than 108. If you wish to test against Chrome 68 through 107 please continue to use Chai 4.

v4.3.7

Version v4.3.7

What’s Changed

  • fix: deep-eql bump package to support symbols comparison by @snewcomer in https://github.com/chaijs/chai/pull/1483

Full Changelog: https://github.com/chaijs/chai/compare/v4.3.6…v4.3.7

Version v4.3.6

Update loupe to 2.3.1