Skip to content

Update to chai 5.2.1 #25087

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 25, 2025
Merged

Update to chai 5.2.1 #25087

merged 4 commits into from
Jul 25, 2025

Conversation

CraigMacomber
Copy link
Contributor

@CraigMacomber CraigMacomber commented Jul 24, 2025

Description

Some of our tests use chai for asserts (most just use node's asserts module).

This updates the chai version to 5, if the release group is tooling and does not need CommonJS support.

A couple packages also had unused dependencies on chai which were removed.

Some packages in the client release group are still using chai, and as they need to support CommonJS they are not updated.

For the cases which did update, or removed the dependency, removes a dependency on the old version of loupe so that throws exceptions on startup which is annoying.

Reviewer Guidance

The review process is outlined on this wiki page.

@github-actions github-actions bot added area: build Build related issues area: dds Issues related to distributed data structures area: dds: propertydds area: dds: tree area: framework Framework is a tag for issues involving the developer framework. Eg Aqueduct dependencies Pull requests that update a dependency file base: main PRs targeted against main branch labels Jul 24, 2025
CraigMacomber added a commit that referenced this pull request Jul 24, 2025
## Description

This updates Benchmark, the only package which took a non-dep dependency
on chai, to replace that dependency with its own hand rolled assert
utility. As part of this, its dependencies were more generally updated,
as it has fallen behind and the update was trivial to include.

This transitively updates loupe (used by chai) so that it stopes
throwing exceptions on startup which is annoying.

This change has been split off from
#25087 to be its own
stand along update since there were more changes here than just updating
chai.
@github-actions github-actions bot removed area: dds: propertydds area: framework Framework is a tag for issues involving the developer framework. Eg Aqueduct area: dds: tree area: dds Issues related to distributed data structures labels Jul 24, 2025
Copy link
Contributor

@alexvy86 alexvy86 left a comment

Choose a reason for hiding this comment

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

LGTM

@CraigMacomber CraigMacomber marked this pull request as ready for review July 25, 2025 17:16
@Copilot Copilot AI review requested due to automatic review settings July 25, 2025 17:16
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates chai from version 4 to version 5.2.1 for packages in the tooling release group that don't require CommonJS support. The update also removes unused chai dependencies and ESLint configurations where chai is no longer needed.

  • Updates chai and @types/chai to version 5.2.1 in build tools and API documentation packages
  • Removes unused chai dependencies from devtools packages that don't actually use chai
  • Updates import syntax in test files to be compatible with chai 5's ESM module structure

Reviewed Changes

Copilot reviewed 14 out of 17 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tools/api-markdown-documenter/package.json Updates chai and @types/chai to version 5.2.1
packages/tools/devtools/devtools/tsconfig.json Removes chai from TypeScript types array
packages/tools/devtools/devtools/package.json Removes unused chai dependencies and eslint-plugin-chai-expect
packages/tools/devtools/devtools/.eslintrc.cjs Removes chai-expect ESLint plugin configuration
packages/tools/devtools/devtools-view/package.json Removes unused chai dependencies
build-tools/packages/version-tools/package.json Updates chai and @types/chai to version 5.2.1
build-tools/packages/build-infrastructure/src/test/*.test.ts Updates import syntax for chai 5 compatibility
build-tools/packages/build-infrastructure/package.json Updates chai and @types/chai to version 5.2.1
build-tools/packages/build-cli/src/test/**/*.test.ts Updates import syntax for chai 5 compatibility
build-tools/packages/build-cli/package.json Updates chai and @types/chai to version 5.2.1
Files not reviewed (3)
  • build-tools/pnpm-lock.yaml: Language not supported
  • pnpm-lock.yaml: Language not supported
  • tools/api-markdown-documenter/pnpm-lock.yaml: Language not supported

@CraigMacomber CraigMacomber merged commit 9014add into microsoft:main Jul 25, 2025
40 checks passed
@CraigMacomber CraigMacomber deleted the chai5 branch July 25, 2025 17:17
MarioJGMsoft pushed a commit to MarioJGMsoft/FluidFramework that referenced this pull request Jul 28, 2025
…soft#25089)

## Description

This updates Benchmark, the only package which took a non-dep dependency
on chai, to replace that dependency with its own hand rolled assert
utility. As part of this, its dependencies were more generally updated,
as it has fallen behind and the update was trivial to include.

This transitively updates loupe (used by chai) so that it stopes
throwing exceptions on startup which is annoying.

This change has been split off from
microsoft#25087 to be its own
stand along update since there were more changes here than just updating
chai.
MarioJGMsoft pushed a commit to MarioJGMsoft/FluidFramework that referenced this pull request Jul 28, 2025
## Description

Some of our tests use chai for asserts (most just use node's asserts
module).

This updates the chai version to 5, if the release group is tooling and
does not need CommonJS support.

A couple packages also had unused dependencies on chai which were
removed.

Some packages in the client release group are still using chai, and as
they need to support CommonJS they are not updated.
 
For the cases which did update, or removed the dependency, removes a
dependency on the old version of loupe so that throws exceptions on
startup which is annoying.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: build Build related issues base: main PRs targeted against main branch dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants