Skip to content

fix(deps): align mocha/chai versions in node envs#10178

Open
davidfirst wants to merge 2 commits intomasterfrom
fix/align-mocha-chai-peer-deps
Open

fix(deps): align mocha/chai versions in node envs#10178
davidfirst wants to merge 2 commits intomasterfrom
fix/align-mocha-chai-peer-deps

Conversation

@davidfirst
Copy link
Member

Summary

  • Aligns mocha and chai peer dependency versions across node-babel-mocha and node-typescript-mocha envs
  • Previously: node-babel-mocha had chai@4.3.0 and mocha@10.2.0
  • Now: both envs use chai@5.2.1 and mocha@11.7.1 (same as core-aspect-env)
  • This prevents pnpm from creating multiple installations with different peer dependency hashes, fixing TypeScript compilation errors in capsules

Related CR: https://bit.cloud/teambit/node/~change-requests/align-mocha-11-YQbM2C9YG

Test plan

  • CI should pass without TypeScript type mismatch errors in capsules

Update components to use node-babel-mocha@0.2.5 and node-typescript-mocha
with aligned peer dependencies (mocha@11.7.1, chai@5.2.1) to prevent
multiple pnpm installations with different peer dependency hashes.

This fixes TypeScript compilation errors in capsules caused by type
mismatches between different copies of the same package.

Related: https://bit.cloud/teambit/node/~change-requests/align-mocha-11-YQbM2C9YG
Copilot AI review requested due to automatic review settings February 2, 2026 20:22
Copy link
Contributor

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 aligns mocha and chai peer dependency versions across Node.js environment components to prevent pnpm from creating multiple installations with different peer dependency hashes, which was causing TypeScript compilation errors in capsules. The changes update both node-babel-mocha and node-typescript-mocha environments to use chai@5.2.1 and mocha@11.7.1, matching the versions used in core-aspect-env.

Changes:

  • Updated peer dependency versions for chai (4.3.0 → 5.2.1) and mocha (10.2.0 → 11.7.1) in node-babel-mocha and node-typescript-mocha environments
  • Added environment configuration entries in .bitmap file for multiple components to explicitly specify their test environment

Reviewed changes

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

File Description
scopes/node/envs/node-babel-mocha/node-babel-mocha.bit-env.ts Updated chai and mocha peer dependencies to versions 5.2.1 and 11.7.1 respectively
scopes/node/envs/node-typescript-mocha/node-typescript-mocha.bit-env.ts Updated chai and mocha peer dependencies to versions 5.2.1 and 11.7.1 respectively
.bitmap Added explicit environment configuration entries for components using node-babel-mocha and node-typescript-mocha environments

@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 5, 2026

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.

1 participant