@trpc/server 11.0.0-rc.377 → 11.0.0-rc.382

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.
@@ -1,7 +1,7 @@
1
1
  {
2
- "bundleSize": 102854,
3
- "bundleOrigSize": 151746,
4
- "bundleReduction": 32.22,
2
+ "bundleSize": 102969,
3
+ "bundleOrigSize": 151874,
4
+ "bundleReduction": 32.2,
5
5
  "modules": [
6
6
  {
7
7
  "id": "/src/unstable-core-do-not-import/stream/stream.ts",
@@ -17,7 +17,7 @@
17
17
  "/src/unstable-core-do-not-import.ts",
18
18
  "/src/unstable-core-do-not-import/http/resolveResponse.ts"
19
19
  ],
20
- "percent": 14.06,
20
+ "percent": 14.04,
21
21
  "reduction": 9.37
22
22
  },
23
23
  {
@@ -32,7 +32,7 @@
32
32
  "dependents": [
33
33
  "/src/adapters/fastify/fastifyTRPCPlugin.ts"
34
34
  ],
35
- "percent": 10.93,
35
+ "percent": 10.92,
36
36
  "reduction": 0
37
37
  },
38
38
  {
@@ -46,7 +46,7 @@
46
46
  "dependents": [
47
47
  "/src/unstable-core-do-not-import.ts"
48
48
  ],
49
- "percent": 10.17,
49
+ "percent": 10.16,
50
50
  "reduction": 4.19
51
51
  },
52
52
  {
@@ -61,7 +61,7 @@
61
61
  "/src/unstable-core-do-not-import.ts",
62
62
  "/src/unstable-core-do-not-import/initTRPC.ts"
63
63
  ],
64
- "percent": 6.15,
64
+ "percent": 6.14,
65
65
  "reduction": 59.52
66
66
  },
67
67
  {
@@ -109,7 +109,7 @@
109
109
  "dependents": [
110
110
  "/src/adapters/aws-lambda/index.ts"
111
111
  ],
112
- "percent": 4.72,
112
+ "percent": 4.71,
113
113
  "reduction": 13.62
114
114
  },
115
115
  {
@@ -123,7 +123,7 @@
123
123
  "dependents": [
124
124
  "/src/adapters/next-app-dir.ts"
125
125
  ],
126
- "percent": 3.05,
126
+ "percent": 3.04,
127
127
  "reduction": 22.25
128
128
  },
129
129
  {
@@ -176,7 +176,7 @@
176
176
  "/src/unstable-core-do-not-import/router.ts",
177
177
  "/src/unstable-core-do-not-import/initTRPC.ts"
178
178
  ],
179
- "percent": 2.67,
179
+ "percent": 2.66,
180
180
  "reduction": 45.94
181
181
  },
182
182
  {
@@ -239,7 +239,7 @@
239
239
  "/src/adapters/node-http/index.ts",
240
240
  "/src/adapters/node-http/nodeHTTPRequestHandler.ts"
241
241
  ],
242
- "percent": 2.12,
242
+ "percent": 2.11,
243
243
  "reduction": 14.12
244
244
  },
245
245
  {
@@ -302,7 +302,7 @@
302
302
  ],
303
303
  "removedExports": [],
304
304
  "dependents": [],
305
- "percent": 1.54,
305
+ "percent": 1.53,
306
306
  "reduction": 21.04
307
307
  },
308
308
  {
@@ -361,25 +361,10 @@
361
361
  "percent": 1.23,
362
362
  "reduction": 23.5
363
363
  },
364
- {
365
- "id": "/src/adapters/fastify/fastifyRequestHandler.ts",
366
- "size": 1132,
367
- "origSize": 2160,
368
- "renderedExports": [
369
- "fastifyRequestHandler"
370
- ],
371
- "removedExports": [],
372
- "dependents": [
373
- "/src/adapters/fastify/index.ts",
374
- "/src/adapters/fastify/fastifyTRPCPlugin.ts"
375
- ],
376
- "percent": 1.1,
377
- "reduction": 47.59
378
- },
379
364
  {
380
365
  "id": "/src/unstable-core-do-not-import/utils.ts",
381
- "size": 1037,
382
- "origSize": 1453,
366
+ "size": 1152,
367
+ "origSize": 1581,
383
368
  "renderedExports": [
384
369
  "unsetMarker",
385
370
  "mergeWithoutOverrides",
@@ -401,8 +386,23 @@
401
386
  "/src/unstable-core-do-not-import/procedureBuilder.ts",
402
387
  "/src/unstable-core-do-not-import/stream/stream.ts"
403
388
  ],
404
- "percent": 1.01,
405
- "reduction": 28.63
389
+ "percent": 1.12,
390
+ "reduction": 27.13
391
+ },
392
+ {
393
+ "id": "/src/adapters/fastify/fastifyRequestHandler.ts",
394
+ "size": 1132,
395
+ "origSize": 2160,
396
+ "renderedExports": [
397
+ "fastifyRequestHandler"
398
+ ],
399
+ "removedExports": [],
400
+ "dependents": [
401
+ "/src/adapters/fastify/index.ts",
402
+ "/src/adapters/fastify/fastifyTRPCPlugin.ts"
403
+ ],
404
+ "percent": 1.1,
405
+ "reduction": 47.59
406
406
  },
