Commit 55dd8a8
authored
Update dependency strong-mock to v9
| datasource | package | from | to |
| ---------- | ----------- | ----- | ----- |
| npm | strong-mock | 8.0.1 | 9.1.0 |
## [v9.1.0](https://github.com/NiGhTTraX/strong-mock/blob/HEAD/CHANGELOG.md#910-2026-01-13)
> \[!IMPORTANT]\
> The next major version (v10) will be ESM-only. Since Node 20.19 supports `require(esm)` by default (see [Node 20.19.0 release post](https://nodejs.org/en/blog/release/v20.19.0/#requireesm-is-now-enabled-by-default)), no changes should be required for CJS projects using Node 20.19 or higher.
##### Features
- Publish ESM build, alongside CJS ([f1ece16](NiGhTTraX/strong-mock@f1ece16))
- This is in preparation for v10, which will be ESM-only. ESM projects should use the ESM build automatically, while CJS projects will continue to use the CJS build.
- Support nesting matchers in `deepEquals` (the default matcher) ([7c243d2](NiGhTTraX/strong-mock@7c243d2))
- Example: `when(() => mockedFn({ foo: It.isNumber() }))`
##### Bug Fixes
- Fix diff integration with IDEs for vitest ([f881346](NiGhTTraX/strong-mock@f881346))
##### [9.0.1](NiGhTTraX/strong-mock@v9.0.0...v9.0.1) (2024-11-23)
##### Bug Fixes
- **deps:** update dependency jest-diff to \~29.7.0 ([50a3aa8](NiGhTTraX/strong-mock@50a3aa8))
- Pretty print nested matchers in `isArray` ([24f9deb](NiGhTTraX/strong-mock@24f9deb))
## [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 |
| ------------------------------ | ---------------------------- |
|  |  |
##### ⚠ 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](NiGhTTraX/strong-mock@7a04a43))
- Improve `isArray` diff ([a5aaddd](NiGhTTraX/strong-mock@a5aaddd))
- Improve `isNumber` diff ([55647ed](NiGhTTraX/strong-mock@55647ed))
- Improve `isObject` diff ([5533bcf](NiGhTTraX/strong-mock@5533bcf))
- Improve `isString` diff ([5c73fbb](NiGhTTraX/strong-mock@5c73fbb))
- Improve `willCapture` diff ([7d92ce9](NiGhTTraX/strong-mock@7d92ce9))
- Improve colors in UnexpectedCall error message ([f326954](NiGhTTraX/strong-mock@f326954))
- Pretty print argument diffs in UnexpectedCall error messages ([ba4f6b5](NiGhTTraX/strong-mock@ba4f6b5))
##### Bug Fixes
- Fix `isPartial` allowing unexpected keys ([cc0b881](NiGhTTraX/strong-mock@cc0b881))
- Fix `isPartial` not working with interfaces ([169b336](NiGhTTraX/strong-mock@169b336))
- `isObject` now correctly fails for `null` and `undefined` ([9b50fe4](NiGhTTraX/strong-mock@9b50fe4))
- Fix `It` docstrings ([df7f91a](NiGhTTraX/strong-mock@df7f91a))
- Handle non string keys in `isObject` ([87cb768](NiGhTTraX/strong-mock@87cb768))1 parent 017e2d3 commit 55dd8a8
2 files changed
+8
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments