@orpc/shared 1.4.5 → 1.5.1

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/dist/index.d.mts CHANGED
@@ -160,7 +160,9 @@ declare class AsyncIteratorClass<T, TReturn = unknown, TNext = unknown> implemen
160
160
  declare function replicateAsyncIterator<T, TReturn, TNext>(source: AsyncIterator<T, TReturn, TNext>, count: number): (AsyncIteratorClass<T, TReturn, TNext>)[];
161
161
 
162
162
  declare function parseEmptyableJSON(text: string | null | undefined): unknown;
163
- declare function stringifyJSON<T>(value: T): undefined extends T ? undefined | string : string;
163
+ declare function stringifyJSON<T>(value: T | {
164
+ toJSON(): T;
165
+ }): undefined extends T ? undefined | string : string;
164
166
 
165
167
  type Segment = string | number;
166
168
  declare function findDeepMatches(check: (value: unknown) => boolean, payload: unknown, segments?: Segment[], maps?: Segment[][], values?: unknown[]): {
package/dist/index.d.ts CHANGED
@@ -160,7 +160,9 @@ declare class AsyncIteratorClass<T, TReturn = unknown, TNext = unknown> implemen
160
160
  declare function replicateAsyncIterator<T, TReturn, TNext>(source: AsyncIterator<T, TReturn, TNext>, count: number): (AsyncIteratorClass<T, TReturn, TNext>)[];
161
161
 
162
162
  declare function parseEmptyableJSON(text: string | null | undefined): unknown;
163
- declare function stringifyJSON<T>(value: T): undefined extends T ? undefined | string : string;
163
+ declare function stringifyJSON<T>(value: T | {
164
+ toJSON(): T;
165
+ }): undefined extends T ? undefined | string : string;
164
166
 
165
167
  type Segment = string | number;
166
168
  declare function findDeepMatches(check: (value: unknown) => boolean, payload: unknown, segments?: Segment[], maps?: Segment[][], values?: unknown[]): {
package/dist/index.mjs CHANGED
@@ -270,6 +270,7 @@ class EventPublisher {
270
270
  }
271
271
  const signal = listenerOrOptions?.signal;
272
272
  const maxBufferedEvents = listenerOrOptions?.maxBufferedEvents ?? this.#maxBufferedEvents;
273
+ signal?.throwIfAborted();
273
274
  const bufferedEvents = [];
274
275
  const pullResolvers = [];
275
276
  const unsubscribe = this.subscribe(event, (payload) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orpc/shared",
3
3
  "type": "module",
4
- "version": "1.4.5",
4
+ "version": "1.5.1",
5
5
  "license": "MIT",
6
6
  "homepage": "https://orpc.unnoq.com",
7
7
  "repository": {
@@ -30,7 +30,7 @@
30
30
  "devDependencies": {
31
31
  "arktype": "2.1.20",
32
32
  "valibot": "^1.1.0",
33
- "zod": "^3.25.49"
33
+ "zod": "^3.25.63"
34
34
  },
35
35
  "scripts": {
36
36
  "build": "unbuild",