@orpc/shared 1.8.7 → 1.8.9

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
@@ -30,7 +30,7 @@ type OmitChainMethodDeep<T extends object, K extends keyof any> = {
30
30
 
31
31
  declare const ORPC_NAME = "orpc";
32
32
  declare const ORPC_SHARED_PACKAGE_NAME = "@orpc/shared";
33
- declare const ORPC_SHARED_PACKAGE_VERSION = "1.8.7";
33
+ declare const ORPC_SHARED_PACKAGE_VERSION = "1.8.9";
34
34
 
35
35
  /**
36
36
  * Error thrown when an operation is aborted.
package/dist/index.d.ts CHANGED
@@ -30,7 +30,7 @@ type OmitChainMethodDeep<T extends object, K extends keyof any> = {
30
30
 
31
31
  declare const ORPC_NAME = "orpc";
32
32
  declare const ORPC_SHARED_PACKAGE_NAME = "@orpc/shared";
33
- declare const ORPC_SHARED_PACKAGE_VERSION = "1.8.7";
33
+ declare const ORPC_SHARED_PACKAGE_VERSION = "1.8.9";
34
34
 
35
35
  /**
36
36
  * Error thrown when an operation is aborted.
package/dist/index.mjs CHANGED
@@ -21,7 +21,7 @@ function readAsBuffer(source) {
21
21
 
22
22
  const ORPC_NAME = "orpc";
23
23
  const ORPC_SHARED_PACKAGE_NAME = "@orpc/shared";
24
- const ORPC_SHARED_PACKAGE_VERSION = "1.8.7";
24
+ const ORPC_SHARED_PACKAGE_VERSION = "1.8.9";
25
25
 
26
26
  class AbortError extends Error {
27
27
  constructor(...rest) {
@@ -210,18 +210,16 @@ class AsyncIdQueue {
210
210
  close({ id, reason } = {}) {
211
211
  if (id === void 0) {
212
212
  this.waiters.forEach((pendingPulls, id2) => {
213
- pendingPulls.forEach(([, reject]) => {
214
- reject(reason ?? new Error(`[AsyncIdQueue] Queue[${id2}] was closed or aborted while waiting for pulling.`));
215
- });
213
+ const error2 = reason ?? new AbortError(`[AsyncIdQueue] Queue[${id2}] was closed or aborted while waiting for pulling.`);
214
+ pendingPulls.forEach(([, reject]) => reject(error2));
216
215
  });
217
216
  this.waiters.clear();
218
217
  this.openIds.clear();
219
218
  this.queues.clear();
220
219
  return;
221
220
  }
222
- this.waiters.get(id)?.forEach(([, reject]) => {
223
- reject(reason ?? new Error(`[AsyncIdQueue] Queue[${id}] was closed or aborted while waiting for pulling.`));
224
- });
221
+ const error = reason ?? new AbortError(`[AsyncIdQueue] Queue[${id}] was closed or aborted while waiting for pulling.`);
222
+ this.waiters.get(id)?.forEach(([, reject]) => reject(error));
225
223
  this.waiters.delete(id);
226
224
  this.openIds.delete(id);
227
225
  this.queues.delete(id);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orpc/shared",
3
3
  "type": "module",
4
- "version": "1.8.7",
4
+ "version": "1.8.9",
5
5
  "license": "MIT",
6
6
  "homepage": "https://orpc.unnoq.com",
7
7
  "repository": {