@augment-vir/core 31.36.0 → 31.38.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.
@@ -0,0 +1,60 @@
1
+ /**
2
+ * Removes duplicates from an array. Optionally provide a callback for calculating a unique id for
3
+ * entries.
4
+ *
5
+ * @category Array
6
+ * @category Package : @augment-vir/common
7
+ * @example No callback
8
+ *
9
+ * ```ts
10
+ * import {removeDuplicates} from '@augment-vir/common';
11
+ *
12
+ * const result = removeDuplicates([
13
+ * 1,
14
+ * 1,
15
+ * 1,
16
+ * 1,
17
+ * 1,
18
+ * 2,
19
+ * 4,
20
+ * ]);
21
+ * // result is `[1, 2, 4]`
22
+ *
23
+ * const exampleEntry = {id: 5};
24
+ *
25
+ * const result2 = removeDuplicates([
26
+ * {id: 1},
27
+ * // this entry will not get filtered out because it's a new object reference
28
+ * {id: 1},
29
+ * exampleEntry,
30
+ * // this `exampleEntry` will get filtered out because it's the same reference as the one above
31
+ * exampleEntry,
32
+ * {id: 4},
33
+ * ]);
34
+ * // result2 is `[{id: 1}, {id: 1}, exampleEntry, {id: 4}]`
35
+ * ```
36
+ *
37
+ * @example With callback
38
+ *
39
+ * ```ts
40
+ * import {removeDuplicates} from '@augment-vir/common';
41
+ *
42
+ * const exampleEntry = {id: 5};
43
+ *
44
+ * const result2 = removeDuplicates(
45
+ * [
46
+ * {id: 1},
47
+ * {id: 1},
48
+ * exampleEntry,
49
+ * exampleEntry,
50
+ * {id: 4},
51
+ * ],
52
+ * (entry) => entry.id,
53
+ * );
54
+ * // result2 is `[{id: 1}, exampleEntry, {id: 4}]`
55
+ * ```
56
+ *
57
+ * @returns A new array (does not mutate).
58
+ * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common)
59
+ */
60
+ export declare function removeDuplicates<const Entry>(originalArray: ReadonlyArray<Entry>, calculateUniqueId?: (entry: Readonly<Entry>) => unknown): Entry[];
@@ -0,0 +1,72 @@
1
+ /**
2
+ * Removes duplicates from an array. Optionally provide a callback for calculating a unique id for
3
+ * entries.
4
+ *
5
+ * @category Array
6
+ * @category Package : @augment-vir/common
7
+ * @example No callback
8
+ *
9
+ * ```ts
10
+ * import {removeDuplicates} from '@augment-vir/common';
11
+ *
12
+ * const result = removeDuplicates([
13
+ * 1,
14
+ * 1,
15
+ * 1,
16
+ * 1,
17
+ * 1,
18
+ * 2,
19
+ * 4,
20
+ * ]);
21
+ * // result is `[1, 2, 4]`
22
+ *
23
+ * const exampleEntry = {id: 5};
24
+ *
25
+ * const result2 = removeDuplicates([
26
+ * {id: 1},
27
+ * // this entry will not get filtered out because it's a new object reference
28
+ * {id: 1},
29
+ * exampleEntry,
30
+ * // this `exampleEntry` will get filtered out because it's the same reference as the one above
31
+ * exampleEntry,
32
+ * {id: 4},
33
+ * ]);
34
+ * // result2 is `[{id: 1}, {id: 1}, exampleEntry, {id: 4}]`
35
+ * ```
36
+ *
37
+ * @example With callback
38
+ *
39
+ * ```ts
40
+ * import {removeDuplicates} from '@augment-vir/common';
41
+ *
42
+ * const exampleEntry = {id: 5};
43
+ *
44
+ * const result2 = removeDuplicates(
45
+ * [
46
+ * {id: 1},
47
+ * {id: 1},
48
+ * exampleEntry,
49
+ * exampleEntry,
50
+ * {id: 4},
51
+ * ],
52
+ * (entry) => entry.id,
53
+ * );
54
+ * // result2 is `[{id: 1}, exampleEntry, {id: 4}]`
55
+ * ```
56
+ *
57
+ * @returns A new array (does not mutate).
58
+ * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common)
59
+ */
60
+ export function removeDuplicates(originalArray, calculateUniqueId = (entry) => entry) {
61
+ const grouped = new Map();
62
+ return originalArray.filter((entry) => {
63
+ const uniqueId = calculateUniqueId(entry);
64
+ if (grouped.get(uniqueId)) {
65
+ return false;
66
+ }
67
+ else {
68
+ grouped.set(uniqueId, entry);
69
+ return true;
70
+ }
71
+ });
72
+ }
@@ -0,0 +1 @@
1
+ export declare function prettyDiff(actual: unknown, expected: unknown): string;
@@ -0,0 +1,84 @@
1
+ import { diffLines, diffWords } from 'diff';
2
+ import { stringify } from '../object/stringify.js';
3
+ import { isRuntimeEnv, RuntimeEnv } from '../runtime-env.js';
4
+ export function prettyDiff(actual, expected) {
5
+ const bothStrings = typeof expected === 'string' && typeof actual === 'string';
6
+ const useLines = typeof expected !== 'string' || typeof actual !== 'string';
7
+ const diffFunction = (useLines ? diffLines : diffWords);
8
+ const expectedString = [
9
+ bothStrings ? '' : '\n',
10
+ stringify(expected, 4),
11
+ '\n',
12
+ ].join('');
13
+ const actualString = [
14
+ bothStrings ? '' : '\n',
15
+ stringify(actual, 4),
16
+ '\n',
17
+ ].join('');
18
+ const changes = addDiffColors(useLines, diffFunction(expectedString, actualString));
19
+ const useColor = isRuntimeEnv(RuntimeEnv.Node);
20
+ /* node:coverage ignore next 7: currently only tested in node */
21
+ const explanationLine = [
22
+ useColor ? NodeColor.Green : '',
23
+ ' +added',
24
+ useColor ? NodeColor.Red : '',
25
+ ' -missing',
26
+ useColor ? NodeColor.Reset : '',
27
+ ].join('');
28
+ return [
29
+ explanationLine,
30
+ bothStrings ? '\n\n' : '\n',
31
+ changes,
32
+ ].join('');
33
+ }
34
+ var NodeColor;
35
+ (function (NodeColor) {
36
+ NodeColor["Green"] = "\u001B[32m";
37
+ NodeColor["Red"] = "\u001B[31m";
38
+ NodeColor["Reset"] = "\u001B[0m";
39
+ })(NodeColor || (NodeColor = {}));
40
+ var DiffPrefix;
41
+ (function (DiffPrefix) {
42
+ DiffPrefix["Added"] = "+";
43
+ DiffPrefix["Removed"] = "-";
44
+ })(DiffPrefix || (DiffPrefix = {}));
45
+ function addDiffColors(shouldUseLines, changes) {
46
+ const coloredDiff = shouldUseLines
47
+ ? changes
48
+ .flatMap((change) => {
49
+ return change.value
50
+ .split('\n')
51
+ .map((line) => {
52
+ return addColorToChange(line, change);
53
+ })
54
+ .join('\n');
55
+ })
56
+ .join('')
57
+ : changes
58
+ .map((change) => {
59
+ return addColorToChange(undefined, change);
60
+ })
61
+ .join('');
62
+ return coloredDiff;
63
+ }
64
+ function addColorToChange(line, change) {
65
+ if (line != undefined && !line) {
66
+ return '';
67
+ }
68
+ const useColor = isRuntimeEnv(RuntimeEnv.Node);
69
+ const prefix = change.added
70
+ ? DiffPrefix.Added
71
+ : change.removed
72
+ ? DiffPrefix.Removed
73
+ : line == undefined
74
+ ? ''
75
+ : ' ';
76
+ const color = change.added ? NodeColor.Green : change.removed ? NodeColor.Red : NodeColor.Reset;
77
+ return [
78
+ /* node:coverage ignore next 1 */
79
+ useColor ? color : '',
80
+ prefix,
81
+ line ?? change.value,
82
+ NodeColor.Reset,
83
+ ].join('');
84
+ }
@@ -0,0 +1,5 @@
1
+ import { type prettyDiff } from './pretty-diff.js';
2
+ export declare const mockPrettyDiffTestCases: {
3
+ it: string;
4
+ inputs: Parameters<typeof prettyDiff>;
5
+ }[];
@@ -0,0 +1,62 @@
1
+ export const mockPrettyDiffTestCases = [
2
+ {
3
+ it: 'handles strings',
4
+ inputs: [
5
+ 'hello there why',
6
+ 'hello what why',
7
+ ],
8
+ },
9
+ {
10
+ it: 'handles objects',
11
+ inputs: [
12
+ { a: 'hello there', b: 'goodbye now' },
13
+ { a: 'hello there' },
14
+ ],
15
+ },
16
+ {
17
+ it: 'handles numbers',
18
+ inputs: [
19
+ 52,
20
+ 40,
21
+ ],
22
+ },
23
+ {
24
+ it: 'expected object but got string',
25
+ inputs: [
26
+ 'hello there',
27
+ {
28
+ a: 'hello there',
29
+ },
30
+ ],
31
+ },
32
+ {
33
+ it: 'expected string but got object',
34
+ inputs: [
35
+ {
36
+ a: 'hello there',
37
+ },
38
+ 'hello there',
39
+ ],
40
+ },
41
+ {
42
+ it: 'expected number but got string',
43
+ inputs: [
44
+ 'hello there',
45
+ 42,
46
+ ],
47
+ },
48
+ {
49
+ it: 'expected string but got number',
50
+ inputs: [
51
+ 42,
52
+ 'hello there',
53
+ ],
54
+ },
55
+ {
56
+ it: 'got completely different strings',
57
+ inputs: [
58
+ 'nothing here',
59
+ 'hello there',
60
+ ],
61
+ },
62
+ ];
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,9 @@
1
+ /* node:coverage disable */
2
+ /** Run this script (without any args) to see what the pretty diff string printing looks like. */
3
+ import { prettyDiff } from './pretty-diff.js';
4
+ import { mockPrettyDiffTestCases } from './pretty-diff.mock.js';
5
+ mockPrettyDiffTestCases.forEach((testCase) => {
6
+ console.info('================================');
7
+ console.info(testCase.it);
8
+ console.info(prettyDiff(...testCase.inputs));
9
+ });
@@ -18,6 +18,9 @@ const undefinedSentinelStringRegExp = new RegExp(`['"]${undefinedSentinel}['"]`)
18
18
  export function stringify(input,
19
19
  /** Passed directly to the `space` parameter of `JSON.stringify`. */
20
20
  space) {
21
+ if (typeof input === 'string') {
22
+ return input;
23
+ }
21
24
  try {
22
25
  const json5String = JSON5.stringify(input,
23
26
  // Use a replacer to turn undefined into a unique string so the key is kept.
@@ -25,6 +28,9 @@ space) {
25
28
  if (value === undefined) {
26
29
  return undefinedSentinel;
27
30
  }
31
+ else if (typeof value === 'bigint') {
32
+ return Number(value);
33
+ }
28
34
  return value;
29
35
  }, space || undefined);
30
36
  return json5String.split(undefinedSentinelStringRegExp).join('undefined');
@@ -0,0 +1,56 @@
1
+ /**
2
+ * Creates a new RegExp by adding the given `flags` to the original RegExp.
3
+ *
4
+ * @category RegExp
5
+ * @category Package : @augment-vir/common
6
+ * @example
7
+ *
8
+ * ```ts
9
+ * import {addRegExpFlags} from '@augment-vir/common';
10
+ *
11
+ * addRegExpFlags(/a/i, 'gm');
12
+ * // output is `/a/igm`
13
+ * ```
14
+ *
15
+ * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common)
16
+ */
17
+ export declare function addRegExpFlags(originalRegExpOrString: RegExp | string, flags: string): RegExp;
18
+ /**
19
+ * Creates a new RegExp with the given `flags`.
20
+ *
21
+ * @category RegExp
22
+ * @category Package : @augment-vir/common
23
+ * @example
24
+ *
25
+ * ```ts
26
+ * import {setRegExpFlags} from '@augment-vir/common';
27
+ *
28
+ * setRegExpFlags(/a/i, 'gm');
29
+ * // output is `/a/gm`
30
+ * ```
31
+ *
32
+ * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common)
33
+ */
34
+ export declare function setRegExpFlags(originalRegExpOrString: RegExp | string, flags: string): RegExp;
35
+ /**
36
+ * Creates a new RegExp by adding or removing the case insensitivity flag `'i'`, based on the given
37
+ * `caseSensitive` input. The first input can also be a string and it will be converted into a
38
+ * RegExp.
39
+ *
40
+ * @category RegExp
41
+ * @category Package : @augment-vir/common
42
+ * @example
43
+ *
44
+ * ```ts
45
+ * import {setRegExpCaseSensitivity} from '@augment-vir/common';
46
+ *
47
+ * setRegExpCaseSensitivity(/abc/i, {caseSensitive: true}); // output is `/abc/`
48
+ * setRegExpCaseSensitivity(/abc/, {caseSensitive: false}); // output is `/abc/i`
49
+ * setRegExpCaseSensitivity('abc', {caseSensitive: true}); // output is `/abc/i`
50
+ * ```
51
+ *
52
+ * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common)
53
+ */
54
+ export declare function setRegExpCaseSensitivity(originalRegExpOrString: string | RegExp, { caseSensitive }: {
55
+ caseSensitive: boolean;
56
+ }): RegExp;
@@ -0,0 +1,80 @@
1
+ import { removeDuplicateCharacters } from '../string/remove-duplicate-characters.js';
2
+ import { escapeStringForRegExp } from './regexp-string.js';
3
+ /**
4
+ * Creates a new RegExp by adding the given `flags` to the original RegExp.
5
+ *
6
+ * @category RegExp
7
+ * @category Package : @augment-vir/common
8
+ * @example
9
+ *
10
+ * ```ts
11
+ * import {addRegExpFlags} from '@augment-vir/common';
12
+ *
13
+ * addRegExpFlags(/a/i, 'gm');
14
+ * // output is `/a/igm`
15
+ * ```
16
+ *
17
+ * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common)
18
+ */
19
+ export function addRegExpFlags(originalRegExpOrString, flags) {
20
+ const allFlags = removeDuplicateCharacters([
21
+ typeof originalRegExpOrString === 'string' ? '' : originalRegExpOrString.flags,
22
+ flags,
23
+ ]
24
+ .join('')
25
+ .toLowerCase());
26
+ return setRegExpFlags(originalRegExpOrString, allFlags);
27
+ }
28
+ /**
29
+ * Creates a new RegExp with the given `flags`.
30
+ *
31
+ * @category RegExp
32
+ * @category Package : @augment-vir/common
33
+ * @example
34
+ *
35
+ * ```ts
36
+ * import {setRegExpFlags} from '@augment-vir/common';
37
+ *
38
+ * setRegExpFlags(/a/i, 'gm');
39
+ * // output is `/a/gm`
40
+ * ```
41
+ *
42
+ * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common)
43
+ */
44
+ export function setRegExpFlags(originalRegExpOrString, flags) {
45
+ const allFlags = removeDuplicateCharacters(flags);
46
+ if (typeof originalRegExpOrString === 'string') {
47
+ return new RegExp(escapeStringForRegExp(originalRegExpOrString), allFlags);
48
+ }
49
+ else {
50
+ return new RegExp(originalRegExpOrString.source, allFlags);
51
+ }
52
+ }
53
+ /**
54
+ * Creates a new RegExp by adding or removing the case insensitivity flag `'i'`, based on the given
55
+ * `caseSensitive` input. The first input can also be a string and it will be converted into a
56
+ * RegExp.
57
+ *
58
+ * @category RegExp
59
+ * @category Package : @augment-vir/common
60
+ * @example
61
+ *
62
+ * ```ts
63
+ * import {setRegExpCaseSensitivity} from '@augment-vir/common';
64
+ *
65
+ * setRegExpCaseSensitivity(/abc/i, {caseSensitive: true}); // output is `/abc/`
66
+ * setRegExpCaseSensitivity(/abc/, {caseSensitive: false}); // output is `/abc/i`
67
+ * setRegExpCaseSensitivity('abc', {caseSensitive: true}); // output is `/abc/i`
68
+ * ```
69
+ *
70
+ * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common)
71
+ */
72
+ export function setRegExpCaseSensitivity(originalRegExpOrString, { caseSensitive }) {
73
+ const originalFlags = typeof originalRegExpOrString === 'string'
74
+ ? ''
75
+ : originalRegExpOrString.flags.toLowerCase();
76
+ const newFlags = caseSensitive
77
+ ? originalFlags.replaceAll('i', '')
78
+ : removeDuplicateCharacters(originalFlags + 'i');
79
+ return setRegExpFlags(originalRegExpOrString, newFlags);
80
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Indent all lines in a string by 4 spaces * count.
3
+ *
4
+ * @category String
5
+ * @category Package : @augment-vir/common
6
+ * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common)
7
+ */
8
+ export declare function indent(value: string, count?: number): string;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Indent all lines in a string by 4 spaces * count.
3
+ *
4
+ * @category String
5
+ * @category Package : @augment-vir/common
6
+ * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common)
7
+ */
8
+ export function indent(value, count = 1) {
9
+ return value
10
+ .split('\n')
11
+ .map((line) => [
12
+ ' '.repeat(Math.round(count)),
13
+ line,
14
+ ].join(''))
15
+ .join('\n');
16
+ }
@@ -1,8 +1,8 @@
1
1
  /**
2
- * A case insensitive match between strings.
2
+ * A case insensitive match between strings or RegExp.
3
3
  *
4
4
  * @category String
5
5
  * @category Package : @augment-vir/common
6
6
  * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common)
7
7
  */
