chore(deps): update dependency chai to v5#8077
chore(deps): update dependency chai to v5#8077renovate-bot wants to merge 1 commit intogoogleapis:mainfrom
Conversation
|
/gcbrun |
There was a problem hiding this comment.
Code Review
This pull request updates chai and @types/chai to version 5.0.0 across several packages. Review feedback correctly identifies that Chai v5 is an ESM-only package, which is incompatible with these projects as they are currently configured for CommonJS. To avoid runtime errors and type mismatches, it is recommended to revert these dependencies to their latest v4 versions.
| "devDependencies": { | ||
| "c8": "^9.0.0", | ||
| "chai": "^4.2.0", | ||
| "chai": "^5.0.0", |
There was a problem hiding this comment.
Chai v5 is an ESM-only package and does not support require(). Since this package.json does not specify "type": "module", the project is treated as CommonJS by default, and upgrading to v5 will cause runtime errors in tests or samples using require('chai'). Additionally, mocha v8 (line 22) has limited support for ESM. It is recommended to use the latest v4 release (^4.5.0) to maintain compatibility while the project remains in CommonJS.
| "chai": "^5.0.0", | |
| "chai": "^4.5.0", |
| }, | ||
| "devDependencies": { | ||
| "@types/chai": "^4.2.7", | ||
| "@types/chai": "^5.0.0", |
There was a problem hiding this comment.
Upgrading to @types/chai v5 is incompatible with CommonJS projects, as these types are specifically tailored for the ESM-only version of Chai. Since this package is not configured as an ES module, it is recommended to use the latest v4 types (^4.3.20) to ensure compatibility with the runtime environment and avoid type mismatches.
| "@types/chai": "^5.0.0", | |
| "@types/chai": "^4.3.20", |
| "@opentelemetry/sdk-trace-node": "^2.0.1", | ||
| "@types/assert": "^1.5.11", | ||
| "@types/chai": "^4.3.20", | ||
| "@types/chai": "^5.0.0", |
There was a problem hiding this comment.
Upgrading to @types/chai v5 in a CommonJS project can lead to type mismatches and build failures, as Chai v5 is ESM-only. It is recommended to remain on the latest v4 types (^4.3.20) for compatibility with the current module system.
| "@types/chai": "^5.0.0", | |
| "@types/chai": "^4.3.20", |
This PR contains the following updates:
^4.2.0→^5.0.0^4.2.7→^5.0.0^4.3.20→^5.0.0Release Notes
chaijs/chai (chai)
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
Configuration
📅 Schedule: (UTC)
* 9 * * 1)🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR was generated by Mend Renovate. View the repository job log.