@zimic/fetch 0.1.0-canary.2 → 0.1.0-canary.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -7
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -44,8 +44,8 @@ Zimic provides a flexible and type-safe way to mock HTTP requests.
|
|
|
44
44
|
- :zap: **Statically-typed mocks**: Declare the
|
|
45
45
|
[schema](https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http‐schemas) of your HTTP endpoints and create
|
|
46
46
|
fully typed mocks. If you have an [OpenAPI v3](https://swagger.io/specification) schema, use
|
|
47
|
-
[`zimic typegen`](https://github.com/zimicjs/zimic/wiki/cli‐zimic‐typegen) to automatically generate types and
|
|
48
|
-
your mocks in sync with your API.
|
|
47
|
+
[`zimic-http typegen`](https://github.com/zimicjs/zimic/wiki/cli‐zimic‐typegen) to automatically generate types and
|
|
48
|
+
keep your mocks in sync with your API.
|
|
49
49
|
- :link: **Network-level intercepts**: Internally, Zimic combines [MSW](https://github.com/mswjs/msw) and
|
|
50
50
|
[interceptor servers](https://github.com/zimicjs/zimic/wiki/cli‐zimic‐server) to act on real HTTP requests. From you
|
|
51
51
|
application's point of view, the mocked responses are indistinguishable from the real ones.
|
|
@@ -56,7 +56,7 @@ Zimic provides a flexible and type-safe way to mock HTTP requests.
|
|
|
56
56
|
|
|
57
57
|
```ts
|
|
58
58
|
import { type HttpSchema } from '@zimic/http';
|
|
59
|
-
import { httpInterceptor } from 'zimic/interceptor/http';
|
|
59
|
+
import { httpInterceptor } from '@zimic/interceptor/http';
|
|
60
60
|
|
|
61
61
|
// 1. Declare your types:
|
|
62
62
|
interface User {
|
|
@@ -212,10 +212,6 @@ test('example', async () => {
|
|
|
212
212
|
> - Breaking changes, if any, will be delivered in the next **_minor_** version.
|
|
213
213
|
> - Breaking changes, if any, will be documented in the [version release](https://github.com/zimicjs/zimic/releases),
|
|
214
214
|
> along with a migration guide detailing the introduced changes and suggesting steps to migrate.
|
|
215
|
-
>
|
|
216
|
-
> From v0.8 onwards, we expect Zimic's public API to become more stable. If you'd like to share any feedback, please
|
|
217
|
-
> feel free to [open an issue](https://github.com/zimicjs/zimic/issues) or
|
|
218
|
-
> [create a discussion](https://github.com/zimicjs/zimic/discussions/new/choose)!
|
|
219
215
|
|
|
220
216
|
## Examples
|
|
221
217
|
|
package/package.json
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"api",
|
|
14
14
|
"static"
|
|
15
15
|
],
|
|
16
|
-
"version": "0.1.0-canary.
|
|
16
|
+
"version": "0.1.0-canary.4",
|
|
17
17
|
"repository": {
|
|
18
18
|
"type": "git",
|
|
19
19
|
"url": "https://github.com/zimicjs/zimic.git",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"types": "index.d.ts",
|
|
49
49
|
"exports": {
|
|
50
50
|
".": {
|
|
51
|
-
"types": "./
|
|
51
|
+
"types": "./index.d.ts",
|
|
52
52
|
"import": "./dist/index.mjs",
|
|
53
53
|
"require": "./dist/index.js",
|
|
54
54
|
"default": "./dist/index.js"
|
|
@@ -66,12 +66,12 @@
|
|
|
66
66
|
"typescript": "^5.7.3",
|
|
67
67
|
"vitest": "^3.0.6",
|
|
68
68
|
"@zimic/eslint-config-node": "0.0.0",
|
|
69
|
-
"@zimic/
|
|
70
|
-
"zimic": "0.
|
|
71
|
-
"@zimic/
|
|
69
|
+
"@zimic/interceptor": "0.14.0-canary.13",
|
|
70
|
+
"@zimic/lint-staged-config": "0.0.0",
|
|
71
|
+
"@zimic/tsconfig": "0.0.0"
|
|
72
72
|
},
|
|
73
73
|
"peerDependencies": {
|
|
74
|
-
"@zimic/http": "
|
|
74
|
+
"@zimic/http": "^0.1.0 || ^0.1.0-canary.0",
|
|
75
75
|
"typescript": ">=4.8.0"
|
|
76
76
|
},
|
|
77
77
|
"scripts": {
|