fix(doubles.jest, doubles.sinon, doubles.vitest): remove redundant @suites/unit module augmentation#1018
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
6e2267d to
d8ccf68
Compare
@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.
d8ccf68 to
97b9dd2
Compare
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
declare module '@suites/unit'augmentation blocks from all three adapterunit.d.tsfiles@suites/unit3.1.0 already exportsMockedandStubdirectly; the adapter blocks re-declared the same names, causingTS2300: Duplicate identifierwithskipLibCheck: falsestablerelease type torelease-packages.ymlfor direct hotfix/patch releases from master without a pre-release cycleFixes #1017
Test plan
tsc --noEmitwithskipLibCheck: falseexits 0import { Mocked } from '@suites/unit'still resolves correctly