-
Notifications
You must be signed in to change notification settings - Fork 553
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
Update to chai 5.2.1 #25087
Conversation
## 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.
…ge's dependencies on chai which don't use it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this 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
…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.
## 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.
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.