Update dependency chai to v6 #92
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
3.5.0->6.2.0Release Notes
chaijs/chai (chai)
v6.2.0Compare Source
What's Changed
Full Changelog: chaijs/chai@v6.1.0...v6.2.0
v6.1.0Compare Source
What's Changed
Adds an event emitter for hooking into method/property creation in #1693
Full Changelog: chaijs/chai@v6.0.2...v6.1.0
v6.0.1Compare Source
What's Changed
Full Changelog: chaijs/chai@v6.0.0...v6.0.1
v6.0.0Compare Source
BREAKING CHANGES
Chai is now bundled into a single file. The
lib/*.jsfiles 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
Full Changelog: chaijs/chai@v5.3.2...v6.0.0
v5.3.3Compare Source
What's Changed
Full Changelog: chaijs/chai@v5.3.2...v5.3.3
v5.3.2Compare Source
Reverts the removal of the bundled version of chai in 5.3.1
What's Changed
Full Changelog: chaijs/chai@v5.3.1...v5.3.2
v5.3.1Compare Source
What's Changed
Full Changelog: chaijs/chai@v5.3.0...v5.3.1
v5.3.0Compare Source
What's Changed
mainto point at chai directly by @43081j in #1696Full Changelog: chaijs/chai@v5.2.2...v5.3.0
v5.2.2Compare Source
What's Changed
filesfor publishing by @43081j in #1695Full Changelog: chaijs/chai@v5.2.1...v5.2.2
v5.2.1Compare Source
What's Changed
Mostly internal changes but @SuperchupuDev realised the package.json
enginesfield was out of date, so it has been updated to reflect that v5.0.0 onwards only supports Node >=18.no-varrule and fix violations by @koddsson in #1675New Contributors
Full Changelog: chaijs/chai@v5.2.0...v5.2.1
v5.2.0Compare Source
What's Changed
chai-subsetand added assert-based negation to containSubset by @BreadInvasion in #1664New Contributors
Full Changelog: chaijs/chai@v5.1.2...v5.2.0
v5.1.2Compare Source
What's Changed
Full Changelog: chaijs/chai@v5.1.1...v5.1.2
v5.1.1Compare Source
What's Changed
toThrowby @43081j in #1609New Contributors
Full Changelog: chaijs/chai@v5.1.0...v5.1.1
v5.1.0Compare Source
What's Changed
iterableassertion by @koddsson in #1592New Contributors
Full Changelog: chaijs/chai@v5.0.3...v5.1.0
v5.0.3Compare Source
Fix bad v5.0.2 publish.
Full Changelog: chaijs/chai@v5.0.2...v5.0.3
v5.0.2Compare Source
What's Changed
bump-cliby @koddsson in #1559??for node compat (5.x) by @43081j in #1576loupeto latest version by @koddsson in #1579Full Changelog: chaijs/chai@v5.0.1...v5.0.2
v5.0.0Compare Source
BREAKING CHANGES
import {...} from 'chai'orimport('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.What's Changed
get-func-namedependency by @koddsson in #1416deep-eqlto latest version by @koddsson in #1542type-detectas a simple function by @koddsson in #1544assertion-errorto it's latest major version! by @koddsson in #1543New Contributors
Full Changelog: chaijs/chai@4.3.1...v5.0.0
v4.5.0Compare Source
1a36d35What's Changed
Full Changelog: chaijs/chai@v4.4.1...v4.5.0
v4.4.1Compare Source
What's Changed
??for node compat by @43081j in #1574Full Changelog: chaijs/chai@v4.4.0...v4.4.1
v4.4.0Compare Source
What's Changed
Full Changelog: chaijs/chai@v4.3.10...v4.4.0
v4.3.10Compare Source
This release simply bumps all dependencies to their latest non-breaking versions.
What's Changed
Full Changelog: chaijs/chai@v4.3.9...v4.3.10
v4.3.9Compare Source
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: chaijs/chai@v4.3.8...v4.3.9
v4.3.8Compare Source
What's Changed
New Contributors
Full Changelog: chaijs/chai@v4.3.7...v4.3.8
v4.3.7Compare Source
What's Changed
Full Changelog: chaijs/chai@v4.3.6...v4.3.7
v4.3.6Compare Source
Update loupe to 2.3.1
v4.3.5Compare Source
fca5bb1747eb4e022c2fa5276af6c8a4e00v4.3.4Compare Source
This fixes broken inspect behavior with bigints (#1321) (#1383) thanks @vapier
v4.3.3: / 2021-03-03Compare Source
This reintroduces
Assertionas an export in the mjs file. See #1378 & #1375v4.3.2: / 2021-03-03Compare Source
This fixes a regression in IE11. See #1380 & #1379
v4.3.1: / 2021-03-02Compare Source
This releases fixed an engine incompatibility with 4.3.0
The 4.x.x series of releases will be compatible with Node 4.0. Please report any errors found in Node 4 as bugs, and they will be fixed.
The 5.x.x series, when released, will drop support for Node 4.0
This fix also ensures
pathvalis updated to1.1.1to fix CVE-2020-7751v4.3.0: / 2021-02-04Compare Source
This is a minor release.
Not many changes have got in since the last release but this one contains a very important change (#1257) which will allow
jestusers to get better diffs. From this release onwards,jestusers will be able to see which operator was used in their diffs. Theoperatoris a property of theAssertionErrorthrown when assertions fail. This flag indicates what kind of comparison was made.This is also an important change for plugin maintainers. Plugin maintainers will now have access to the
operatorflag, which they can have access to through anutilmethod calledgetOperator`.Thanks to all the amazing people that contributed to this release.
New Features
contain.oneOfto take an array of possible values (@voliva)closeToerror message will now inform the user when adeltais required (@eouw0o83hf)Docs
Tests
useProxyconfig is checked inoverwriteProperty(@vieiralucas)contain.oneOf(@voliva )Chores
v4.2.0: / 2018-09-25Compare Source
This is a minor release. Thank you to all of our contributors and users!
New Features
Bug Fixes
.deep.equalstack (#1124; @meeber)--use_strict(#1034, #1040; @shvaikalesh)Performance
Style
Tests
Docs
.stringexample (#1156, #1157; @meeber).propertychaining examples (#193 (comment), #1130; @meeber).okdescription (#1047; @shvaikalesh)Chores
v4.1.2: / 2017-08-31Compare Source
This release fixes a bug when running in certain environments, and includes a few minor documentation fixes.
Bug Fixes
deep-eqlto version 3.0.0 (#1020)Docs
v4.1.1: / 2017-08-05Compare Source
This release includes a few bug and documentation fixes.
Bug Fixes
.instanceofto allow DOM interfaces in IE11 (#1000, #1008; @meeber).includeto work with all objects (#1009, #1012; @meeber)Docs
v4.1.0: / 2017-07-11Compare Source
This release includes one new feature and a few bug fixes.
New Features
Bug Fixes
.propertyassertion (#992; @meeber)Chores
expectTypesto accessssfiflag (#993; @meeber)v4.0.2: / 2017-06-05Compare Source
We have another bugfix release, addressing some issues for WebPack 1 users.
Bug Fixes
v4.0.1: / 2017-05-31Compare Source
4.0.1
Of course, any major release cannot go without a quick bugfix release shortly after - and here's ours!
Bug Fixes
browserfield which was mistakenly added, and caused bundler tools like Browserify or Webpack to fail as it attempted to rebundle an already bundled file. (#978, #982)v4.0.0: / 2017-05-26Compare Source
4.0.0
4.0 has been a huge undertaking by the chai community! A lot has changed to ensure Chai 4 is a stable, reliable, well documented codebase. Here are just some of the major improvements:
almost all documentation has been rewritten, with detailed instructions on how assertions work, which flags they can be combined with and the best practices for how to use them.
deep equality has been rewritten from the ground up to support ES6 types like
MapandSet, and better support existing types. It is now also much, much faster than before and allows us to bring some great improvements in upcoming releases.we have made sure the
deepflag now only ever does deep equality. Beforehand, it would sometimes also be used to test nested properties (for exampleexpect(foo).to.have.deep.property('bar.baz'). For nested assertions, please now use the.nestedflag.many assertions have become more strict, which means you get better error messages explaining where things have gone wrong. For the most part, this wont mean error messages where there weren't error messages before, but it will mean better error messages to replace the, sometimes cryptic, default
TypeErrormessages.we've added detections and helpful error messages for common mistakes and typos. The error messages will, in some cases, point you to documentation or in other cases suggest alternatives. These messages will continue to be improved in future releases, so let us know if you have any suggestions!
Breaking Changes
We no longer support Node v0.10 and v0.12 (since their LTS has ended) (PRs: #816, #901)
Instead of allowing the user to write the path of a property, now the deep flag performs a deep equality comparison when used with the
.propertyassertion.If you want the old behavior of using the dot or bracket notation to denote the property you want to assert against you can use the new
.nestedflag. (Related Issues: #745, #743, PRs: #758, #757)Please notice that the old methods which used the old behavior of the
deepflag on theassertinterface have been renamed. They all have had thedeepword changed by thenestedword. If you want to know more about this please take a look at #757.Previously,
expect(obj).not.property(name, val)would throw an Error ifobjdidn't have a property namedname. This change causes the assertion to pass instead.The
assert.propertyNotValandassert.deepPropertyNotValassertions were renamed toassert.notPropertyValandassert.notDeepPropertyVal, respectively. (Related Issues: #16, #743, #758)You can now use the
deepflag for the.includeassertion in order to perform adeepequality check to see if something is included on thetarget.Previously,
.includewas using strict equality (===) for non-negated property inclusion, butdeepequality for negated property inclusion and array inclusion.This change causes the .include assertion to always use strict equality unless the deep flag is set.
Please take a look at this comment if you want to know more about it. (Related Issues: #743, PRs: #760, #761)
Fix unstable behavior of the
NaNassertion. Now we use the suggested ES6 implementation.The new implementation is now more correct, strict and simple. While the old one threw false positives, the new implementation only checks if something is
NaN(or not if the.notflag is used) and nothing else. (Related Issues: #498, #682, #681, PRs: #508)The Typed Array types are now truncated if they're too long (in this case, if they exceed the
truncateThresholdvalue on theconfig). (Related Issues: #441, PRs: #576)The assertions:
within,above,least,below,most,increase,decreasewill throw an error if the assertion's target or arguments are not numbers. (Related Issues: #691, PRs: #692, #796)Previously,
expect(obj).not.ownProperty(name, val)would throw an Error if obj didn't have an own property (non-inherited) named name. This change causes the assertion to pass instead. (Related Issues: #795, #, PRs: #744, #810)*The
.emptyassertion will now throw when it is passed non-string primitives and functions (PRs: #763, #812)Assertion subject (
obj) changes when usingownPropertyorown.propertyand thus enables chaining. (Related Issues: #281, PRs: #641)The
.change,.increase, and.decreaseassertions changed from chainable method assertions to method assertions. They don't have any chaining behavior, and there's no generic semantic benefit to chaining them. (Related Issues: #917, PRs: #925)The
utils(second argument passed to thechai.usecallback function) no longer exports thegetPathValuefunction. If you want to use that please use thepathvalmodule, which is what chai uses internally now. (Related Issues: #457, #737, PRs: #830)(For plugin authors) Throw when calling
_superonoverwriteMethodif the method being overwritten isundefined.Currently if the method you are trying to overwrite is not defined and your new method calls
_superit will throw anError.(Related Issues: #467, PRs: #528)Before this change, calling
_superwould simply returnthis.(For plugin authors) Now
showDiffis turned on by default whenever theshowDiffflag is anything other thanfalse.This issue will mostly affect plugin creators or anyone that made extensions to the core, since this affects the
Assertion.assertmethod. (Related Issues: #574, PRs: #515)New Features
Throw when non-existent property is read. (Related Issues: #407, #766 PRs: #721, #770)
This is a potentially breaking change. Your build will fail if you have typos in your property assertions
Before
4.x.xwhen using property assertions they would not throw an error if you wrote it incorrectly.The example below, for example, would pass:
Since this implementation depends on ES6
Proxiesit will only work on platforms that support it.This property can be enabled (default) or disabled through the
config.useProxyproperty, for example:Add fix suggestions when accessing a nonexistent property in proxy mode. (Related Issues: #771, PRs: #782)
When a nonexistent property is accessed in proxy mode, Chai will compute the levenshtein distance to all possible properties in order to suggest the best fix to the user.
When non-chainable methods (including overwritten non-chainable methods) are used incorrectly an error will be thrown with a helpful error message. (PRs: #789)
Add a new configuration setting that describes which keys will be ignored when checking for non-existing properties on an assertion before throwing an error.
Since this implementation depends on ES6
Proxiesit will only work on platforms that support it. Also, if you disableconfig.useProxy, this setting will have no effect. (Related Issues: #765, PRs: #774)Add script that registers should as a side-effect. (Related Issues: #594, #693 PRs: #604)
You can also register should via a
mochaoption:mocha --require chai/should.The
changeassertion accepts a function as object. *(Related Issues: #544, PRs: [#607](https://redirect.giConfiguration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.