@webdeveric/utils 0.76.0 → 0.78.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.
Files changed (40) hide show
  1. package/dist/cjs/assertion/assertIsSafeInteger.js +10 -0
  2. package/dist/cjs/assertion/index.js +1 -0
  3. package/dist/cjs/getSortedObject.js +17 -0
  4. package/dist/cjs/index.js +3 -0
  5. package/dist/cjs/numbers.js +7 -0
  6. package/dist/cjs/predicate/factory/index.js +1 -0
  7. package/dist/cjs/predicate/index.js +2 -0
  8. package/dist/cjs/predicate/isAny.js +1 -1
  9. package/dist/cjs/predicate/isInt32.js +2 -3
  10. package/dist/cjs/predicate/isSafeInteger.js +5 -0
  11. package/dist/cjs/predicate/isUInt32.js +7 -0
  12. package/dist/cjs/predicate/isUnknown.js +1 -1
  13. package/dist/cjs/randomInt.js +15 -11
  14. package/dist/cjs/sort/byRandom.js +2 -1
  15. package/dist/mjs/assertion/assertIsSafeInteger.js +7 -0
  16. package/dist/mjs/assertion/index.js +1 -0
  17. package/dist/mjs/getSortedObject.js +14 -0
  18. package/dist/mjs/index.js +3 -0
  19. package/dist/mjs/numbers.js +4 -0
  20. package/dist/mjs/predicate/factory/index.js +1 -0
  21. package/dist/mjs/predicate/index.js +2 -0
  22. package/dist/mjs/predicate/isAny.js +1 -1
  23. package/dist/mjs/predicate/isInt32.js +1 -2
  24. package/dist/mjs/predicate/isSafeInteger.js +1 -0
  25. package/dist/mjs/predicate/isUInt32.js +4 -0
  26. package/dist/mjs/predicate/isUnknown.js +1 -1
  27. package/dist/mjs/randomInt.js +15 -11
  28. package/dist/mjs/sort/byRandom.js +2 -1
  29. package/dist/types/assertion/assertIsSafeInteger.d.ts +1 -0
  30. package/dist/types/assertion/index.d.ts +1 -0
  31. package/dist/types/getSortedObject.d.ts +3 -0
  32. package/dist/types/index.d.ts +3 -0
  33. package/dist/types/numbers.d.ts +4 -0
  34. package/dist/types/predicate/factory/index.d.ts +1 -0
  35. package/dist/types/predicate/index.d.ts +2 -0
  36. package/dist/types/predicate/isSafeInteger.d.ts +1 -0
  37. package/dist/types/predicate/isTimeoutError.d.ts +1 -1
  38. package/dist/types/predicate/isUInt32.d.ts +2 -0
  39. package/dist/types/types/numbers.d.ts +1 -0
  40. package/package.json +15 -15
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.assertIsSafeInteger = assertIsSafeInteger;
4
+ const isSafeInteger_js_1 = require("../predicate/isSafeInteger.js");
5
+ const getError_js_1 = require("./getError.js");
6
+ function assertIsSafeInteger(input, error = 'input is not a safe integer') {
7
+ if (!(0, isSafeInteger_js_1.isSafeInteger)(input)) {
8
+ throw (0, getError_js_1.getError)(error);
9
+ }
10
+ }
@@ -49,6 +49,7 @@ __exportStar(require("./assertIsPrimitive.js"), exports);
49
49
  __exportStar(require("./assertIsPromiseFulfilledResult.js"), exports);
50
50
  __exportStar(require("./assertIsPromiseRejectedResult.js"), exports);
51
51
  __exportStar(require("./assertIsPropertyKey.js"), exports);
52
+ __exportStar(require("./assertIsSafeInteger.js"), exports);
52
53
  __exportStar(require("./assertIsSizeAware.js"), exports);
53
54
  __exportStar(require("./assertIsString.js"), exports);
54
55
  __exportStar(require("./assertIsStringArray.js"), exports);
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getSortedObject = getSortedObject;
4
+ const isAnyObject_js_1 = require("./predicate/isAnyObject.js");
5
+ const defaultCompareFunction = (left, right) => typeof left === 'symbol' || typeof right === 'symbol' ? 0 : left.localeCompare(right);
6
+ function getSortedObject(data, compareFunction = defaultCompareFunction) {
7
+ if (Array.isArray(data)) {
8
+ return data.map((item) => getSortedObject(item, compareFunction));
9
+ }
10
+ const entries = Reflect.ownKeys(data)
11
+ .sort(compareFunction)
12
+ .map((key) => {
13
+ const value = data[key];
14
+ return [key, (0, isAnyObject_js_1.isAnyObject)(value) ? getSortedObject(value, compareFunction) : value];
15
+ });
16
+ return Object.fromEntries(entries);
17
+ }
package/dist/cjs/index.js CHANGED
@@ -48,6 +48,7 @@ __exportStar(require("./getOwnProperties.js"), exports);
48
48
  __exportStar(require("./getPackageName.js"), exports);
49
49
  __exportStar(require("./getPaths.js"), exports);
50
50
  __exportStar(require("./getRandomItem.js"), exports);
51
+ __exportStar(require("./getSortedObject.js"), exports);
51
52
  __exportStar(require("./getType.js"), exports);
52
53
  __exportStar(require("./has.js"), exports);
53
54
  __exportStar(require("./hasAdditionalProperties.js"), exports);
@@ -57,7 +58,9 @@ __exportStar(require("./iterateForever.js"), exports);
57
58
  __exportStar(require("./joinStrings.js"), exports);
58
59
  __exportStar(require("./jsonParse.js"), exports);
59
60
  __exportStar(require("./looksLikeURL.js"), exports);
61
+ __exportStar(require("./memo.js"), exports);
60
62
  __exportStar(require("./normalize.js"), exports);
63
+ __exportStar(require("./numbers.js"), exports);
61
64
  __exportStar(require("./parseNumber.js"), exports);
62
65
  __exportStar(require("./pathParts.js"), exports);
63
66
  __exportStar(require("./prefix.js"), exports);
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.uInt32Max = exports.uInt32Min = exports.int32Max = exports.int32Min = void 0;
4
+ exports.int32Min = -0x80000000;
5
+ exports.int32Max = 0x7fffffff;
6
+ exports.uInt32Min = 0;
7
+ exports.uInt32Max = 0xffffffff;
@@ -29,6 +29,7 @@ __exportStar(require("./nullish.js"), exports);
29
29
  __exportStar(require("./optional.js"), exports);
30
30
  __exportStar(require("./range.js"), exports);
31
31
  __exportStar(require("./shape.js"), exports);
32
+ __exportStar(require("./simple.js"), exports);
32
33
  __exportStar(require("./stringLength.js"), exports);
33
34
  __exportStar(require("./tuple.js"), exports);
34
35
  __exportStar(require("./typeOf.js"), exports);
@@ -68,6 +68,7 @@ __exportStar(require("./isPromiseFulfilledResult.js"), exports);
68
68
  __exportStar(require("./isPromiseLike.js"), exports);
69
69
  __exportStar(require("./isPromiseRejectedResult.js"), exports);
70
70
  __exportStar(require("./isPropertyKey.js"), exports);
71
+ __exportStar(require("./isSafeInteger.js"), exports);
71
72
  __exportStar(require("./isSizeAware.js"), exports);
72
73
  __exportStar(require("./isString.js"), exports);
73
74
  __exportStar(require("./isStringArray.js"), exports);
@@ -75,6 +76,7 @@ __exportStar(require("./isStringRecord.js"), exports);
75
76
  __exportStar(require("./isStringWithLength.js"), exports);
76
77
  __exportStar(require("./isSymbol.js"), exports);
77
78
  __exportStar(require("./isSymbolArray.js"), exports);
79
+ __exportStar(require("./isUInt32.js"), exports);
78
80
  __exportStar(require("./isUndefined.js"), exports);
79
81
  __exportStar(require("./isUndefinedArray.js"), exports);
80
82
  __exportStar(require("./isUnknown.js"), exports);
@@ -2,4 +2,4 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.isAny = void 0;
4
4
  const assume_js_1 = require("./assume.js");
5
- exports.isAny = (assume_js_1.assume);
5
+ exports.isAny = assume_js_1.assume;
@@ -1,8 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.isInt32 = isInt32;
4
+ const numbers_js_1 = require("../numbers.js");
4
5
  function isInt32(input) {
5
- const int32Min = -2_147_483_648;
6
- const int32Max = 2_147_483_647;
7
- return typeof input === 'number' && Number.isInteger(input) && input >= int32Min && input <= int32Max;
6
+ return typeof input === 'number' && Number.isInteger(input) && input >= numbers_js_1.int32Min && input <= numbers_js_1.int32Max;
8
7
  }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isSafeInteger = void 0;
4
+ const isSafeInteger = (input) => Number.isSafeInteger(input);
5
+ exports.isSafeInteger = isSafeInteger;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isUInt32 = isUInt32;
4
+ const numbers_js_1 = require("../numbers.js");
5
+ function isUInt32(input) {
6
+ return typeof input === 'number' && Number.isInteger(input) && input >= numbers_js_1.uInt32Min && input <= numbers_js_1.uInt32Max;
7
+ }
@@ -2,4 +2,4 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.isUnknown = void 0;
4
4
  const assume_js_1 = require("./assume.js");
5
- exports.isUnknown = (assume_js_1.assume);
5
+ exports.isUnknown = assume_js_1.assume;
@@ -1,19 +1,23 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.randomInt = randomInt;
4
- const assertIsInteger_js_1 = require("./assertion/assertIsInteger.js");
4
+ const assertIsSafeInteger_js_1 = require("./assertion/assertIsSafeInteger.js");
5
5
  const isObject_js_1 = require("./predicate/isObject.js");
