From 05443497f00870a4303f823e9a242e8a3eccb5f8 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 23 Dec 2024 17:52:18 +0000 Subject: [PATCH] Update dependency strong-mock to v9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit | datasource | package | from | to | | ---------- | ----------- | ----- | ----- | | npm | strong-mock | 8.0.1 | 9.0.1 | ## [v9.0.1](https://github.com/NiGhTTraX/strong-mock/blob/HEAD/CHANGELOG.md#901-2024-11-23) ## [v9.0.0](https://github.com/NiGhTTraX/strong-mock/blob/HEAD/CHANGELOG.md#900-2024-05-27) This version greatly improves error messages and the matcher API. Check the [migration guide](MIGRATION.md#migrating-to-v9). ```typescript const fn = mock<(x: number, y: number, z: { foo: string }) => number>(); when(() => fn(1, 2, { foo: 'bar' })).thenReturn(42); fn(1, 2, { foo: 'baz' }); ``` | Before | After | |--------------------------------|------------------------------| | ![before](media/before-v9.png) | ![after](media/after-v9.png) | ##### ⚠ BREAKING CHANGES - `isObject` has been replaced by `isPlainObject` and `containsObject` - Merge `isString`'s optional `containing` and `matching` args - Rename the `toJSON` matcher method to `toString` - Don't allow empty partials in `containsObject` ##### Features - Attach actual/expected args to error instance to enable IDE diffs ([7a04a43](https://github.com/NiGhTTraX/strong-mock/commit/7a04a43b47471f2178595a98dec2975e0cf7249e)) - Improve `isArray` diff ([a5aaddd](https://github.com/NiGhTTraX/strong-mock/commit/a5aaddd0a28108dd82d204914b1b5f00a6ac9cca)) - Improve `isNumber` diff ([55647ed](https://github.com/NiGhTTraX/strong-mock/commit/55647ed698323be9008b0e517b405df85299b12c)) - Improve `isObject` diff ([5533bcf](https://github.com/NiGhTTraX/strong-mock/commit/5533bcf6fef6b1275b9ab64c1caf0b6235e1628c)) - Improve `isString` diff ([5c73fbb](https://github.com/NiGhTTraX/strong-mock/commit/5c73fbbe339753bc1838d7e401af14828b8fc070)) - Improve `willCapture` diff ([7d92ce9](https://github.com/NiGhTTraX/strong-mock/commit/7d92ce9ef67cd44aca5707cbf4f268b26605c983)) - Improve colors in UnexpectedCall error message ([f326954](https://github.com/NiGhTTraX/strong-mock/commit/f326954d4284a65ed87794f567accc4875561988)) - Pretty print argument diffs in UnexpectedCall error messages ([ba4f6b5](https://github.com/NiGhTTraX/strong-mock/commit/ba4f6b5df5845fccce78373a509be73fbb9d8aca)) ##### Bug Fixes - Fix `isPartial` allowing unexpected keys ([cc0b881](https://github.com/NiGhTTraX/strong-mock/commit/cc0b88196c008040d1ec0ecb8b77d7e4baad9ba6)) - Fix `isPartial` not working with interfaces ([169b336](https://github.com/NiGhTTraX/strong-mock/commit/169b336a4bcaef95e404dc098e0725ae71a6a229)) - `isObject` now correctly fails for `null` and `undefined` ([9b50fe4](https://github.com/NiGhTTraX/strong-mock/commit/9b50fe48caeaafc5036085db596204a362795e3b)) - Fix `It` docstrings ([df7f91a](https://github.com/NiGhTTraX/strong-mock/commit/df7f91a3f3f991894470c8ca759b069d82819fa0)) - Handle non string keys in `isObject` ([87cb768](https://github.com/NiGhTTraX/strong-mock/commit/87cb7684ad248e2761195963f8f69857a5124cbd)) --- package.json | 2 +- pnpm-lock.yaml | 24 +++++++----------------- 2 files changed, 8 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index f41c772..2bf3564 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "prettier": "3.4.2", "react": "17.0.2", "react-dom": "17.0.2", - "strong-mock": "~8.0.1", + "strong-mock": "~9.0.0", "stylelint": "16.12.0", "stylelint-config-recommended": "14.0.1", "stylelint-config-styled-components": "0.1.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 87ffeaa..412e9b8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -115,8 +115,8 @@ importers: specifier: 3.4.2 version: 3.4.2 strong-mock: - specifier: ~8.0.1 - version: 8.0.1 + specifier: ~9.0.0 + version: 9.0.1 stylelint: specifier: 16.12.0 version: 16.12.0(typescript@5.7.2) @@ -2540,10 +2540,6 @@ packages: resolution: {integrity: sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - jest-matcher-utils@29.3.1: - resolution: {integrity: sha512-fkRMZUAScup3txIKfMe3AIZZmPEjWEdsPJFK3AIy5qRohWqQFg1qrmKfYXR9qEkNc7OdAu2N4KPHibEmy4HPeQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - jest-matcher-utils@29.7.0: resolution: {integrity: sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -3476,8 +3472,8 @@ packages: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} - strong-mock@8.0.1: - resolution: {integrity: sha512-4dtV6JNBaohZTVOMNkJtY1O60GXA9XWSvQIl5lX0obm44ptXuvK5v1uL5rA9C+fLqnsGL5eYHrXFPU5eMEj4RQ==} + strong-mock@9.0.1: + resolution: {integrity: sha512-EhNTlB2DLux5HWV/bXZPPEPO9Y77RTm1KNBiFy1bX+duqfSVV2Pr88TzXAVpmJd40yHyceWVOuM1z1JT7pWclA==} stylelint-config-recommended@14.0.1: resolution: {integrity: sha512-bLvc1WOz/14aPImu/cufKAZYfXs/A/owZfSMZ4N+16WGXLoX5lOir53M6odBxvhgmgdxCVnNySJmZKx73T93cg==} @@ -6842,13 +6838,6 @@ snapshots: jest-get-type: 29.6.3 pretty-format: 29.7.0 - jest-matcher-utils@29.3.1: - dependencies: - chalk: 4.1.2 - jest-diff: 29.7.0 - jest-get-type: 29.6.3 - pretty-format: 29.7.0 - jest-matcher-utils@29.7.0: dependencies: chalk: 4.1.2 @@ -7974,9 +7963,10 @@ snapshots: strip-json-comments@3.1.1: {} - strong-mock@8.0.1: + strong-mock@9.0.1: dependencies: - jest-matcher-utils: 29.3.1 + jest-diff: 29.7.0 + jest-matcher-utils: 29.7.0 lodash: 4.17.21 stylelint-config-recommended@14.0.1(stylelint@16.12.0(typescript@5.7.2)):