407
407
  {
408
408
  "id": "/src/unstable-core-do-not-import/parser.ts",
@@ -447,7 +447,7 @@
447
447
  "dependents": [
448
448
  "/src/adapters/next-app-dir/nextAppDirCaller.ts"
449
449
  ],
450
- "percent": 0.8,
450
+ "percent": 0.79,
451
451
  "reduction": 0.97
452
452
  },
453
453
  {
@@ -653,9 +653,9 @@
653
653
  "reduction": 100
654
654
  },
655
655
  {
656
- "id": "/src/shared.ts",
656
+ "id": "/src/rpc.ts",
657
657
  "size": 0,
658
- "origSize": 653,
658
+ "origSize": 36,
659
659
  "renderedExports": [],
660
660
  "removedExports": [],
661
661
  "dependents": [],
@@ -663,9 +663,9 @@
663
663
  "reduction": 100
664
664
  },
665
665
  {
666
- "id": "/src/rpc.ts",
666
+ "id": "/src/shared.ts",
667
667
  "size": 0,
668
- "origSize": 36,
668
+ "origSize": 653,
669
669
  "renderedExports": [],
670
670
  "removedExports": [],
671
671
  "dependents": [],
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/unstable-core-do-not-import/utils.ts"],"names":[],"mappings":"AAAA,gBAAgB;AAChB,eAAO,MAAM,WAAW,eAAwB,CAAC;AACjD,MAAM,MAAM,WAAW,GAAG,OAAO,WAAW,CAAC;AAE7C;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACzE,IAAI,EAAE,KAAK,EACX,GAAG,IAAI,EAAE,OAAO,CAAC,KAAK,CAAC,EAAE,GACxB,KAAK,CAYP;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CA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,CAAC,EAChE,GAAG,EAAE,IAAI,GACR,IAAI,CAEN;AAKD,wBAAgB,eAAe,CAAC,MAAM,EACpC,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,aAAa,CAAC,MAAM,CAAC,CAIhC"}
@@ -31,8 +31,9 @@ function isFunction(fn) {
31
31
  */ function omitPrototype(obj) {
32
32
  return Object.assign(Object.create(null), obj);
33
33
  }
34
+ const asyncIteratorsSupported = typeof Symbol === 'function' && !!Symbol.asyncIterator;
34
35
  function isAsyncIterable(value) {
35
- return isObject(value) && Symbol.asyncIterator in value;
36
+ return asyncIteratorsSupported && isObject(value) && Symbol.asyncIterator in value;
36
37
  }
37
38
 
38
39
  exports.isAsyncIterable = isAsyncIterable;
@@ -29,8 +29,9 @@ function isFunction(fn) {
29
29
  */ function omitPrototype(obj) {
30
30
  return Object.assign(Object.create(null), obj);
31
31
  }
32
+ const asyncIteratorsSupported = typeof Symbol === 'function' && !!Symbol.asyncIterator;
32
33
  function isAsyncIterable(value) {
33
- return isObject(value) && Symbol.asyncIterator in value;
34
+ return asyncIteratorsSupported && isObject(value) && Symbol.asyncIterator in value;
34
35
  }
35
36
 
36
37
  export { isAsyncIterable, isFunction, isObject, mergeWithoutOverrides, omitPrototype, unsetMarker };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trpc/server",
3
- "version": "11.0.0-rc.377+4a672ddd6",
3
+ "version": "11.0.0-rc.382+94f198fec",
4
4
  "description": "The tRPC server library",
5
5
  "author": "KATT",
6
6
  "license": "MIT",
@@ -149,5 +149,5 @@
149
149
  "funding": [
150
150
  "https://trpc.io/sponsor"
151
151
  ],
152
- "gitHead": "4a672ddd64db2dafccecb0ef86a6443942afd917"
152
+ "gitHead": "94f198fece23e9328f7a30d1badf74de524b0ebb"
153
153
  }
@@ -46,8 +46,13 @@ export function omitPrototype<TObj extends Record<string, unknown>>(
46
46
  return Object.assign(Object.create(null), obj);
47
47
  }
48
48
 
49
+ const asyncIteratorsSupported =
50
+ typeof Symbol === 'function' && !!Symbol.asyncIterator;
51
+
49
52
  export function isAsyncIterable<TValue>(
50
53
  value: unknown,
51
54
  ): value is AsyncIterable<TValue> {
52
- return isObject(value) && Symbol.asyncIterator in value;
55
+ return (
56
+ asyncIteratorsSupported && isObject(value) && Symbol.asyncIterator in value
57
+ );
53
58
  }