8
- export declare function match(haystack: string, needle: string): boolean;
8
+ export declare function match(haystack: string, needle: string | RegExp): boolean;
@@ -1,11 +1,20 @@
1
+ import { addRegExpFlags } from '../regexp/regexp-flags.js';
1
2
  import { escapeStringForRegExp } from '../regexp/regexp-string.js';
2
3
  /**
3
- * A case insensitive match between strings.
4
+ * A case insensitive match between strings or RegExp.
4
5
  *
5
6
  * @category String
6
7
  * @category Package : @augment-vir/common
7
8
  * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common)
8
9
  */
9
10
  export function match(haystack, needle) {
10
- return !!needle && !!new RegExp(escapeStringForRegExp(needle), 'i').exec(haystack);
11
+ if (!needle) {
12
+ return false;
13
+ }
14
+ else if (typeof needle === 'string') {
15
+ return !!new RegExp(escapeStringForRegExp(needle), 'i').exec(haystack);
16
+ }
17
+ else {
18
+ return !!addRegExpFlags(needle, 'i').exec(haystack);
19
+ }
11
20
  }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Removes duplicate characters from any number of strings.
3
+ *
4
+ * @category String
5
+ * @category Package : @augment-vir/common
6
+ * @example
7
+ *
8
+ * ```ts
9
+ * import {removeDuplicateCharacters} from '@augment-vir/common';
10
+ *
11
+ * removeDuplicateCharacters('aAaBc', 'QrsAa');
12
+ * // output is `'aABcQrs'`
13
+ * ```
14
+ *
15
+ * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common)
16
+ */
17
+ export declare function removeDuplicateCharacters(...values: ReadonlyArray<string>): string;
@@ -0,0 +1,22 @@
1
+ import { removeDuplicates } from '../array/remove-duplicates.js';
2
+ /**
3
+ * Removes duplicate characters from any number of strings.
4
+ *
5
+ * @category String
6
+ * @category Package : @augment-vir/common
7
+ * @example
8
+ *
9
+ * ```ts
10
+ * import {removeDuplicateCharacters} from '@augment-vir/common';
11
+ *
12
+ * removeDuplicateCharacters('aAaBc', 'QrsAa');
13
+ * // output is `'aABcQrs'`
14
+ * ```
15
+ *
16
+ * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common)
17
+ */
18
+ export function removeDuplicateCharacters(...values) {
19
+ const combined = values.join('');
20
+ const deDuped = removeDuplicates(Array.from(combined));
21
+ return Array.from(deDuped).join('');
22
+ }
package/dist/index.d.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  export * from './augments/array/array.js';
2
+ export * from './augments/array/remove-duplicates.js';
2
3
  export * from './augments/array/tuple.js';
