Skip to content

chore: update node-babel-mocha env to 2.0.4 - #10570

Merged
davidfirst merged 2 commits into
masterfrom
update-node-babel-mocha-env
Aug 5, 2026
Merged

chore: update node-babel-mocha env to 2.0.4#10570
davidfirst merged 2 commits into
masterfrom
update-node-babel-mocha-env

Conversation

@davidfirst

Copy link
Copy Markdown
Member

This PR updates the node-babel-mocha env to version 2.0.4.

The new env version does not force chai as a dev dependency. Components that do not use chai do not get it anymore. Components that use chai continue to get version 5.2.1. The update applies to 86 components.

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

chore: bump node-babel-mocha env to 2.0.4 across components

⚙️ Configuration changes ✨ Enhancement 🕐 20-40 Minutes

Grey Divider

AI Description

• Update Bit components to use node-babel-mocha env v2.0.4.
• Stop pulling chai into components that don’t use it.
• Refresh pnpm lockfile to reflect the updated env resolution.
Diagram

graph TD
  A["Bit workspace"] --> B[".bitmap"] --> C["node-babel-mocha 2.0.4"] --> D["Resolved dev deps"] --> E["86 components"]
  C --> F["chai 5.2.1 (opt-in)"]
  C --> G["pnpm-lock.yaml"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Keep chai as a workspace-wide devDependency
  • ➕ Avoids test breakages for components that relied on chai transitively.
  • ➖ Reintroduces an unnecessary dependency for components that don’t use chai.
  • ➖ Undermines the benefit of the env change (leaner dependency graph).
2. Add explicit chai devDependencies only to affected components
  • ➕ Preserves the new env behavior while keeping tests stable.
  • ➕ Makes dependency ownership explicit and reduces hidden coupling.
  • ➖ Requires identifying any components/tests that assumed chai was available implicitly.
3. Wrap node-babel-mocha with a custom Bit env for legacy consumers
  • ➕ Allows a controlled transition: legacy env can still include chai while new components stay lean.
  • ➖ Adds long-term maintenance overhead and divergence from upstream env behavior.

Recommendation: Proceed with the env bump and rely on the new opt-in chai behavior, but ensure any components whose tests use chai declare it explicitly (directly or via their env configuration). This keeps the dependency graph lean while avoiding hidden transitive reliance; CI/test runs across the affected components should catch any missing declarations quickly.

Files changed (2) +2688 / -1127

Other (2) +2688 / -1127
.bitmapPin many components to node-babel-mocha@2.0.4 +169/-85

Pin many components to node-babel-mocha@2.0.4

• Updates component env configuration entries from teambit.node/envs/node-babel-mocha@2.0.3 to @2.0.4 across the workspace. For some components that previously lacked a config block, adds an explicit config section to apply the updated env version.

.bitmap

pnpm-lock.yamlLockfile refresh for node-babel-mocha@2.0.4 +2519/-1042

Lockfile refresh for node-babel-mocha@2.0.4

• Updates the pnpm lockfile to include the resolved @teambit/node.envs.node-babel-mocha@2.0.4 package and its dependency graph. This aligns workspace installs with the updated Bit env version and its revised chai behavior.

pnpm-lock.yaml

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

To customize comments, go to the Qodo configuration screen, or learn more in the docs.

Qodo Logo

@davidfirst
davidfirst enabled auto-merge (squash) August 5, 2026 18:26
@davidfirst
davidfirst merged commit 3ea5969 into master Aug 5, 2026
14 checks passed
@davidfirst
davidfirst deleted the update-node-babel-mocha-env branch August 5, 2026 19:23
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