From f5980a0b7902d4544f7b78b7d593100ec30e862a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 16 Sep 2024 08:46:07 +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.0 | ## [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 | 36 +++++++++++++++++++----------------- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index a2f96d0..fd60629 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "prettier": "3.3.3", "react": "17.0.2", "react-dom": "17.0.2", - "strong-mock": "~8.0.1", + "strong-mock": "~9.0.0", "stylelint": "16.9.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 357408e..c307370 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -115,8 +115,8 @@ importers: specifier: 3.3.3 version: 3.3.3 strong-mock: - specifier: ~8.0.1 - version: 8.0.1 + specifier: ~9.0.0 + version: 9.0.0 stylelint: specifier: 16.9.0 version: 16.9.0(typescript@4.9.5) @@ -2519,6 +2519,10 @@ packages: resolution: {integrity: sha512-8RqP1B/OXzjjTWkqMX67iqgwBVJRgCyKD3L9nq+6ZqJMdvjE8RgHktqZ6jNrkdMT+dJuYNI3rhQpxaz7drJHfw==} engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} + jest-diff@29.4.3: + resolution: {integrity: sha512-YB+ocenx7FZ3T5O9lMVMeLYV4265socJKtkwgk/6YUz/VsEzYDkiMuMhWzZmxm3wDRQvayJu/PjkjjSkjoHsCA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + jest-diff@29.7.0: resolution: {integrity: sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -2568,10 +2572,6 @@ packages: resolution: {integrity: sha512-kQeJ7qHemKfbzKoGjHHrRKH6atgxMk8Enkk2iPQ3XwO6oE/KYD8lMYOziCkeSB9G4adPM4nR1DE8Tf5JeWH6Bw==} engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.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} @@ -3537,8 +3537,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.0: + resolution: {integrity: sha512-sLtDpqWVbbOFdNDjP5uaV4U5BO9eCuPfwiT43JD7SThF59Ivjrd9c3E+XH8CAY4GtBFa3sADpkyueq8YB+TKYA==} stylelint-config-recommended@14.0.1: resolution: {integrity: sha512-bLvc1WOz/14aPImu/cufKAZYfXs/A/owZfSMZ4N+16WGXLoX5lOir53M6odBxvhgmgdxCVnNySJmZKx73T93cg==} @@ -6834,6 +6834,13 @@ snapshots: jest-get-type: 28.0.2 pretty-format: 28.1.3 + jest-diff@29.4.3: + dependencies: + chalk: 4.1.2 + diff-sequences: 29.6.3 + jest-get-type: 29.6.3 + pretty-format: 29.7.0 + jest-diff@29.7.0: dependencies: chalk: 4.1.2 @@ -6925,13 +6932,6 @@ snapshots: jest-get-type: 28.0.2 pretty-format: 28.1.3 - 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 @@ -8155,10 +8155,12 @@ snapshots: strip-json-comments@3.1.1: {} - strong-mock@8.0.1: + strong-mock@9.0.0: dependencies: - jest-matcher-utils: 29.3.1 + jest-diff: 29.4.3 + jest-matcher-utils: 29.7.0 lodash: 4.17.21 + strip-ansi: 6.0.1 stylelint-config-recommended@14.0.1(stylelint@16.9.0(typescript@4.9.5)): dependencies: