@depthbomb/common 1.0.0 → 1.1.0

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/queue.cjs CHANGED
@@ -1 +1 @@
1
- const e=require(`./queue-QKkKGMY-.cjs`);exports.Queue=e.t;
1
+ function e(t){"@babel/helpers - typeof";return e=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},e(t)}function t(t,n){if(e(t)!=`object`||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,n||`default`);if(e(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(t)}function n(n){var r=t(n,`string`);return e(r)==`symbol`?r:r+``}function r(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}let i;i=Symbol.iterator;var a=class{constructor(e){r(this,`items`,[]),e&&(this.items=[...e])}get size(){return this.items.length}get isEmpty(){return this.items.length===0}enqueue(e){this.items.push(e)}dequeue(){return this.items.shift()}peek(){return this.items[0]}clear(){this.items=[]}[i](){return this.items[Symbol.iterator]()}toArray(){return[...this.items]}};exports.Queue=a;
package/dist/queue.d.cts CHANGED
@@ -3,46 +3,46 @@ declare class Queue<T> {
3
3
  private items;
4
4
  constructor(initial?: Iterable<T>);
5
5
  /**
6
- * Get the number of items in the queue.
7
- */
6
+ * Get the number of items in the queue.
7
+ */
8
8
  get size(): number;
9
9
  /**
10
- * Check if the queue is empty.
11
- */
10
+ * Check if the queue is empty.
11
+ */
12
12
  get isEmpty(): boolean;
13
13
  /**
14
- * Add an item to the end of the queue.
15
- *
16
- * @param item Item to add to the end of the queue
17
- */
14
+ * Add an item to the end of the queue.
15
+ *
16
+ * @param item Item to add to the end of the queue
17
+ */
18
18
  enqueue(item: T): void;
19
19
  /**
20
- * Remove and return the item at the front of the queue.
21
- *
22
- * @returns The item at the front of the queue, or undefined if the queue is empty
23
- */
20
+ * Remove and return the item at the front of the queue.
21
+ *
22
+ * @returns The item at the front of the queue, or undefined if the queue is empty
23
+ */
24
24
  dequeue(): T | undefined;
25
25
  /**
26
- * Return the item at the front of the queue without removing it.
27
- *
28
- * @returns The item at the front of the queue without removing it, or undefined if the queue is empty
29
- */
26
+ * Return the item at the front of the queue without removing it.
27
+ *
28
+ * @returns The item at the front of the queue without removing it, or undefined if the queue is empty
29
+ */
30
30
  peek(): T | undefined;
31
31
  /**
32
- * Clear all items from the queue.
33
- */
32
+ * Clear all items from the queue.
33
+ */
34
34
  clear(): void;
35
35
  /**
36
- * Get an iterator for the items in the queue.
37
- *
38
- * @returns An iterator for the items in the queue
39
- */
36
+ * Get an iterator for the items in the queue.
37
+ *
38
+ * @returns An iterator for the items in the queue
39
+ */
40
40
  [Symbol.iterator](): Iterator<T>;
41
41
  /**
42
- * Convert the queue to an array.
43
- *
44
- * @returns An array containing all items in the queue in order
45
- */
42
+ * Convert the queue to an array.
43
+ *
44
+ * @returns An array containing all items in the queue in order
45
+ */
46
46
  toArray(): T[];
47
47
  }
48
48
  //#endregion
package/dist/queue.d.mts CHANGED
@@ -3,46 +3,46 @@ declare class Queue<T> {
3
3
  private items;
4
4
  constructor(initial?: Iterable<T>);
5
5
  /**
6
- * Get the number of items in the queue.
7
- */
6
+ * Get the number of items in the queue.
7
+ */
8
8
  get size(): number;
9
9
  /**
10
- * Check if the queue is empty.
11
- */
10
+ * Check if the queue is empty.
11
+ */
12
12
  get isEmpty(): boolean;
13
13
  /**
14
- * Add an item to the end of the queue.
15
- *
16
- * @param item Item to add to the end of the queue
17
- */
14
+ * Add an item to the end of the queue.
15
+ *
16
+ * @param item Item to add to the end of the queue
17
+ */
18
18
  enqueue(item: T): void;
19
19
  /**
20
- * Remove and return the item at the front of the queue.
21
- *
22
- * @returns The item at the front of the queue, or undefined if the queue is empty
23
- */
20
+ * Remove and return the item at the front of the queue.
21
+ *
22
+ * @returns The item at the front of the queue, or undefined if the queue is empty
23
+ */
24
24
  dequeue(): T | undefined;
25
25
  /**
26
- * Return the item at the front of the queue without removing it.
27
- *
28
- * @returns The item at the front of the queue without removing it, or undefined if the queue is empty
29
- */
26
+ * Return the item at the front of the queue without removing it.
27
+ *
28
+ * @returns The item at the front of the queue without removing it, or undefined if the queue is empty
29
+ */
30
30
  peek(): T | undefined;
31
31
  /**
32
- * Clear all items from the queue.
33
- */
32
+ * Clear all items from the queue.
33
+ */
34
34
  clear(): void;
35
35
  /**
36
- * Get an iterator for the items in the queue.
37
- *
38
- * @returns An iterator for the items in the queue
39
- */
36
+ * Get an iterator for the items in the queue.
37
+ *
38
+ * @returns An iterator for the items in the queue
39
+ */
40
40
  [Symbol.iterator](): Iterator<T>;
41
41
  /**
42
- * Convert the queue to an array.
43
- *
44
- * @returns An array containing all items in the queue in order
45
- */
42
+ * Convert the queue to an array.
43
+ *
44
+ * @returns An array containing all items in the queue in order
45
+ */
46
46
  toArray(): T[];
47
47
  }
48
48
  //#endregion
package/dist/queue.mjs CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./queue-CX1hK7A0.mjs";export{e as Queue};
1
+ function e(t){"@babel/helpers - typeof";return e=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},e(t)}function t(t,n){if(e(t)!=`object`||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,n||`default`);if(e(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(t)}function n(n){var r=t(n,`string`);return e(r)==`symbol`?r:r+``}function r(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}let i;i=Symbol.iterator;var a=class{constructor(e){r(this,`items`,[]),e&&(this.items=[...e])}get size(){return this.items.length}get isEmpty(){return this.items.length===0}enqueue(e){this.items.push(e)}dequeue(){return this.items.shift()}peek(){return this.items[0]}clear(){this.items=[]}[i](){return this.items[Symbol.iterator]()}toArray(){return[...this.items]}};export{a as Queue};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@depthbomb/common",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "A set of common utilities for TypeScript/JavaScript",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -11,10 +11,6 @@
11
11
  "utilities"
12
12
  ],
13
13
  "exports": {
14
- ".": {
15
- "require": "./dist/index.cjs",
16
- "import": "./dist/index.mjs"
17
- },
18
14
  "./async": {
19
15
  "require": "./dist/async.cjs",
20
16
  "import": "./dist/async.mjs"
@@ -65,12 +61,12 @@
65
61
  },
66
62
  "devDependencies": {
67
63
  "@types/eslint": "^9.6.1",
68
- "@types/node": "^22.19.7",
69
- "@typescript-eslint/eslint-plugin": "^8.53.0",
70
- "@typescript-eslint/parser": "^8.53.0",
64
+ "@types/node": "^24.10.9",
65
+ "@typescript-eslint/eslint-plugin": "^8.54.0",
66
+ "@typescript-eslint/parser": "^8.54.0",
71
67
  "eslint": "^9.39.2",
72
- "release-it": "^19.2.3",
73
- "tsdown": "^0.20.0-beta.3",
68
+ "release-it": "^19.2.4",
69
+ "tsdown": "^0.20.1",
74
70
  "typescript": "^5.9.3"
75
71
  },
76
72
  "packageManager": "yarn@4.12.0"
package/dist/index.cjs DELETED
@@ -1 +0,0 @@
1
- const e=require(`./async.cjs`),t=require(`./decorators.cjs`),n=require(`./fn.cjs`),r=require(`./lazy.cjs`),i=require(`./queue-QKkKGMY-.cjs`),a=require(`./types.cjs`);exports.Queue=i.t,exports.allSettledSuccessful=e.allSettledSuccessful,exports.assume=a.assume,exports.cache=t.cache,exports.cast=a.cast,exports.lazy=r.lazy,exports.lazyAsync=r.lazyAsync,exports.once=n.once,exports.pollUntil=e.pollUntil,exports.rejectionTimeout=e.rejectionTimeout,exports.resettableLazy=r.resettableLazy,exports.sequential=e.sequential,exports.timeout=e.timeout,exports.typedEntries=a.typedEntries,exports.withTimeout=e.withTimeout;
package/dist/index.d.cts DELETED
@@ -1,7 +0,0 @@
1
- import { allSettledSuccessful, pollUntil, rejectionTimeout, sequential, timeout, withTimeout } from "./async.cjs";
2
- import { cache } from "./decorators.cjs";
3
- import { once } from "./fn.cjs";
4
- import { lazy, lazyAsync, resettableLazy } from "./lazy.cjs";
5
- import { Queue } from "./queue.cjs";
6
- import { Awaitable, Maybe, Nullable, assume, cast, typedEntries } from "./types.cjs";
7
- export { Awaitable, Maybe, Nullable, Queue, allSettledSuccessful, assume, cache, cast, lazy, lazyAsync, once, pollUntil, rejectionTimeout, resettableLazy, sequential, timeout, typedEntries, withTimeout };
package/dist/index.d.mts DELETED
@@ -1,7 +0,0 @@
1
- import { allSettledSuccessful, pollUntil, rejectionTimeout, sequential, timeout, withTimeout } from "./async.mjs";
2
- import { cache } from "./decorators.mjs";
3
- import { once } from "./fn.mjs";
4
- import { lazy, lazyAsync, resettableLazy } from "./lazy.mjs";
5
- import { Queue } from "./queue.mjs";
6
- import { Awaitable, Maybe, Nullable, assume, cast, typedEntries } from "./types.mjs";
7
- export { Awaitable, Maybe, Nullable, Queue, allSettledSuccessful, assume, cache, cast, lazy, lazyAsync, once, pollUntil, rejectionTimeout, resettableLazy, sequential, timeout, typedEntries, withTimeout };
package/dist/index.mjs DELETED
@@ -1 +0,0 @@
1
- import{allSettledSuccessful as e,pollUntil as t,rejectionTimeout as n,sequential as r,timeout as i,withTimeout as a}from"./async.mjs";import{cache as o}from"./decorators.mjs";import{once as s}from"./fn.mjs";import{lazy as c,lazyAsync as l,resettableLazy as u}from"./lazy.mjs";import{t as d}from"./queue-CX1hK7A0.mjs";import{assume as f,cast as p,typedEntries as m}from"./types.mjs";export{d as Queue,e as allSettledSuccessful,f as assume,o as cache,p as cast,c as lazy,l as lazyAsync,s as once,t as pollUntil,n as rejectionTimeout,u as resettableLazy,r as sequential,i as timeout,m as typedEntries,a as withTimeout};
@@ -1 +0,0 @@
1
- function e(t){"@babel/helpers - typeof";return e=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},e(t)}function t(t,n){if(e(t)!=`object`||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,n||`default`);if(e(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(t)}function n(n){var r=t(n,`string`);return e(r)==`symbol`?r:r+``}function r(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}let i;i=Symbol.iterator;var a=class{constructor(e){r(this,`items`,[]),e&&(this.items=[...e])}get size(){return this.items.length}get isEmpty(){return this.items.length===0}enqueue(e){this.items.push(e)}dequeue(){return this.items.shift()}peek(){return this.items[0]}clear(){this.items=[]}[i](){return this.items[Symbol.iterator]()}toArray(){return[...this.items]}};export{a as t};
@@ -1 +0,0 @@
1
- function e(t){"@babel/helpers - typeof";return e=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},e(t)}function t(t,n){if(e(t)!=`object`||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,n||`default`);if(e(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(t)}function n(n){var r=t(n,`string`);return e(r)==`symbol`?r:r+``}function r(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}let i;i=Symbol.iterator;var a=class{constructor(e){r(this,`items`,[]),e&&(this.items=[...e])}get size(){return this.items.length}get isEmpty(){return this.items.length===0}enqueue(e){this.items.push(e)}dequeue(){return this.items.shift()}peek(){return this.items[0]}clear(){this.items=[]}[i](){return this.items[Symbol.iterator]()}toArray(){return[...this.items]}};Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return a}});