Hotfix for @suites/unit that resolves a TypeScript compilation error (TS2300: Duplicate identifier) when projects use skipLibCheck: false. Only the @suites/unit package is affected; all other packages remain at 3.1.0.
Bug Fixes
unit- #1020 fix(unit): remove direct Mocked and Stub exports to fix TS2300 duplicate identifier, closes #1017 (@omermorad)
Details
In v3.1.0, @suites/unit began exporting Mocked and Stub directly from its barrel (index.ts). These same types were already provided by each adapter package (@suites/doubles.jest, @suites/doubles.vitest, @suites/doubles.sinon) via TypeScript module augmentation (declare module '@suites/unit'). With skipLibCheck: false, TypeScript sees both declarations and reports TS2300: Duplicate identifier.
The fix removes the direct exports and restores the v3.0.x behavior where adapters are the sole source of Mocked and Stub via augmentation. Users can still import these types from @suites/unit as before; the adapter augmentation makes them available.
Affected Package
| Package | Version |
|---|---|
@suites/unit |
3.1.1 |
All other @suites/* packages remain at 3.1.0.
Full Changelog: v3.1.0...v3.1.1