6
6
  function randomInt(arg1, arg2) {
7
- const { min = Number.MIN_SAFE_INTEGER, max = Number.MAX_SAFE_INTEGER } = (0, isObject_js_1.isObject)(arg1)
8
- ? arg1
9
- : { min: arg1, max: arg2 };
10
- (0, assertIsInteger_js_1.assertIsInteger)(min, 'min must be an integer');
11
- (0, assertIsInteger_js_1.assertIsInteger)(max, 'max must be an integer');
12
- if (min === max) {
13
- return min;
14
- }
15
- if (min > max) {
7
+ const { min = 0, max = Number.MAX_SAFE_INTEGER } = (0, isObject_js_1.isObject)(arg1) ? arg1 : { min: arg1, max: arg2 };
8
+ (0, assertIsSafeInteger_js_1.assertIsSafeInteger)(min, 'min must be a safe integer');
9
+ (0, assertIsSafeInteger_js_1.assertIsSafeInteger)(max, 'max must be a safe integer');
10
+ if (min >= max) {
16
11
  throw new RangeError('min must be less than max');
17
12
  }
18
- return Math.floor(Math.random() * (max - min)) + min;
13
+ const minBigInt = BigInt(min);
14
+ const range = BigInt(max) - minBigInt;
15
+ const limit = (2n ** 64n / range) * range;
16
+ const data = new BigInt64Array(1);
17
+ let value;
18
+ do {
19
+ crypto.getRandomValues(data);
20
+ value = BigInt.asUintN(64, data[0]);
21
+ } while (value >= limit);
22
+ return Number(minBigInt + (value % range));
19
23
  }
@@ -3,8 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.byRandom = void 0;
4
4
  const byRandom = () => {
5
5
  let value;
6
+ const data = new Uint8Array(1);
6
7
  do {
7
- value = crypto.getRandomValues(new Uint8Array(1))[0];
8
+ value = crypto.getRandomValues(data)[0];
8
9
  } while (value >= 252);
9
10
  return (value % 3) - 1;
10
11
  };
@@ -0,0 +1,7 @@
1
+ import { isSafeInteger } from '../predicate/isSafeInteger.js';
2
+ import { getError } from './getError.js';
3
+ export function assertIsSafeInteger(input, error = 'input is not a safe integer') {
4
+ if (!isSafeInteger(input)) {
5
+ throw getError(error);
6
+ }
7
+ }
@@ -33,6 +33,7 @@ export * from './assertIsPrimitive.js';
33
33
  export * from './assertIsPromiseFulfilledResult.js';
34
34
  export * from './assertIsPromiseRejectedResult.js';
35
35
  export * from './assertIsPropertyKey.js';
36
+ export * from './assertIsSafeInteger.js';
36
37
  export * from './assertIsSizeAware.js';
37
38
  export * from './assertIsString.js';
38
39
  export * from './assertIsStringArray.js';
@@ -0,0 +1,14 @@
1
+ import { isAnyObject } from './predicate/isAnyObject.js';
2
+ const defaultCompareFunction = (left, right) => typeof left === 'symbol' || typeof right === 'symbol' ? 0 : left.localeCompare(right);
3
+ export function getSortedObject(data, compareFunction = defaultCompareFunction) {
4
+ if (Array.isArray(data)) {
5
+ return data.map((item) => getSortedObject(item, compareFunction));
6
+ }
7
+ const entries = Reflect.ownKeys(data)
8
+ .sort(compareFunction)
9
+ .map((key) => {
10
+ const value = data[key];
11
+ return [key, isAnyObject(value) ? getSortedObject(value, compareFunction) : value];
12
+ });
13
+ return Object.fromEntries(entries);
14
+ }
package/dist/mjs/index.js CHANGED
@@ -32,6 +32,7 @@ export * from './getOwnProperties.js';
32
32
  export * from './getPackageName.js';
33
33
  export * from './getPaths.js';
34
34
  export * from './getRandomItem.js';
35
+ export * from './getSortedObject.js';
35
36
  export * from './getType.js';
36
37
  export * from './has.js';
37
38
  export * from './hasAdditionalProperties.js';
@@ -41,7 +42,9 @@ export * from './iterateForever.js';
41
42
  export * from './joinStrings.js';
42
43
  export * from './jsonParse.js';
43
44
  export * from './looksLikeURL.js';
45
+ export * from './memo.js';
44
46
  export * from './normalize.js';
47
+ export * from './numbers.js';
45
48
  export * from './parseNumber.js';
46
49
  export * from './pathParts.js';
47
50
  export * from './prefix.js';
@@ -0,0 +1,4 @@
1
+ export const int32Min = -0x80000000;
2
+ export const int32Max = 0x7fffffff;
3
+ export const uInt32Min = 0;
4
+ export const uInt32Max = 0xffffffff;
@@ -13,6 +13,7 @@ export * from './nullish.js';
13
13
  export * from './optional.js';
14
14
  export * from './range.js';
15
15
  export * from './shape.js';
16
+ export * from './simple.js';
16
17
  export * from './stringLength.js';
17
18
  export * from './tuple.js';
18
19
  export * from './typeOf.js';
@@ -52,6 +52,7 @@ export * from './isPromiseFulfilledResult.js';
52
52
  export * from './isPromiseLike.js';
53
53
  export * from './isPromiseRejectedResult.js';
54
54
  export * from './isPropertyKey.js';
55
+ export * from './isSafeInteger.js';
55
56
  export * from './isSizeAware.js';
56
57
  export * from './isString.js';
57
58
  export * from './isStringArray.js';
@@ -59,6 +60,7 @@ export * from './isStringRecord.js';
59
60
  export * from './isStringWithLength.js';
60
61
  export * from './isSymbol.js';
61
62
  export * from './isSymbolArray.js';
63
+ export * from './isUInt32.js';
62
64
  export * from './isUndefined.js';
63
65
  export * from './isUndefinedArray.js';
64
66
  export * from './isUnknown.js';
@@ -1,2 +1,2 @@
1
1
  import { assume } from './assume.js';
2
- export const isAny = (assume);
2
+ export const isAny = assume;
@@ -1,5 +1,4 @@
1
+ import { int32Max, int32Min } from '../numbers.js';
1
2
  export function isInt32(input) {
2
- const int32Min = -2_147_483_648;
3
- const int32Max = 2_147_483_647;
4
3
  return typeof input === 'number' && Number.isInteger(input) && input >= int32Min && input <= int32Max;
5
4
  }
@@ -0,0 +1 @@
1
+ export const isSafeInteger = (input) => Number.isSafeInteger(input);
@@ -0,0 +1,4 @@
1
+ import { uInt32Max, uInt32Min } from '../numbers.js';
2
+ export function isUInt32(input) {
3
+ return typeof input === 'number' && Number.isInteger(input) && input >= uInt32Min && input <= uInt32Max;
4
+ }
@@ -1,2 +1,2 @@
1
1
  import { assume } from './assume.js';
2
- export const isUnknown = (assume);
2
+ export const isUnknown = assume;
@@ -1,16 +1,20 @@
1
- import { assertIsInteger } from './assertion/assertIsInteger.js';
1
+ import { assertIsSafeInteger } from './assertion/assertIsSafeInteger.js';
2
2
  import { isObject } from './predicate/isObject.js';
3
3
  export function randomInt(arg1, arg2) {
4
- const { min = Number.MIN_SAFE_INTEGER, max = Number.MAX_SAFE_INTEGER } = isObject(arg1)
5
- ? arg1
6
- : { min: arg1, max: arg2 };
7
- assertIsInteger(min, 'min must be an integer');
8
- assertIsInteger(max, 'max must be an integer');
9
- if (min === max) {
10
- return min;
11
- }
12
- if (min > max) {
4
+ const { min = 0, max = Number.MAX_SAFE_INTEGER } = isObject(arg1) ? arg1 : { min: arg1, max: arg2 };
5
+ assertIsSafeInteger(min, 'min must be a safe integer');
6
+ assertIsSafeInteger(max, 'max must be a safe integer');
7
+ if (min >= max) {
13
8
  throw new RangeError('min must be less than max');
14
9
  }
15
- return Math.floor(Math.random() * (max - min)) + min;
10
+ const minBigInt = BigInt(min);
11
+ const range = BigInt(max) - minBigInt;
12
+ const limit = (2n ** 64n / range) * range;
13
+ const data = new BigInt64Array(1);
14
+ let value;
15
+ do {
16
+ crypto.getRandomValues(data);
17
+ value = BigInt.asUintN(64, data[0]);
18
+ } while (value >= limit);
19
+ return Number(minBigInt + (value % range));
16
20
  }
@@ -1,7 +1,8 @@
1
1
  export const byRandom = () => {
2
2
  let value;
3
+ const data = new Uint8Array(1);
3
4
  do {
4
- value = crypto.getRandomValues(new Uint8Array(1))[0];
5
+ value = crypto.getRandomValues(data)[0];
5
6
  } while (value >= 252);
6
7
  return (value % 3) - 1;
7
8
  };
@@ -0,0 +1 @@
1
+ export declare function assertIsSafeInteger(input: unknown, error?: string | Error): asserts input is number;
@@ -33,6 +33,7 @@ export * from './assertIsPrimitive.js';
33
33
  export * from './assertIsPromiseFulfilledResult.js';
34
34
  export * from './assertIsPromiseRejectedResult.js';
35
35
  export * from './assertIsPropertyKey.js';
36
+ export * from './assertIsSafeInteger.js';
36
37
  export * from './assertIsSizeAware.js';
37
38
  export * from './assertIsString.js';
38
39
  export * from './assertIsStringArray.js';
@@ -0,0 +1,3 @@
1
+ import type { CompareFn } from './types/functions.js';
2
+ export declare function getSortedObject<Data extends object>(data: Data, compareFunction?: CompareFn<string | symbol>): Data;
3
+ export declare function getSortedObject<Data extends object>(data: Data[], compareFunction?: CompareFn<string | symbol>): Data[];
@@ -32,6 +32,7 @@ export * from './getOwnProperties.js';
32
32
  export * from './getPackageName.js';
33
33
  export * from './getPaths.js';
34
34
  export * from './getRandomItem.js';
35
+ export * from './getSortedObject.js';
35
36
  export * from './getType.js';
36
37
  export * from './has.js';
37
38
  export * from './hasAdditionalProperties.js';
@@ -41,7 +42,9 @@ export * from './iterateForever.js';
41
42
  export * from './joinStrings.js';
42
43
  export * from './jsonParse.js';
43
44
  export * from './looksLikeURL.js';
45
+ export * from './memo.js';
44
46
  export * from './normalize.js';
47
+ export * from './numbers.js';
45
48
  export * from './parseNumber.js';
46
49
  export * from './pathParts.js';
47
50
  export * from './prefix.js';
@@ -0,0 +1,4 @@
1
+ export declare const int32Min = -2147483648;
2
+ export declare const int32Max = 2147483647;
3
+ export declare const uInt32Min = 0;
4
+ export declare const uInt32Max = 4294967295;
@@ -13,6 +13,7 @@ export * from './nullish.js';
13
13
  export * from './optional.js';
14
14
  export * from './range.js';
15
15
  export * from './shape.js';
16
+ export * from './simple.js';
16
17
  export * from './stringLength.js';
17
18
  export * from './tuple.js';
18
19
  export * from './typeOf.js';
@@ -52,6 +52,7 @@ export * from './isPromiseFulfilledResult.js';
52
52
  export * from './isPromiseLike.js';
53
53
  export * from './isPromiseRejectedResult.js';
54
54
  export * from './isPropertyKey.js';
55
+ export * from './isSafeInteger.js';
55
56
  export * from './isSizeAware.js';
56
57
  export * from './isString.js';
57
58
  export * from './isStringArray.js';
@@ -59,6 +60,7 @@ export * from './isStringRecord.js';
59
60
  export * from './isStringWithLength.js';
60
61
  export * from './isSymbol.js';
61
62
  export * from './isSymbolArray.js';
63
+ export * from './isUInt32.js';
62
64
  export * from './isUndefined.js';
63
65
  export * from './isUndefinedArray.js';
64
66
  export * from './isUnknown.js';
@@ -0,0 +1 @@
1
+ export declare const isSafeInteger: (input: unknown) => input is number;
@@ -1,5 +1,5 @@
1
1
  export declare const isTimeoutError: import("../index.js").TypePredicateFn<{
2
- stack?: string | undefined;
2
+ stack?: string;
3
3
  readonly code: number;
4
4
  readonly message: string;
5
5
  name: "TimeoutError";
@@ -0,0 +1,2 @@
1
+ import type { UInt32 } from '../types/numbers.js';
2
+ export declare function isUInt32(input: unknown): input is UInt32;
@@ -6,4 +6,5 @@ export type OctalNumberString = `0${'o' | 'O'}${number}`;
6
6
  export type BinaryNumberString = `0${'b' | 'B'}${number}`;
7
7
  export type ExponentiationString = `${number}${'e' | 'E'}${number}`;
8
8
  export type Int32 = Branded<number, 'Int32'>;
9
+ export type UInt32 = Branded<number, 'UInt32'>;
9
10
  export type NumberRange = [min: number] | [min: number, max: undefined] | [min: number, max: number] | [min: undefined, max: number];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@webdeveric/utils",
3
3
  "description": "Just another collection of utilities.",
4
- "version": "0.76.0",
4
+ "version": "0.78.0",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -66,13 +66,13 @@
66
66
  "url": "https://github.com/webdeveric/utils/issues"
67
67
  },
68
68
  "homepage": "https://github.com/webdeveric/utils/#readme",
69
- "packageManager": "pnpm@10.32.1+sha512.a706938f0e89ac1456b6563eab4edf1d1faf3368d1191fc5c59790e96dc918e4456ab2e67d613de1043d2e8c81f87303e6b40d4ffeca9df15ef1ad567348f2be",
69
+ "packageManager": "pnpm@10.33.2+sha512.a90faf6feeab71ad6c6e57f94e0fe1a12f5dcc22cd754db40ae9593eb6a3e0b6b12e3540218bb37ae083404b1f2ce6db2a4121e979829b4aff94b99f49da1cf8",
70
70
  "scripts": {
71
71
  "clean": "rimraf ./dist/",
72
72
  "prebuild": "pnpm clean",
73
- "build": "tsc --build tsconfig.cjs.json tsconfig.mjs.json --force",
73
+ "build": "tsgo --build tsconfig.cjs.json tsconfig.mjs.json --force",
74
74
  "postbuild": "echo '{\"type\":\"commonjs\"}' > ./dist/cjs/package.json && echo '{\"type\":\"module\"}' > ./dist/mjs/package.json && pnpm validate",
75
- "typecheck": "tsc --build --verbose --noEmit",
75
+ "typecheck": "tsgo --build --verbose --noEmit",
76
76
  "lint": "eslint ./*.{js,cjs,mjs,ts,cts,mts} ./src/ ./bench/ ./test/ --ext .ts,.mjs,.cjs",
77
77
  "bench": "vitest bench",
78
78
  "test": "vitest --typecheck",
@@ -87,26 +87,26 @@
87
87
  "devDependencies": {
88
88
  "@commitlint/config-conventional": "^20.5.0",
89
89
  "@commitlint/types": "^20.5.0",
90
- "@types/node": "^24.12.0",
91
- "@vitest/coverage-v8": "^4.1.0",
90
+ "@types/node": "^24.12.2",
91
+ "@typescript/native-preview": "7.0.0-dev.20260423.1",
92
+ "@vitest/coverage-v8": "^4.1.5",
92
93
  "@webdeveric/eslint-config-ts": "^0.12.0",
93
- "@webdeveric/prettier-config": "^0.3.0",
94
+ "@webdeveric/prettier-config": "^0.4.0",
94
95
  "commitlint": "^20.5.0",
95
- "commitlint-plugin-cspell": "^0.6.0",
96
- "conventional-changelog-conventionalcommits": "^9.3.0",
97
- "cspell": "^9.7.0",
96
+ "commitlint-plugin-cspell": "^0.8.0",
97
+ "conventional-changelog-conventionalcommits": "^9.3.1",
98
+ "cspell": "^10.0.0",
98
99
  "eslint": "^8.57.1",
99
100
  "eslint-config-prettier": "^10.1.8",
100
101
  "eslint-import-resolver-typescript": "^4.4.4",
101
102
  "eslint-plugin-import": "^2.32.0",
102
103
  "husky": "^9.1.7",
103
- "jsdom": "^29.0.0",
104
+ "jsdom": "^29.0.2",
104
105
  "lint-staged": "^16.4.0",
105
- "prettier": "^3.8.1",
106
+ "prettier": "^3.8.3",
106
107
  "rimraf": "^6.1.3",
107
108
  "semantic-release": "^25.0.3",
108
- "typescript": "6.0.0-dev.20260304",
109
- "validate-package-exports": "^0.21.0",
110
- "vitest": "^4.1.0"
109
+ "validate-package-exports": "^0.23.0",
110
+ "vitest": "^4.1.5"
111
111
  }
112
112
  }