4
+ export * from './augments/diff/pretty-diff.js';
3
5
  export * from './augments/enum/enum-type.js';
4
6
  export * from './augments/enum/enum-values.js';
5
7
  export * from './augments/error/ensure-error.js';
@@ -21,10 +23,13 @@ export * from './augments/partial-type.js';
21
23
  export * from './augments/promise/deferred-promise.js';
22
24
  export * from './augments/promise/maybe-promise.js';
23
25
  export * from './augments/promise/wait.js';
26
+ export * from './augments/regexp/regexp-flags.js';
24
27
  export * from './augments/regexp/regexp-string.js';
25
28
  export * from './augments/runtime-env.js';
26
29
  export * from './augments/string/ansi.js';
27
30
  export * from './augments/string/casing.js';
31
+ export * from './augments/string/indent.js';
28
32
  export * from './augments/string/match.js';
29
33
  export * from './augments/string/punctuation.js';
34
+ export * from './augments/string/remove-duplicate-characters.js';
30
35
  export * from './augments/string/uuid.js';
package/dist/index.js CHANGED
@@ -1,5 +1,7 @@
1
1
  export * from './augments/array/array.js';
2
+ export * from './augments/array/remove-duplicates.js';
2
3
  export * from './augments/array/tuple.js';
4
+ export * from './augments/diff/pretty-diff.js';
3
5
  export * from './augments/enum/enum-type.js';
