@orpc/client 2.0.0-beta.29 → 2.0.0-beta.30

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 CHANGED
@@ -54,6 +54,7 @@ You can read the documentation [here](https://orpc.dev).
54
54
  - [@orpc/tanstack-query](https://npmx.dev/package/@orpc/tanstack-query): Integrate with [TanStack Query](https://tanstack.com/query/latest).
55
55
  - [@orpc/pinia-colada](https://npmx.dev/package/@orpc/pinia-colada): Integrate with [Pinia Colada](https://pinia-colada.esm.dev/).
56
56
  - [@orpc/swr](https://npmx.dev/package/@orpc/swr): Integrate with [SWR](https://swr.vercel.app/).
57
+ - [@orpc/experimental-msw](https://npmx.dev/package/@orpc/experimental-msw): Mock procedures with [Mock Service Worker](https://mswjs.io/).
57
58
  - [@orpc/experimental-effect](https://npmx.dev/package/@orpc/experimental-effect): Integrate with [Effect](https://effect.website/).
58
59
  - [@orpc/nest](https://npmx.dev/package/@orpc/nest): Implement your contract with [NestJS](https://nestjs.com/).
59
60
  - [@orpc/node](https://npmx.dev/package/@orpc/node): [Node.js](https://nodejs.org/) plugins for static file serving and large uploads.
@@ -69,7 +70,7 @@ You can read the documentation [here](https://orpc.dev).
69
70
 
70
71
  ## Sponsors
71
72
 
72
- Like what we build over at [middleapi](https://github.com/middleapi)? You can help keep it going here: [GitHub Sponsors](https://github.com/sponsors/dinwwwh). Every bit helps! 🚀
73
+ Like what we build over at [middleapi](https://github.com/middleapi)? You can help keep it going through [GitHub Sponsors](https://github.com/sponsors/dinwwwh) or [Open Collective](https://opencollective.com/middleapi). Every bit helps! 🚀
73
74
 
74
75
  <table>
75
76
  <tr>
@@ -27,7 +27,7 @@ interface FetchLinkTransportOptions<T extends ClientContext> {
27
27
  /**
28
28
  * Override the default fetch implementation.
29
29
  *
30
- * @default globalThis.fetch.bind(globalThis)
30
+ * @default (url, init) => globalThis.fetch(url, init)
31
31
  */
32
32
  fetch?(url: string, init: RequestInit, options: ClientOptions<T>, path: string[]): Promise<Response>;
33
33
  /**
@@ -27,7 +27,7 @@ interface FetchLinkTransportOptions<T extends ClientContext> {
27
27
  /**
28
28
  * Override the default fetch implementation.
29
29
  *
30
- * @default globalThis.fetch.bind(globalThis)
30
+ * @default (url, init) => globalThis.fetch(url, init)
31
31
  */
32
32
  fetch?(url: string, init: RequestInit, options: ClientOptions<T>, path: string[]): Promise<Response>;
33
33
  /**
@@ -48,7 +48,7 @@ class FetchLinkTransport {
48
48
  constructor(options) {
49
49
  options = new CompositeFetchLinkTransportPlugin(options.plugins).initFetchLinkTransportOptions(options);
50
50
  this.origin = options.origin;
51
- this.fetch = options.fetch ?? globalThis.fetch.bind(globalThis);
51
+ this.fetch = options.fetch ?? ((url, init) => globalThis.fetch(url, init));
52
52
  this.toFetchRequestOptions = options.toFetchRequest;
53
53
  this.fetchInterceptors = options.fetchInterceptors;
54
54
  }
package/package.json CHANGED
@@ -1,9 +1,13 @@
1
1
  {
2
2
  "name": "@orpc/client",
3
3
  "type": "module",
4
- "version": "2.0.0-beta.29",
4
+ "version": "2.0.0-beta.30",
5
+ "description": "Consume oRPC and OpenAPI APIs with end-to-end type safety over HTTP, WebSocket, or message ports",
5
6
  "license": "MIT",
6
- "funding": "https://github.com/sponsors/dinwwwh",
7
+ "funding": [
8
+ "https://github.com/sponsors/dinwwwh",
9
+ "https://opencollective.com/middleapi"
10
+ ],
7
11
  "homepage": "https://orpc.dev",
8
12
  "repository": {
9
13
  "type": "git",
@@ -11,7 +15,15 @@
11
15
  "directory": "packages/client"
12
16
  },
13
17
  "keywords": [
14
- "orpc"
18
+ "orpc",
19
+ "rpc",
20
+ "api",
21
+ "typescript",
22
+ "typesafe",
23
+ "client",
24
+ "fetch",
25
+ "websocket",
26
+ "openapi"
15
27
  ],
16
28
  "sideEffects": false,
17
29
  "exports": {
@@ -54,7 +66,7 @@
54
66
  "@standardserver/core": "^0.8.0",
55
67
  "@standardserver/fetch": "^0.8.0",
56
68
  "@standardserver/peer": "^0.8.0",
57
- "@orpc/shared": "2.0.0-beta.29"
69
+ "@orpc/shared": "2.0.0-beta.30"
58
70
  },
59
71
  "devDependencies": {
60
72
  "zod": "^4.4.3"