Skip to content

fix(doubles.jest, doubles.sinon, doubles.vitest): remove redundant @suites/unit module augmentation#1018

Merged
omermorad merged 4 commits into
masterfrom
fix/doubles-ts2300-duplicate-identifier
May 6, 2026
Merged

fix(doubles.jest, doubles.sinon, doubles.vitest): remove redundant @suites/unit module augmentation#1018
omermorad merged 4 commits into
masterfrom
fix/doubles-ts2300-duplicate-identifier

Conversation

@omermorad

Copy link
Copy Markdown
Collaborator

Summary

  • Removes declare module '@suites/unit' augmentation blocks from all three adapter unit.d.ts files
  • @suites/unit 3.1.0 already exports Mocked and Stub directly; the adapter blocks re-declared the same names, causing TS2300: Duplicate identifier with skipLibCheck: false
  • Adds stable release type to release-packages.yml for direct hotfix/patch releases from master without a pre-release cycle

Fixes #1017

Test plan

  • tsc --noEmit with skipLibCheck: false exits 0
  • import { Mocked } from '@suites/unit' still resolves correctly
  • All 10 package test suites pass
  • CI e2e matrix passes

@codecov

codecov Bot commented May 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.56%. Comparing base (77a6f85) to head (90eb209).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1018   +/-   ##
=======================================
  Coverage   93.56%   93.56%           
=======================================
  Files          26       26           
  Lines         653      653           
  Branches      107      107           
=======================================
  Hits          611      611           
  Misses         33       33           
  Partials        9        9           
Flag Coverage Δ
core.unit 93.44% <ø> (ø)
di.inversify 93.61% <ø> (ø)
di.nestjs 87.25% <ø> (ø)
doubles.jest 100.00% <ø> (ø)
doubles.sinon 100.00% <ø> (ø)
doubles.vitest 100.00% <ø> (ø)
unit 84.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@omermorad omermorad force-pushed the fix/doubles-ts2300-duplicate-identifier branch from 6e2267d to d8ccf68 Compare May 6, 2026 15:59
omermorad added 2 commits May 6, 2026 19:00
@suites/unit 3.1.0 added direct exports of Mocked and Stub. The adapter
unit.d.ts files already declare the same names via module augmentation,
causing TS2300 duplicate identifier errors with skipLibCheck: false.

Removing the direct exports resolves the conflict. Mocked and Stub remain
available through the adapter augmentation loaded by the postinstall script.

Closes #1017
Adds a third release_type option ('stable') that runs lerna version
--conventional-commits directly, enabling hotfix/patch releases from
master without going through the prerelease/graduate cycle.
@omermorad omermorad force-pushed the fix/doubles-ts2300-duplicate-identifier branch from d8ccf68 to 97b9dd2 Compare May 6, 2026 16:00
omermorad added 2 commits May 6, 2026 19:44
Validates that TS2300 duplicate identifier errors do not regress.
Each scenario now runs tsc twice: once with skipLibCheck: true (existing)
and once with skipLibCheck: false (new) to catch augmentation conflicts.

Closes #1017
Vitest 4.x changed Mock<TArgs, TReturn> to Mock<TReturn>, making our
Stub type incompatible under skipLibCheck: false. Scope the strict
type-check to jest and sinon adapters only for this fix. Vitest 4.x
compatibility will be tracked separately.
@omermorad omermorad merged commit 2f8c939 into master May 6, 2026
47 checks passed
@omermorad omermorad deleted the fix/doubles-ts2300-duplicate-identifier branch May 6, 2026 17:00
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.

Duplicate identifier 'Stub'/'Mocked' in 3.1.0 with skipLibCheck: false

1 participant