4
6
  export * from './augments/enum/enum-values.js';
5
7
  export * from './augments/error/ensure-error.js';
@@ -21,10 +23,13 @@ export * from './augments/partial-type.js';
21
23
  export * from './augments/promise/deferred-promise.js';
22
24
  export * from './augments/promise/maybe-promise.js';
23
25
  export * from './augments/promise/wait.js';
26
+ export * from './augments/regexp/regexp-flags.js';
24
27
  export * from './augments/regexp/regexp-string.js';
25
28
  export * from './augments/runtime-env.js';
26
29
  export * from './augments/string/ansi.js';
27
30
  export * from './augments/string/casing.js';
31
+ export * from './augments/string/indent.js';
28
32
  export * from './augments/string/match.js';
29
33
  export * from './augments/string/punctuation.js';
34
+ export * from './augments/string/remove-duplicate-characters.js';
30
35
  export * from './augments/string/uuid.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@augment-vir/core",
3
- "version": "31.36.0",
3
+ "version": "31.38.0",
4
4
  "description": "Core augment-vir augments. Use @augment-vir/common instead.",
5
5
  "homepage": "https://github.com/electrovir/augment-vir",
6
6
  "bugs": {
@@ -25,16 +25,17 @@
25
25
  "start": "tsx src/index.ts",
26
26
  "test": "virmator test --no-deps node",
27
27
  "test:coverage": "npm run test coverage",
28
- "test:update": "npm test"
28
+ "test:update": "npm test update"
29
29
  },
30
30
  "dependencies": {
31
31
  "@date-vir/duration": "^7.4.2",
32
32
  "browser-or-node": "^3.0.0",
33
+ "diff": "^8.0.2",
33
34
  "json5": "^2.2.3",
34
- "type-fest": "^5.0.0"
35
+ "type-fest": "^5.0.1"
35
36
  },
36
37
  "devDependencies": {
37
- "@types/node": "^24.4.0",
38
+ "@types/node": "^24.5.2",
38
39
  "c8": "^10.1.3",
39
40
  "istanbul-smart-text-reporter": "^1.1.5",
40
41
  "typescript": "^5.9.2"