Skip to content

Upgrade mocha 10.8.2 → 11.7.6 (and ts-mocha to 11.1.0) - #1968

Merged
rugpanov merged 2 commits into
mainfrom
rugpanov/mocha-11-upgrade
Jul 6, 2026
Merged

Upgrade mocha 10.8.2 → 11.7.6 (and ts-mocha to 11.1.0)#1968
rugpanov merged 2 commits into
mainfrom
rugpanov/mocha-11-upgrade

Conversation

@rugpanov

@rugpanov rugpanov commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Why

Dependabot #1964 bumped mocha to 11.7.6, but the one-line package.json change fails CI. mocha is consumed via the ts-mocha wrapper, whose ^10.0.0 pin peer-caps mocha at ^10.X.X, so the bump produces a peer-dependency conflict (reproduced locally by applying the PR verbatim):

YN0060: databricks provides mocha 11.7.6, which doesn't satisfy what ts-mocha requests

CI installs with yarn install --immutable (unit-tests.yml, push.yml, create-build-artifacts.yml, release-pr.yml), so the stale/conflicting lockfile makes the install step fail outright — which is why #1964 is BLOCKED.

What

  • Bump mocha ^10.2.0^11.7.6 (the Dependabot change).
  • Bump ts-mocha ^10.0.0^11.1.0 (latest), whose peer range now includes ^11.X.X.
  • Regenerate yarn.lock.

Notes for the reviewer:

  • ts-mocha 11 moved ts-node + tsconfig-paths from direct deps to peers. The extension already declares ts-node@^10.9.2 (satisfies the peer) and tsconfig-paths is an optional peer — so no additions are needed.
  • @types/mocha@^10.0.6 is unchanged: 10.0.10 is still latest (no v11 types line; the mocha type API is stable).
  • @wdio/mocha-framework@9.29.0 pulls its own mocha@^10.3.0 as a direct dependency, so the e2e/wdio path is unaffected and keeps mocha 10 internally.
  • Engine: mocha 11 requires node ^18.18 || ^20.9 || >=21.1; the extension requires node >=22.0.

Dev-only dependency — no runtime, extension-behavior, or shipped-output change for users.

Verification

  • yarn install --immutable passes (no YN0028, no YN0060).
  • yarn run build (tsc --build) succeeds.
  • test:integ:sdk (ts-mocha --type-check, --dry-run) type-checks and loads all src/sdk-extensions/**/*.integ.ts files and collects the suite.
  • yarn run test:unit: 268 passing, 0 failing (mocha 11 new Mocha harness in suite.ts).
  • eslint clean on suite.ts and the mocha-consuming test files.

Supersedes #1964 (which cannot merge without the ts-mocha bump).

This pull request and its description were written by Isaac.


This PR was created with GitHub MCP.

*Why*
Dependabot PR #1964 bumped mocha to 11.7.6 but the one-line package.json
change fails CI. mocha is consumed via the `ts-mocha` wrapper, whose
`^10.0.0` pin peer-caps mocha at `^10.X.X`, so the bump produces a
peer-dependency conflict:

    YN0060: databricks provides mocha 11.7.6, which doesn't satisfy what
            ts-mocha requests

CI installs with `yarn install --immutable` (unit-tests.yml, push.yml,
create-build-artifacts.yml, release-pr.yml), so the stale/conflicting
lockfile makes the install step fail outright.

*What*
- Bump `mocha` `^10.2.0` → `^11.7.6` (the Dependabot change).
- Bump `ts-mocha` `^10.0.0` → `^11.1.0`, whose peer range now includes
  `^11.X.X`. ts-mocha 11 moved ts-node/tsconfig-paths to peers; the
  extension already declares `ts-node@^10.9.2` and tsconfig-paths is an
  optional peer, so no further additions are needed.
- Regenerate yarn.lock.

`@types/mocha@^10.0.6` is unchanged (10.0.10 is still `latest`; no v11
types line, API stable). `@wdio/mocha-framework` pulls its own
`mocha@^10.3.0` as a direct dependency, so the e2e/wdio path is
unaffected. mocha 11 requires node `^18.18 || ^20.9 || >=21.1`; the
extension requires `node >=22.0`. Dev-only dependency: no runtime,
extension-behavior, or shipped-output change.

*Verification*
- `yarn install --immutable` passes (no YN0028, no YN0060).
- `yarn run build` (tsc --build) succeeds.
- `test:integ:sdk` (ts-mocha --type-check, --dry-run) type-checks and
  loads all sdk-extensions *.integ.ts files and collects the suite.
- `yarn run test:unit`: 268 passing, 0 failing (mocha 11 `new Mocha`
  harness in suite.ts).
- eslint clean on suite.ts and the mocha-consuming test files.

Supersedes #1964 (which cannot merge without the ts-mocha bump).

Co-authored-by: Isaac
@rugpanov

rugpanov commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Integration tests ❌ 7 of 35 test jobs failed for c3b3b94d (28 passed).
View run

@rugpanov
rugpanov temporarily deployed to test-trigger-is July 6, 2026 11:26 — with GitHub Actions Inactive
@rugpanov
rugpanov merged commit 3e8c3dc into main Jul 6, 2026
6 checks passed
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger:
go/deco-tests-run/vscode

Inputs:

  • PR number: 1968
  • Commit SHA: 8496d5d21d23762eb0b9a78b58794eb5c358a2e7

Checks will be approved automatically on success.

@github-actions github-actions Bot mentioned this pull request Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants