Skip to content

chore(deps): update dependency chai to v5#8077

Open
renovate-bot wants to merge 1 commit intogoogleapis:mainfrom
renovate-bot:renovate/chai-5.x
Open

chore(deps): update dependency chai to v5#8077
renovate-bot wants to merge 1 commit intogoogleapis:mainfrom
renovate-bot:renovate/chai-5.x

Conversation

@renovate-bot
Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
chai (source) ^4.2.0^5.0.0 age confidence
@types/chai (source) ^4.2.7^5.0.0 age confidence
@types/chai (source) ^4.3.20^5.0.0 age confidence

Release Notes

chaijs/chai (chai)

v5.2.0

Compare Source

What's Changed

New Contributors

Full Changelog: chaijs/chai@v5.1.2...v5.2.0

v5.1.2

Compare Source

What's Changed

Full Changelog: chaijs/chai@v5.1.1...v5.1.2

v5.1.1

Compare Source

What's Changed

New Contributors

Full Changelog: chaijs/chai@v5.1.0...v5.1.1

v5.1.0

Compare Source

What's Changed

New Contributors

Full Changelog: chaijs/chai@v5.0.3...v5.1.0

v5.0.3

Compare Source

Fix bad v5.0.2 publish.

Full Changelog: chaijs/chai@v5.0.2...v5.0.3

v5.0.2

Compare Source

What's Changed

Full Changelog: chaijs/chai@v5.0.1...v5.0.2

v5.0.0

Compare Source

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

New Contributors

Full Changelog: chaijs/chai@4.3.1...v5.0.0


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • Between 09:00 AM and 09:59 AM, only on Monday (* 9 * * 1)
  • Automerge
    • At any time (no schedule defined)

🚦 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.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate-bot renovate-bot requested review from a team as code owners April 20, 2026 09:49
@dpebot
Copy link
Copy Markdown
Collaborator

dpebot commented Apr 20, 2026

/gcbrun

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

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.

Suggested change
"chai": "^5.0.0",
"chai": "^4.5.0",

},
"devDependencies": {
"@types/chai": "^4.2.7",
"@types/chai": "^5.0.0",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

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.

Suggested change
"@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",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

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.

Suggested change
"@types/chai": "^5.0.0",
"@types/chai": "^4.3.20",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants