⚡ Slightly faster code for RunExecution#6444
Conversation
🦋 Changeset detectedLatest commit: 6489cba The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Co-authored-by: dubzzz <[email protected]>
Co-authored-by: dubzzz <[email protected]>
| } | ||
|
|
||
| private firstFailure(): number { | ||
| return this.pathToFailure ? +safeSplit(this.pathToFailure, ':')[0] : -1; |
Co-authored-by: dubzzz <[email protected]>
|
Why the change?
|
|
👋 A preview of the new documentation is available at: http://696ab55ffc063e1339356d45--dubzzz-fast-check.netlify.app |
@fast-check/ava
@fast-check/expect-type
fast-check
@fast-check/jest
@fast-check/packaged
@fast-check/poisoning
@fast-check/vitest
@fast-check/worker
commit: |
Updated the version of 'fast-check' from patch to minor due to performance improvements.
|
👋 A preview of the new documentation is available at: http://696ab610f8e84008818c26c4--dubzzz-fast-check.netlify.app |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6444 +/- ##
=======================================
Coverage 94.84% 94.84%
=======================================
Files 207 207
Lines 5567 5570 +3
Branches 1457 1457
=======================================
+ Hits 5280 5283 +3
Misses 274 274
Partials 13 13
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:
|
…ast-check/[email protected], @fast-check/[email protected], @fast-check/[email protected], @fast-check/[email protected], @fast-check/[email protected] (#6706) Resulting CHANGELOG at: - https://github.com/dubzzz/fast-check/blob/changelog-c91edcb2009e78/packages/fast-check/CHANGELOG.md - https://github.com/dubzzz/fast-check/blob/changelog-c91edcb2009e78/packages/ava/CHANGELOG.md - https://github.com/dubzzz/fast-check/blob/changelog-c91edcb2009e78/packages/vitest/CHANGELOG.md - https://github.com/dubzzz/fast-check/blob/changelog-c91edcb2009e78/packages/poisoning/CHANGELOG.md - https://github.com/dubzzz/fast-check/blob/changelog-c91edcb2009e78/packages/packaged/CHANGELOG.md - https://github.com/dubzzz/fast-check/blob/changelog-c91edcb2009e78/packages/jest/CHANGELOG.md - https://github.com/dubzzz/fast-check/blob/changelog-c91edcb2009e78/packages/worker/CHANGELOG.md Got the following errors: -⚠️ Unhandled type: ⚡ on [PR-6446](#6446) with title Replace loose equality by strict one -⚠️ Unhandled type: ⚡ on [PR-6444](#6444) with title Slightly faster code for RunExecution - ℹ️ Scanned 208 PRs for fast-check: - ℹ️ • accepted: 71, - ℹ️ • skipped ignored: 108, - ℹ️ • skipped unrelated: 27, - ℹ️ • failed: 2 - ℹ️ Scanned 697 PRs for @fast-check/ava: - ℹ️ • accepted: 5, - ℹ️ • skipped ignored: 0, - ℹ️ • skipped unrelated: 692, - ℹ️ • failed: 0 - ℹ️ Scanned 277 PRs for @fast-check/vitest: - ℹ️ • accepted: 6, - ℹ️ • skipped ignored: 0, - ℹ️ • skipped unrelated: 271, - ℹ️ • failed: 0 - ℹ️ Scanned 697 PRs for @fast-check/poisoning: - ℹ️ • accepted: 4, - ℹ️ • skipped ignored: 0, - ℹ️ • skipped unrelated: 693, - ℹ️ • failed: 0 - ℹ️ Scanned 697 PRs for @fast-check/packaged: - ℹ️ • accepted: 4, - ℹ️ • skipped ignored: 0, - ℹ️ • skipped unrelated: 693, - ℹ️ • failed: 0 - ℹ️ Scanned 655 PRs for @fast-check/jest: - ℹ️ • accepted: 3, - ℹ️ • skipped ignored: 0, - ℹ️ • skipped unrelated: 652, - ℹ️ • failed: 0 - ℹ️ Scanned 670 PRs for @fast-check/worker: - ℹ️ • accepted: 9, - ℹ️ • skipped ignored: 0, - ℹ️ • skipped unrelated: 661, - ℹ️ • failed: 0 --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Nicolas DUBIEN <[email protected]>
Plan: Use strict equality (===) for pathToFailure checks
==with===in RunExecution.ts for allthis.pathToFailure == nullcomparisonsif (this.pathToFailure == null)→if (this.pathToFailure === undefined)if (this.pathToFailure == null)→if (this.pathToFailure === undefined)if (this.pathToFailure == null)→if (this.pathToFailure === undefined)this.pathToFailure == null→this.pathToFailure === undefined)isSuccessarrow function → regular methodfirstFailurearrow function → regular methodnumShrinksarrow function → regular methodmergePathsstatic arrow function → regular static method!== undefinedchecksfirstFailure():this.pathToFailure ?→this.pathToFailure !== undefined ?numShrinks():this.pathToFailure ?→this.pathToFailure !== undefined ?Summary
Successfully updated all equality checks for
this.pathToFailurefrom loose equality (== null) to strict equality (=== undefined), converted all lambda/arrow function methods to regular methods, and replaced all truthy checks with explicit!== undefinedchecks. This change follows TypeScript best practices and maintains the same behavior.Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.