@alextheman/utility 5.23.1 → 5.24.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/index.cjs +23 -6
- package/dist/index.d.cts +20 -4
- package/dist/index.d.ts +20 -4
- package/dist/index.js +21 -7
- package/dist/internal/index.cjs +45 -45
- package/dist/internal/index.js +45 -45
- package/dist/node/index.cjs +2 -2
- package/dist/node/index.js +2 -2
- package/package.json +12 -12
package/dist/index.cjs
CHANGED
|
@@ -24,19 +24,19 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
24
24
|
let zod = require("zod");
|
|
25
25
|
zod = __toESM(zod, 1);
|
|
26
26
|
//#region src/root/constants/FILE_PATH_REGEX.ts
|
|
27
|
-
const
|
|
28
|
-
const FILE_PATH_REGEX = RegExp(`^${
|
|
27
|
+
const FILE_PATH_REGEX_PATTERN = String.raw`(?<directory>.+)[\/\\](?<base>[^\/\\]+)`;
|
|
28
|
+
const FILE_PATH_REGEX = RegExp(`^${FILE_PATH_REGEX_PATTERN}$`);
|
|
29
29
|
//#endregion
|
|
30
30
|
//#region src/root/constants/ONE_DAY_IN_MILLISECONDS.ts
|
|
31
31
|
const ONE_DAY_IN_MILLISECONDS = 1440 * 60 * 1e3;
|
|
32
32
|
//#endregion
|
|
33
33
|
//#region src/root/constants/UUID_REGEX.ts
|
|
34
|
-
const
|
|
35
|
-
const UUID_REGEX = new RegExp(`^${
|
|
34
|
+
const UUID_REGEX_PATTERN = "[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}";
|
|
35
|
+
const UUID_REGEX = new RegExp(`^${UUID_REGEX_PATTERN}$`);
|
|
36
36
|
//#endregion
|
|
37
37
|
//#region src/root/constants/VERSION_NUMBER_REGEX.ts
|
|
38
|
-
const
|
|
39
|
-
const VERSION_NUMBER_REGEX = RegExp(`^${
|
|
38
|
+
const VERSION_NUMBER_REGEX_PATTERN = String.raw`(?:v)?(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)`;
|
|
39
|
+
const VERSION_NUMBER_REGEX = RegExp(`^${VERSION_NUMBER_REGEX_PATTERN}$`);
|
|
40
40
|
//#endregion
|
|
41
41
|
//#region src/root/deprecated/APIError.ts
|
|
42
42
|
const httpErrorCodeLookup = {
|
|
@@ -1942,6 +1942,8 @@ function normaliseIndents(first, ...args) {
|
|
|
1942
1942
|
* and another new line`.
|
|
1943
1943
|
* ```
|
|
1944
1944
|
*
|
|
1945
|
+
* @category Tagged Template
|
|
1946
|
+
*
|
|
1945
1947
|
* @param first - The strings from the template to process, or the options to apply.
|
|
1946
1948
|
* @param args - An array of all interpolations from the template.
|
|
1947
1949
|
*
|
|
@@ -2040,17 +2042,32 @@ var DataError = class DataError extends Error {
|
|
|
2040
2042
|
}
|
|
2041
2043
|
};
|
|
2042
2044
|
//#endregion
|
|
2045
|
+
//#region src/root/deprecated/FILE_PATH_PATTERN.ts
|
|
2046
|
+
/** @deprecated This has been renamed to `FILE_PATH_REGEX_PATTERN`. */
|
|
2047
|
+
const FILE_PATH_PATTERN = FILE_PATH_REGEX_PATTERN;
|
|
2048
|
+
//#endregion
|
|
2049
|
+
//#region src/root/deprecated/UUID_PATTERN.ts
|
|
2050
|
+
/** @deprecated This has been renamed to `UUID_REGEX_PATTERN`. */
|
|
2051
|
+
const UUID_PATTERN = UUID_REGEX_PATTERN;
|
|
2052
|
+
//#endregion
|
|
2053
|
+
//#region src/root/deprecated/VERSION_NUMBER_PATTERN.ts
|
|
2054
|
+
/** @deprecated This has been renamed to `VERSION_NUMBER_REGEX_PATTERN`. */
|
|
2055
|
+
const VERSION_NUMBER_PATTERN = String.raw`^(?:v)?(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$`;
|
|
2056
|
+
//#endregion
|
|
2043
2057
|
exports.APIError = APIError;
|
|
2044
2058
|
exports.DataError = DataError;
|
|
2045
2059
|
exports.Env = Env;
|
|
2046
2060
|
exports.FILE_PATH_PATTERN = FILE_PATH_PATTERN;
|
|
2047
2061
|
exports.FILE_PATH_REGEX = FILE_PATH_REGEX;
|
|
2062
|
+
exports.FILE_PATH_REGEX_PATTERN = FILE_PATH_REGEX_PATTERN;
|
|
2048
2063
|
exports.ONE_DAY_IN_MILLISECONDS = ONE_DAY_IN_MILLISECONDS;
|
|
2049
2064
|
exports.SortDirection = SortDirection;
|
|
2050
2065
|
exports.UUID_PATTERN = UUID_PATTERN;
|
|
2051
2066
|
exports.UUID_REGEX = UUID_REGEX;
|
|
2067
|
+
exports.UUID_REGEX_PATTERN = UUID_REGEX_PATTERN;
|
|
2052
2068
|
exports.VERSION_NUMBER_PATTERN = VERSION_NUMBER_PATTERN;
|
|
2053
2069
|
exports.VERSION_NUMBER_REGEX = VERSION_NUMBER_REGEX;
|
|
2070
|
+
exports.VERSION_NUMBER_REGEX_PATTERN = VERSION_NUMBER_REGEX_PATTERN;
|
|
2054
2071
|
exports.VersionNumber = VersionNumber;
|
|
2055
2072
|
exports.VersionType = VersionType;
|
|
2056
2073
|
exports.addDaysToDate = addDaysToDate;
|
package/dist/index.d.cts
CHANGED
|
@@ -2,18 +2,18 @@ import z, { ZodCoercedDate, ZodCoercedNumber, ZodError, ZodType, z as z$1 } from
|
|
|
2
2
|
import { DotenvParseOutput } from "dotenv";
|
|
3
3
|
|
|
4
4
|
//#region src/root/constants/FILE_PATH_REGEX.d.ts
|
|
5
|
-
declare const
|
|
5
|
+
declare const FILE_PATH_REGEX_PATTERN: string;
|
|
6
6
|
declare const FILE_PATH_REGEX: RegExp;
|
|
7
7
|
//#endregion
|
|
8
8
|
//#region src/root/constants/ONE_DAY_IN_MILLISECONDS.d.ts
|
|
9
9
|
declare const ONE_DAY_IN_MILLISECONDS: number;
|
|
10
10
|
//#endregion
|
|
11
11
|
//#region src/root/constants/UUID_REGEX.d.ts
|
|
12
|
-
declare const
|
|
12
|
+
declare const UUID_REGEX_PATTERN = "[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}";
|
|
13
13
|
declare const UUID_REGEX: RegExp;
|
|
14
14
|
//#endregion
|
|
15
15
|
//#region src/root/constants/VERSION_NUMBER_REGEX.d.ts
|
|
16
|
-
declare const
|
|
16
|
+
declare const VERSION_NUMBER_REGEX_PATTERN: string;
|
|
17
17
|
declare const VERSION_NUMBER_REGEX: RegExp;
|
|
18
18
|
//#endregion
|
|
19
19
|
//#region src/root/deprecated/APIError.d.ts
|
|
@@ -102,6 +102,18 @@ declare class DataError<DataType extends Record<PropertyKey, unknown> = Record<P
|
|
|
102
102
|
static expectErrorAsync(errorFunction: () => Promise<unknown>, options?: ExpectErrorOptions$1): Promise<DataError>;
|
|
103
103
|
}
|
|
104
104
|
//#endregion
|
|
105
|
+
//#region src/root/deprecated/FILE_PATH_PATTERN.d.ts
|
|
106
|
+
/** @deprecated This has been renamed to `FILE_PATH_REGEX_PATTERN`. */
|
|
107
|
+
declare const FILE_PATH_PATTERN: string;
|
|
108
|
+
//#endregion
|
|
109
|
+
//#region src/root/deprecated/UUID_PATTERN.d.ts
|
|
110
|
+
/** @deprecated This has been renamed to `UUID_REGEX_PATTERN`. */
|
|
111
|
+
declare const UUID_PATTERN = "[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}";
|
|
112
|
+
//#endregion
|
|
113
|
+
//#region src/root/deprecated/VERSION_NUMBER_PATTERN.d.ts
|
|
114
|
+
/** @deprecated This has been renamed to `VERSION_NUMBER_REGEX_PATTERN`. */
|
|
115
|
+
declare const VERSION_NUMBER_PATTERN: string;
|
|
116
|
+
//#endregion
|
|
105
117
|
//#region src/root/deprecated/RecordKey.d.ts
|
|
106
118
|
/**
|
|
107
119
|
* Represents the native Record's possible key type.
|
|
@@ -1154,6 +1166,8 @@ declare function normaliseIndents(options: NormaliseIndentsOptions): NormaliseIn
|
|
|
1154
1166
|
* and another new line`;
|
|
1155
1167
|
* ```
|
|
1156
1168
|
*
|
|
1169
|
+
* @category Tagged Template
|
|
1170
|
+
*
|
|
1157
1171
|
* @template InterpolationsType - The type of the interpolations.
|
|
1158
1172
|
*
|
|
1159
1173
|
* @param strings - The strings from the template to process.
|
|
@@ -1181,6 +1195,8 @@ declare function normaliseIndents(strings: TemplateStringsArray, ...interpolatio
|
|
|
1181
1195
|
* and another new line`.
|
|
1182
1196
|
* ```
|
|
1183
1197
|
*
|
|
1198
|
+
* @category Tagged Template
|
|
1199
|
+
*
|
|
1184
1200
|
* @param first - The strings from the template to process, or the options to apply.
|
|
1185
1201
|
* @param args - An array of all interpolations from the template.
|
|
1186
1202
|
*
|
|
@@ -1483,4 +1499,4 @@ interface ZodParsingErrorData {
|
|
|
1483
1499
|
issues: Array<z.core.$ZodIssue>;
|
|
1484
1500
|
}
|
|
1485
1501
|
//#endregion
|
|
1486
|
-
export { APIError, type ArrayElement, type CallReturnType, type CamelToKebabOptions, type CreateEnumType, type CreateFormDataOptions, type CreateFormDataOptionsNullableResolution, type CreateFormDataOptionsUndefinedOrNullResolution, DataError, type DisallowUndefined, Env, FILE_PATH_PATTERN, FILE_PATH_REGEX, type FormDataArrayResolutionStrategy, type FormDataNullableResolutionStrategy, type HTTPErrorCode, type IgnoreCase, type IsTypeArgumentString, type KebabToCamelOptions, type NonNull, type NonUndefined, type NormaliseIndentsFunction, type NormaliseIndentsOptions, type NormalizeIndentsFunction, type NormalizeIndentsOptions, type NullableOnCondition, ONE_DAY_IN_MILLISECONDS, type OptionalOnCondition, type ParallelTuple, type RecordKey, type RemoveUndefined, SortDirection, type StringListToArrayOptions, type ToTitleCaseOptions, UUID_PATTERN, UUID_REGEX, VERSION_NUMBER_PATTERN, VERSION_NUMBER_REGEX, VersionNumber, type FormatOptionsBase as VersionNumberToStringOptions, VersionType, type ZodParsingErrorData, addDaysToDate, appendSemicolon, assertNotNull, assertNotNullable, assertNotUndefined, az, calculateMonthlyDifference, camelToKebab, containsKeys, convertFileToBase64, createFormData, createTemplateStringsArray, deepCopy, deepFreeze, escapeHTML, escapeRegexPattern, fillArray, formatDateAndTime, getRandomNumber, getRecordKeys, getStringsAndInterpolations, httpErrorCodeLookup, identity, interpolate, interpolateObjects, isAnniversary, isLeapYear, isMonthlyMultiple, isNonNullableObject, isOrdered, isSameDate, isTemplateStringsArray, kebabToCamel, normaliseIndents, normalizeIndents, objectContainsKeys, omitProperties, paralleliseArrays, parseBoolean, parseEnv, parseFormData, parseIntStrict, parseUUID, parseVersionType, parseZodSchema, parseZodSchemaAsync, pickProperties, randomiseArray, range, removeDuplicates, removeUndefinedFromObject, sayHello, sortBy, stringListToArray, stringifyDotenv, toTitleCase, truncate, wait, zodVersionNumber };
|
|
1502
|
+
export { APIError, type ArrayElement, type CallReturnType, type CamelToKebabOptions, type CreateEnumType, type CreateFormDataOptions, type CreateFormDataOptionsNullableResolution, type CreateFormDataOptionsUndefinedOrNullResolution, DataError, type DisallowUndefined, Env, FILE_PATH_PATTERN, FILE_PATH_REGEX, FILE_PATH_REGEX_PATTERN, type FormDataArrayResolutionStrategy, type FormDataNullableResolutionStrategy, type HTTPErrorCode, type IgnoreCase, type IsTypeArgumentString, type KebabToCamelOptions, type NonNull, type NonUndefined, type NormaliseIndentsFunction, type NormaliseIndentsOptions, type NormalizeIndentsFunction, type NormalizeIndentsOptions, type NullableOnCondition, ONE_DAY_IN_MILLISECONDS, type OptionalOnCondition, type ParallelTuple, type RecordKey, type RemoveUndefined, SortDirection, type StringListToArrayOptions, type ToTitleCaseOptions, UUID_PATTERN, UUID_REGEX, UUID_REGEX_PATTERN, VERSION_NUMBER_PATTERN, VERSION_NUMBER_REGEX, VERSION_NUMBER_REGEX_PATTERN, VersionNumber, type FormatOptionsBase as VersionNumberToStringOptions, VersionType, type ZodParsingErrorData, addDaysToDate, appendSemicolon, assertNotNull, assertNotNullable, assertNotUndefined, az, calculateMonthlyDifference, camelToKebab, containsKeys, convertFileToBase64, createFormData, createTemplateStringsArray, deepCopy, deepFreeze, escapeHTML, escapeRegexPattern, fillArray, formatDateAndTime, getRandomNumber, getRecordKeys, getStringsAndInterpolations, httpErrorCodeLookup, identity, interpolate, interpolateObjects, isAnniversary, isLeapYear, isMonthlyMultiple, isNonNullableObject, isOrdered, isSameDate, isTemplateStringsArray, kebabToCamel, normaliseIndents, normalizeIndents, objectContainsKeys, omitProperties, paralleliseArrays, parseBoolean, parseEnv, parseFormData, parseIntStrict, parseUUID, parseVersionType, parseZodSchema, parseZodSchemaAsync, pickProperties, randomiseArray, range, removeDuplicates, removeUndefinedFromObject, sayHello, sortBy, stringListToArray, stringifyDotenv, toTitleCase, truncate, wait, zodVersionNumber };
|
package/dist/index.d.ts
CHANGED
|
@@ -2,18 +2,18 @@ import z, { ZodCoercedDate, ZodCoercedNumber, ZodError, ZodType, z as z$1 } from
|
|
|
2
2
|
import { DotenvParseOutput } from "dotenv";
|
|
3
3
|
|
|
4
4
|
//#region src/root/constants/FILE_PATH_REGEX.d.ts
|
|
5
|
-
declare const
|
|
5
|
+
declare const FILE_PATH_REGEX_PATTERN: string;
|
|
6
6
|
declare const FILE_PATH_REGEX: RegExp;
|
|
7
7
|
//#endregion
|
|
8
8
|
//#region src/root/constants/ONE_DAY_IN_MILLISECONDS.d.ts
|
|
9
9
|
declare const ONE_DAY_IN_MILLISECONDS: number;
|
|
10
10
|
//#endregion
|
|
11
11
|
//#region src/root/constants/UUID_REGEX.d.ts
|
|
12
|
-
declare const
|
|
12
|
+
declare const UUID_REGEX_PATTERN = "[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}";
|
|
13
13
|
declare const UUID_REGEX: RegExp;
|
|
14
14
|
//#endregion
|
|
15
15
|
//#region src/root/constants/VERSION_NUMBER_REGEX.d.ts
|
|
16
|
-
declare const
|
|
16
|
+
declare const VERSION_NUMBER_REGEX_PATTERN: string;
|
|
17
17
|
declare const VERSION_NUMBER_REGEX: RegExp;
|
|
18
18
|
//#endregion
|
|
19
19
|
//#region src/root/deprecated/APIError.d.ts
|
|
@@ -102,6 +102,18 @@ declare class DataError<DataType extends Record<PropertyKey, unknown> = Record<P
|
|
|
102
102
|
static expectErrorAsync(errorFunction: () => Promise<unknown>, options?: ExpectErrorOptions$1): Promise<DataError>;
|
|
103
103
|
}
|
|
104
104
|
//#endregion
|
|
105
|
+
//#region src/root/deprecated/FILE_PATH_PATTERN.d.ts
|
|
106
|
+
/** @deprecated This has been renamed to `FILE_PATH_REGEX_PATTERN`. */
|
|
107
|
+
declare const FILE_PATH_PATTERN: string;
|
|
108
|
+
//#endregion
|
|
109
|
+
//#region src/root/deprecated/UUID_PATTERN.d.ts
|
|
110
|
+
/** @deprecated This has been renamed to `UUID_REGEX_PATTERN`. */
|
|
111
|
+
declare const UUID_PATTERN = "[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}";
|
|
112
|
+
//#endregion
|
|
113
|
+
//#region src/root/deprecated/VERSION_NUMBER_PATTERN.d.ts
|
|
114
|
+
/** @deprecated This has been renamed to `VERSION_NUMBER_REGEX_PATTERN`. */
|
|
115
|
+
declare const VERSION_NUMBER_PATTERN: string;
|
|
116
|
+
//#endregion
|
|
105
117
|
//#region src/root/deprecated/RecordKey.d.ts
|
|
106
118
|
/**
|
|
107
119
|
* Represents the native Record's possible key type.
|
|
@@ -1154,6 +1166,8 @@ declare function normaliseIndents(options: NormaliseIndentsOptions): NormaliseIn
|
|
|
1154
1166
|
* and another new line`;
|
|
1155
1167
|
* ```
|
|
1156
1168
|
*
|
|
1169
|
+
* @category Tagged Template
|
|
1170
|
+
*
|
|
1157
1171
|
* @template InterpolationsType - The type of the interpolations.
|
|
1158
1172
|
*
|
|
1159
1173
|
* @param strings - The strings from the template to process.
|
|
@@ -1181,6 +1195,8 @@ declare function normaliseIndents(strings: TemplateStringsArray, ...interpolatio
|
|
|
1181
1195
|
* and another new line`.
|
|
1182
1196
|
* ```
|
|
1183
1197
|
*
|
|
1198
|
+
* @category Tagged Template
|
|
1199
|
+
*
|
|
1184
1200
|
* @param first - The strings from the template to process, or the options to apply.
|
|
1185
1201
|
* @param args - An array of all interpolations from the template.
|
|
1186
1202
|
*
|
|
@@ -1483,4 +1499,4 @@ interface ZodParsingErrorData {
|
|
|
1483
1499
|
issues: Array<z.core.$ZodIssue>;
|
|
1484
1500
|
}
|
|
1485
1501
|
//#endregion
|
|
1486
|
-
export { APIError, type ArrayElement, type CallReturnType, type CamelToKebabOptions, type CreateEnumType, type CreateFormDataOptions, type CreateFormDataOptionsNullableResolution, type CreateFormDataOptionsUndefinedOrNullResolution, DataError, type DisallowUndefined, Env, FILE_PATH_PATTERN, FILE_PATH_REGEX, type FormDataArrayResolutionStrategy, type FormDataNullableResolutionStrategy, type HTTPErrorCode, type IgnoreCase, type IsTypeArgumentString, type KebabToCamelOptions, type NonNull, type NonUndefined, type NormaliseIndentsFunction, type NormaliseIndentsOptions, type NormalizeIndentsFunction, type NormalizeIndentsOptions, type NullableOnCondition, ONE_DAY_IN_MILLISECONDS, type OptionalOnCondition, type ParallelTuple, type RecordKey, type RemoveUndefined, SortDirection, type StringListToArrayOptions, type ToTitleCaseOptions, UUID_PATTERN, UUID_REGEX, VERSION_NUMBER_PATTERN, VERSION_NUMBER_REGEX, VersionNumber, type FormatOptionsBase as VersionNumberToStringOptions, VersionType, type ZodParsingErrorData, addDaysToDate, appendSemicolon, assertNotNull, assertNotNullable, assertNotUndefined, az, calculateMonthlyDifference, camelToKebab, containsKeys, convertFileToBase64, createFormData, createTemplateStringsArray, deepCopy, deepFreeze, escapeHTML, escapeRegexPattern, fillArray, formatDateAndTime, getRandomNumber, getRecordKeys, getStringsAndInterpolations, httpErrorCodeLookup, identity, interpolate, interpolateObjects, isAnniversary, isLeapYear, isMonthlyMultiple, isNonNullableObject, isOrdered, isSameDate, isTemplateStringsArray, kebabToCamel, normaliseIndents, normalizeIndents, objectContainsKeys, omitProperties, paralleliseArrays, parseBoolean, parseEnv, parseFormData, parseIntStrict, parseUUID, parseVersionType, parseZodSchema, parseZodSchemaAsync, pickProperties, randomiseArray, range, removeDuplicates, removeUndefinedFromObject, sayHello, sortBy, stringListToArray, stringifyDotenv, toTitleCase, truncate, wait, zodVersionNumber };
|
|
1502
|
+
export { APIError, type ArrayElement, type CallReturnType, type CamelToKebabOptions, type CreateEnumType, type CreateFormDataOptions, type CreateFormDataOptionsNullableResolution, type CreateFormDataOptionsUndefinedOrNullResolution, DataError, type DisallowUndefined, Env, FILE_PATH_PATTERN, FILE_PATH_REGEX, FILE_PATH_REGEX_PATTERN, type FormDataArrayResolutionStrategy, type FormDataNullableResolutionStrategy, type HTTPErrorCode, type IgnoreCase, type IsTypeArgumentString, type KebabToCamelOptions, type NonNull, type NonUndefined, type NormaliseIndentsFunction, type NormaliseIndentsOptions, type NormalizeIndentsFunction, type NormalizeIndentsOptions, type NullableOnCondition, ONE_DAY_IN_MILLISECONDS, type OptionalOnCondition, type ParallelTuple, type RecordKey, type RemoveUndefined, SortDirection, type StringListToArrayOptions, type ToTitleCaseOptions, UUID_PATTERN, UUID_REGEX, UUID_REGEX_PATTERN, VERSION_NUMBER_PATTERN, VERSION_NUMBER_REGEX, VERSION_NUMBER_REGEX_PATTERN, VersionNumber, type FormatOptionsBase as VersionNumberToStringOptions, VersionType, type ZodParsingErrorData, addDaysToDate, appendSemicolon, assertNotNull, assertNotNullable, assertNotUndefined, az, calculateMonthlyDifference, camelToKebab, containsKeys, convertFileToBase64, createFormData, createTemplateStringsArray, deepCopy, deepFreeze, escapeHTML, escapeRegexPattern, fillArray, formatDateAndTime, getRandomNumber, getRecordKeys, getStringsAndInterpolations, httpErrorCodeLookup, identity, interpolate, interpolateObjects, isAnniversary, isLeapYear, isMonthlyMultiple, isNonNullableObject, isOrdered, isSameDate, isTemplateStringsArray, kebabToCamel, normaliseIndents, normalizeIndents, objectContainsKeys, omitProperties, paralleliseArrays, parseBoolean, parseEnv, parseFormData, parseIntStrict, parseUUID, parseVersionType, parseZodSchema, parseZodSchemaAsync, pickProperties, randomiseArray, range, removeDuplicates, removeUndefinedFromObject, sayHello, sortBy, stringListToArray, stringifyDotenv, toTitleCase, truncate, wait, zodVersionNumber };
|
package/dist/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import z, { z as z$1 } from "zod";
|
|
2
2
|
//#region src/root/constants/FILE_PATH_REGEX.ts
|
|
3
|
-
const
|
|
4
|
-
const FILE_PATH_REGEX = RegExp(`^${
|
|
3
|
+
const FILE_PATH_REGEX_PATTERN = String.raw`(?<directory>.+)[\/\\](?<base>[^\/\\]+)`;
|
|
4
|
+
const FILE_PATH_REGEX = RegExp(`^${FILE_PATH_REGEX_PATTERN}$`);
|
|
5
5
|
//#endregion
|
|
6
6
|
//#region src/root/constants/ONE_DAY_IN_MILLISECONDS.ts
|
|
7
7
|
const ONE_DAY_IN_MILLISECONDS = 1440 * 60 * 1e3;
|
|
8
8
|
//#endregion
|
|
9
9
|
//#region src/root/constants/UUID_REGEX.ts
|
|
10
|
-
const
|
|
11
|
-
const UUID_REGEX = new RegExp(`^${
|
|
10
|
+
const UUID_REGEX_PATTERN = "[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}";
|
|
11
|
+
const UUID_REGEX = new RegExp(`^${UUID_REGEX_PATTERN}$`);
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region src/root/constants/VERSION_NUMBER_REGEX.ts
|
|
14
|
-
const
|
|
15
|
-
const VERSION_NUMBER_REGEX = RegExp(`^${
|
|
14
|
+
const VERSION_NUMBER_REGEX_PATTERN = String.raw`(?:v)?(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)`;
|
|
15
|
+
const VERSION_NUMBER_REGEX = RegExp(`^${VERSION_NUMBER_REGEX_PATTERN}$`);
|
|
16
16
|
//#endregion
|
|
17
17
|
//#region src/root/deprecated/APIError.ts
|
|
18
18
|
const httpErrorCodeLookup = {
|
|
@@ -1918,6 +1918,8 @@ function normaliseIndents(first, ...args) {
|
|
|
1918
1918
|
* and another new line`.
|
|
1919
1919
|
* ```
|
|
1920
1920
|
*
|
|
1921
|
+
* @category Tagged Template
|
|
1922
|
+
*
|
|
1921
1923
|
* @param first - The strings from the template to process, or the options to apply.
|
|
1922
1924
|
* @param args - An array of all interpolations from the template.
|
|
1923
1925
|
*
|
|
@@ -2016,4 +2018,16 @@ var DataError = class DataError extends Error {
|
|
|
2016
2018
|
}
|
|
2017
2019
|
};
|
|
2018
2020
|
//#endregion
|
|
2019
|
-
|
|
2021
|
+
//#region src/root/deprecated/FILE_PATH_PATTERN.ts
|
|
2022
|
+
/** @deprecated This has been renamed to `FILE_PATH_REGEX_PATTERN`. */
|
|
2023
|
+
const FILE_PATH_PATTERN = FILE_PATH_REGEX_PATTERN;
|
|
2024
|
+
//#endregion
|
|
2025
|
+
//#region src/root/deprecated/UUID_PATTERN.ts
|
|
2026
|
+
/** @deprecated This has been renamed to `UUID_REGEX_PATTERN`. */
|
|
2027
|
+
const UUID_PATTERN = UUID_REGEX_PATTERN;
|
|
2028
|
+
//#endregion
|
|
2029
|
+
//#region src/root/deprecated/VERSION_NUMBER_PATTERN.ts
|
|
2030
|
+
/** @deprecated This has been renamed to `VERSION_NUMBER_REGEX_PATTERN`. */
|
|
2031
|
+
const VERSION_NUMBER_PATTERN = String.raw`^(?:v)?(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$`;
|
|
2032
|
+
//#endregion
|
|
2033
|
+
export { APIError, DataError, Env, FILE_PATH_PATTERN, FILE_PATH_REGEX, FILE_PATH_REGEX_PATTERN, ONE_DAY_IN_MILLISECONDS, SortDirection, UUID_PATTERN, UUID_REGEX, UUID_REGEX_PATTERN, VERSION_NUMBER_PATTERN, VERSION_NUMBER_REGEX, VERSION_NUMBER_REGEX_PATTERN, VersionNumber, VersionType, addDaysToDate, appendSemicolon, assertNotNull, assertNotNullable, assertNotUndefined, az, calculateMonthlyDifference, camelToKebab, containsKeys, convertFileToBase64, createFormData, createTemplateStringsArray, deepCopy, deepFreeze, escapeHTML, escapeRegexPattern, fillArray, formatDateAndTime, getRandomNumber, getRecordKeys, getStringsAndInterpolations, httpErrorCodeLookup, identity, interpolate, interpolateObjects, isAnniversary, isLeapYear, isMonthlyMultiple, isNonNullableObject, isOrdered, isSameDate, isTemplateStringsArray, kebabToCamel, normaliseIndents, normalizeIndents, objectContainsKeys, omitProperties, paralleliseArrays, parseBoolean, parseEnv, parseFormData, parseIntStrict, parseUUID, parseVersionType, parseZodSchema, parseZodSchemaAsync, pickProperties, randomiseArray, range, removeDuplicates, removeUndefinedFromObject, sayHello, sortBy, stringListToArray, stringifyDotenv, toTitleCase, truncate, wait, zodVersionNumber };
|
package/dist/internal/index.cjs
CHANGED
|
@@ -34,8 +34,8 @@ const DependencyGroup = {
|
|
|
34
34
|
};
|
|
35
35
|
//#endregion
|
|
36
36
|
//#region src/root/constants/VERSION_NUMBER_REGEX.ts
|
|
37
|
-
const
|
|
38
|
-
const VERSION_NUMBER_REGEX = RegExp(`^${
|
|
37
|
+
const VERSION_NUMBER_REGEX_PATTERN = String.raw`(?:v)?(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)`;
|
|
38
|
+
const VERSION_NUMBER_REGEX = RegExp(`^${VERSION_NUMBER_REGEX_PATTERN}$`);
|
|
39
39
|
//#endregion
|
|
40
40
|
//#region src/v6/CodeError.ts
|
|
41
41
|
/**
|
|
@@ -244,49 +244,6 @@ var DataError = class DataError extends CodeError {
|
|
|
244
244
|
}
|
|
245
245
|
};
|
|
246
246
|
//#endregion
|
|
247
|
-
//#region src/root/functions/parsers/parseIntStrict.ts
|
|
248
|
-
/**
|
|
249
|
-
* Converts a string to an integer and throws an error if it cannot be converted.
|
|
250
|
-
*
|
|
251
|
-
* @category Parsers
|
|
252
|
-
*
|
|
253
|
-
* @param string - A string to convert into a number.
|
|
254
|
-
* @param radix - A value between 2 and 36 that specifies the base of the number in string. If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal. All other strings are considered decimal.
|
|
255
|
-
*
|
|
256
|
-
* @throws {DataError} If the provided string cannot safely be converted to an integer.
|
|
257
|
-
*
|
|
258
|
-
* @returns The integer parsed from the input string.
|
|
259
|
-
*/
|
|
260
|
-
function parseIntStrict(string, radix) {
|
|
261
|
-
const trimmedString = string.trim();
|
|
262
|
-
const maxAllowedAlphabeticalCharacter = radix && radix > 10 && radix <= 36 ? String.fromCharCode(87 + radix - 1) : void 0;
|
|
263
|
-
if (!(radix && radix > 10 && radix <= 36 ? new RegExp(`^[+-]?[0-9a-${maxAllowedAlphabeticalCharacter}]+$`, "i") : /^[+-]?\d+$/).test(trimmedString)) throw new DataError(radix ? {
|
|
264
|
-
string,
|
|
265
|
-
radix
|
|
266
|
-
} : { string }, "INTEGER_PARSING_ERROR", `Only numeric values${radix && radix > 10 && radix <= 36 ? ` or character${radix !== 11 ? "s" : ""} A${radix !== 11 ? `-${maxAllowedAlphabeticalCharacter?.toUpperCase()} ` : " "}` : " "}are allowed.`);
|
|
267
|
-
if (radix && radix < 10 && [...trimmedString.replace(/^[+-]/, "")].some((character) => {
|
|
268
|
-
return parseInt(character) >= radix;
|
|
269
|
-
})) throw new DataError({
|
|
270
|
-
string,
|
|
271
|
-
radix
|
|
272
|
-
}, "INTEGER_PARSING_ERROR", "Value contains one or more digits outside of the range of the given radix.");
|
|
273
|
-
const parseIntResult = parseInt(trimmedString, radix);
|
|
274
|
-
if (isNaN(parseIntResult)) throw new DataError({ string }, "INTEGER_PARSING_ERROR", "Value is not a valid integer.");
|
|
275
|
-
return parseIntResult;
|
|
276
|
-
}
|
|
277
|
-
//#endregion
|
|
278
|
-
//#region src/root/functions/parsers/parseVersionType.ts
|
|
279
|
-
/**
|
|
280
|
-
* Represents the three common software version types.
|
|
281
|
-
*
|
|
282
|
-
* @category Types
|
|
283
|
-
*/
|
|
284
|
-
const VersionType = {
|
|
285
|
-
MAJOR: "major",
|
|
286
|
-
MINOR: "minor",
|
|
287
|
-
PATCH: "patch"
|
|
288
|
-
};
|
|
289
|
-
//#endregion
|
|
290
247
|
//#region src/root/functions/arrayHelpers/range.ts
|
|
291
248
|
/**
|
|
292
249
|
* Creates an array of numbers within a given range.
|
|
@@ -428,6 +385,49 @@ function paralleliseArrays(firstArray, secondArray) {
|
|
|
428
385
|
return outputArray;
|
|
429
386
|
}
|
|
430
387
|
//#endregion
|
|
388
|
+
//#region src/root/functions/parsers/parseIntStrict.ts
|
|
389
|
+
/**
|
|
390
|
+
* Converts a string to an integer and throws an error if it cannot be converted.
|
|
391
|
+
*
|
|
392
|
+
* @category Parsers
|
|
393
|
+
*
|
|
394
|
+
* @param string - A string to convert into a number.
|
|
395
|
+
* @param radix - A value between 2 and 36 that specifies the base of the number in string. If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal. All other strings are considered decimal.
|
|
396
|
+
*
|
|
397
|
+
* @throws {DataError} If the provided string cannot safely be converted to an integer.
|
|
398
|
+
*
|
|
399
|
+
* @returns The integer parsed from the input string.
|
|
400
|
+
*/
|
|
401
|
+
function parseIntStrict(string, radix) {
|
|
402
|
+
const trimmedString = string.trim();
|
|
403
|
+
const maxAllowedAlphabeticalCharacter = radix && radix > 10 && radix <= 36 ? String.fromCharCode(87 + radix - 1) : void 0;
|
|
404
|
+
if (!(radix && radix > 10 && radix <= 36 ? new RegExp(`^[+-]?[0-9a-${maxAllowedAlphabeticalCharacter}]+$`, "i") : /^[+-]?\d+$/).test(trimmedString)) throw new DataError(radix ? {
|
|
405
|
+
string,
|
|
406
|
+
radix
|
|
407
|
+
} : { string }, "INTEGER_PARSING_ERROR", `Only numeric values${radix && radix > 10 && radix <= 36 ? ` or character${radix !== 11 ? "s" : ""} A${radix !== 11 ? `-${maxAllowedAlphabeticalCharacter?.toUpperCase()} ` : " "}` : " "}are allowed.`);
|
|
408
|
+
if (radix && radix < 10 && [...trimmedString.replace(/^[+-]/, "")].some((character) => {
|
|
409
|
+
return parseInt(character) >= radix;
|
|
410
|
+
})) throw new DataError({
|
|
411
|
+
string,
|
|
412
|
+
radix
|
|
413
|
+
}, "INTEGER_PARSING_ERROR", "Value contains one or more digits outside of the range of the given radix.");
|
|
414
|
+
const parseIntResult = parseInt(trimmedString, radix);
|
|
415
|
+
if (isNaN(parseIntResult)) throw new DataError({ string }, "INTEGER_PARSING_ERROR", "Value is not a valid integer.");
|
|
416
|
+
return parseIntResult;
|
|
417
|
+
}
|
|
418
|
+
//#endregion
|
|
419
|
+
//#region src/root/functions/parsers/parseVersionType.ts
|
|
420
|
+
/**
|
|
421
|
+
* Represents the three common software version types.
|
|
422
|
+
*
|
|
423
|
+
* @category Types
|
|
424
|
+
*/
|
|
425
|
+
const VersionType = {
|
|
426
|
+
MAJOR: "major",
|
|
427
|
+
MINOR: "minor",
|
|
428
|
+
PATCH: "patch"
|
|
429
|
+
};
|
|
430
|
+
//#endregion
|
|
431
431
|
//#region src/root/functions/taggedTemplate/interpolate.ts
|
|
432
432
|
/**
|
|
433
433
|
* Returns the result of interpolating a template string when given the strings and interpolations separately.
|
package/dist/internal/index.js
CHANGED
|
@@ -9,8 +9,8 @@ const DependencyGroup = {
|
|
|
9
9
|
};
|
|
10
10
|
//#endregion
|
|
11
11
|
//#region src/root/constants/VERSION_NUMBER_REGEX.ts
|
|
12
|
-
const
|
|
13
|
-
const VERSION_NUMBER_REGEX = RegExp(`^${
|
|
12
|
+
const VERSION_NUMBER_REGEX_PATTERN = String.raw`(?:v)?(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)`;
|
|
13
|
+
const VERSION_NUMBER_REGEX = RegExp(`^${VERSION_NUMBER_REGEX_PATTERN}$`);
|
|
14
14
|
//#endregion
|
|
15
15
|
//#region src/v6/CodeError.ts
|
|
16
16
|
/**
|
|
@@ -219,49 +219,6 @@ var DataError = class DataError extends CodeError {
|
|
|
219
219
|
}
|
|
220
220
|
};
|
|
221
221
|
//#endregion
|
|
222
|
-
//#region src/root/functions/parsers/parseIntStrict.ts
|
|
223
|
-
/**
|
|
224
|
-
* Converts a string to an integer and throws an error if it cannot be converted.
|
|
225
|
-
*
|
|
226
|
-
* @category Parsers
|
|
227
|
-
*
|
|
228
|
-
* @param string - A string to convert into a number.
|
|
229
|
-
* @param radix - A value between 2 and 36 that specifies the base of the number in string. If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal. All other strings are considered decimal.
|
|
230
|
-
*
|
|
231
|
-
* @throws {DataError} If the provided string cannot safely be converted to an integer.
|
|
232
|
-
*
|
|
233
|
-
* @returns The integer parsed from the input string.
|
|
234
|
-
*/
|
|
235
|
-
function parseIntStrict(string, radix) {
|
|
236
|
-
const trimmedString = string.trim();
|
|
237
|
-
const maxAllowedAlphabeticalCharacter = radix && radix > 10 && radix <= 36 ? String.fromCharCode(87 + radix - 1) : void 0;
|
|
238
|
-
if (!(radix && radix > 10 && radix <= 36 ? new RegExp(`^[+-]?[0-9a-${maxAllowedAlphabeticalCharacter}]+$`, "i") : /^[+-]?\d+$/).test(trimmedString)) throw new DataError(radix ? {
|
|
239
|
-
string,
|
|
240
|
-
radix
|
|
241
|
-
} : { string }, "INTEGER_PARSING_ERROR", `Only numeric values${radix && radix > 10 && radix <= 36 ? ` or character${radix !== 11 ? "s" : ""} A${radix !== 11 ? `-${maxAllowedAlphabeticalCharacter?.toUpperCase()} ` : " "}` : " "}are allowed.`);
|
|
242
|
-
if (radix && radix < 10 && [...trimmedString.replace(/^[+-]/, "")].some((character) => {
|
|
243
|
-
return parseInt(character) >= radix;
|
|
244
|
-
})) throw new DataError({
|
|
245
|
-
string,
|
|
246
|
-
radix
|
|
247
|
-
}, "INTEGER_PARSING_ERROR", "Value contains one or more digits outside of the range of the given radix.");
|
|
248
|
-
const parseIntResult = parseInt(trimmedString, radix);
|
|
249
|
-
if (isNaN(parseIntResult)) throw new DataError({ string }, "INTEGER_PARSING_ERROR", "Value is not a valid integer.");
|
|
250
|
-
return parseIntResult;
|
|
251
|
-
}
|
|
252
|
-
//#endregion
|
|
253
|
-
//#region src/root/functions/parsers/parseVersionType.ts
|
|
254
|
-
/**
|
|
255
|
-
* Represents the three common software version types.
|
|
256
|
-
*
|
|
257
|
-
* @category Types
|
|
258
|
-
*/
|
|
259
|
-
const VersionType = {
|
|
260
|
-
MAJOR: "major",
|
|
261
|
-
MINOR: "minor",
|
|
262
|
-
PATCH: "patch"
|
|
263
|
-
};
|
|
264
|
-
//#endregion
|
|
265
222
|
//#region src/root/functions/arrayHelpers/range.ts
|
|
266
223
|
/**
|
|
267
224
|
* Creates an array of numbers within a given range.
|
|
@@ -403,6 +360,49 @@ function paralleliseArrays(firstArray, secondArray) {
|
|
|
403
360
|
return outputArray;
|
|
404
361
|
}
|
|
405
362
|
//#endregion
|
|
363
|
+
//#region src/root/functions/parsers/parseIntStrict.ts
|
|
364
|
+
/**
|
|
365
|
+
* Converts a string to an integer and throws an error if it cannot be converted.
|
|
366
|
+
*
|
|
367
|
+
* @category Parsers
|
|
368
|
+
*
|
|
369
|
+
* @param string - A string to convert into a number.
|
|
370
|
+
* @param radix - A value between 2 and 36 that specifies the base of the number in string. If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal. All other strings are considered decimal.
|
|
371
|
+
*
|
|
372
|
+
* @throws {DataError} If the provided string cannot safely be converted to an integer.
|
|
373
|
+
*
|
|
374
|
+
* @returns The integer parsed from the input string.
|
|
375
|
+
*/
|
|
376
|
+
function parseIntStrict(string, radix) {
|
|
377
|
+
const trimmedString = string.trim();
|
|
378
|
+
const maxAllowedAlphabeticalCharacter = radix && radix > 10 && radix <= 36 ? String.fromCharCode(87 + radix - 1) : void 0;
|
|
379
|
+
if (!(radix && radix > 10 && radix <= 36 ? new RegExp(`^[+-]?[0-9a-${maxAllowedAlphabeticalCharacter}]+$`, "i") : /^[+-]?\d+$/).test(trimmedString)) throw new DataError(radix ? {
|
|
380
|
+
string,
|
|
381
|
+
radix
|
|
382
|
+
} : { string }, "INTEGER_PARSING_ERROR", `Only numeric values${radix && radix > 10 && radix <= 36 ? ` or character${radix !== 11 ? "s" : ""} A${radix !== 11 ? `-${maxAllowedAlphabeticalCharacter?.toUpperCase()} ` : " "}` : " "}are allowed.`);
|
|
383
|
+
if (radix && radix < 10 && [...trimmedString.replace(/^[+-]/, "")].some((character) => {
|
|
384
|
+
return parseInt(character) >= radix;
|
|
385
|
+
})) throw new DataError({
|
|
386
|
+
string,
|
|
387
|
+
radix
|
|
388
|
+
}, "INTEGER_PARSING_ERROR", "Value contains one or more digits outside of the range of the given radix.");
|
|
389
|
+
const parseIntResult = parseInt(trimmedString, radix);
|
|
390
|
+
if (isNaN(parseIntResult)) throw new DataError({ string }, "INTEGER_PARSING_ERROR", "Value is not a valid integer.");
|
|
391
|
+
return parseIntResult;
|
|
392
|
+
}
|
|
393
|
+
//#endregion
|
|
394
|
+
//#region src/root/functions/parsers/parseVersionType.ts
|
|
395
|
+
/**
|
|
396
|
+
* Represents the three common software version types.
|
|
397
|
+
*
|
|
398
|
+
* @category Types
|
|
399
|
+
*/
|
|
400
|
+
const VersionType = {
|
|
401
|
+
MAJOR: "major",
|
|
402
|
+
MINOR: "minor",
|
|
403
|
+
PATCH: "patch"
|
|
404
|
+
};
|
|
405
|
+
//#endregion
|
|
406
406
|
//#region src/root/functions/taggedTemplate/interpolate.ts
|
|
407
407
|
/**
|
|
408
408
|
* Returns the result of interpolating a template string when given the strings and interpolations separately.
|
package/dist/node/index.cjs
CHANGED
|
@@ -60,8 +60,8 @@ function normalizeImportPath(importPath) {
|
|
|
60
60
|
const normaliseImportPath = normalizeImportPath;
|
|
61
61
|
//#endregion
|
|
62
62
|
//#region src/root/constants/FILE_PATH_REGEX.ts
|
|
63
|
-
const
|
|
64
|
-
const FILE_PATH_REGEX = RegExp(`^${
|
|
63
|
+
const FILE_PATH_REGEX_PATTERN = String.raw`(?<directory>.+)[\/\\](?<base>[^\/\\]+)`;
|
|
64
|
+
const FILE_PATH_REGEX = RegExp(`^${FILE_PATH_REGEX_PATTERN}$`);
|
|
65
65
|
//#endregion
|
|
66
66
|
//#region src/root/functions/arrayHelpers/range.ts
|
|
67
67
|
/**
|
package/dist/node/index.js
CHANGED
|
@@ -36,8 +36,8 @@ function normalizeImportPath(importPath) {
|
|
|
36
36
|
const normaliseImportPath = normalizeImportPath;
|
|
37
37
|
//#endregion
|
|
38
38
|
//#region src/root/constants/FILE_PATH_REGEX.ts
|
|
39
|
-
const
|
|
40
|
-
const FILE_PATH_REGEX = RegExp(`^${
|
|
39
|
+
const FILE_PATH_REGEX_PATTERN = String.raw`(?<directory>.+)[\/\\](?<base>[^\/\\]+)`;
|
|
40
|
+
const FILE_PATH_REGEX = RegExp(`^${FILE_PATH_REGEX_PATTERN}$`);
|
|
41
41
|
//#endregion
|
|
42
42
|
//#region src/root/functions/arrayHelpers/range.ts
|
|
43
43
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alextheman/utility",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.24.0",
|
|
4
4
|
"description": "Helpful utility functions.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -40,26 +40,26 @@
|
|
|
40
40
|
"execa": "9.6.1"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@alextheman/eslint-plugin": "5.
|
|
44
|
-
"@types/node": "
|
|
45
|
-
"alex-c-line": "2.
|
|
43
|
+
"@alextheman/eslint-plugin": "5.18.0",
|
|
44
|
+
"@types/node": "26.1.0",
|
|
45
|
+
"alex-c-line": "2.11.3",
|
|
46
46
|
"cross-env": "10.1.0",
|
|
47
47
|
"dotenv-cli": "11.0.0",
|
|
48
|
-
"eslint": "10.
|
|
49
|
-
"globals": "17.
|
|
48
|
+
"eslint": "10.6.0",
|
|
49
|
+
"globals": "17.7.0",
|
|
50
50
|
"husky": "9.1.7",
|
|
51
51
|
"jsdom": "29.1.1",
|
|
52
|
-
"markdownlint-cli2": "0.
|
|
53
|
-
"prettier": "3.
|
|
52
|
+
"markdownlint-cli2": "0.23.0",
|
|
53
|
+
"prettier": "3.9.4",
|
|
54
54
|
"tempy": "3.2.0",
|
|
55
55
|
"tsdown": "0.22.3",
|
|
56
|
-
"tsx": "4.
|
|
56
|
+
"tsx": "4.23.0",
|
|
57
57
|
"typedoc": "0.28.19",
|
|
58
58
|
"typedoc-plugin-markdown": "4.12.0",
|
|
59
59
|
"typedoc-rhineai-theme": "1.2.0",
|
|
60
60
|
"typescript": "6.0.3",
|
|
61
|
-
"typescript-eslint": "8.
|
|
62
|
-
"vite": "8.
|
|
61
|
+
"typescript-eslint": "8.62.1",
|
|
62
|
+
"vite": "8.1.3",
|
|
63
63
|
"vitest": "4.1.9",
|
|
64
64
|
"zod": "4.4.3"
|
|
65
65
|
},
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"format-prettier-javascript": "prettier --write \"./**/*.js\"",
|
|
83
83
|
"format-prettier-typescript": "prettier --write --parser typescript \"./**/*.ts\"",
|
|
84
84
|
"format-prettier-yml": "prettier --write \"./**/*.{yml,yaml}\"",
|
|
85
|
-
"lint": "pnpm run lint-tsc && pnpm run lint-eslint && pnpm run lint-markdownlint pnpm run lint-prettier && pnpm run lint-pre-release",
|
|
85
|
+
"lint": "pnpm run lint-tsc && pnpm run lint-eslint && pnpm run lint-markdownlint && pnpm run lint-prettier && pnpm run lint-pre-release",
|
|
86
86
|
"lint-eslint": "eslint \"package.json\" \"{src,tests,configs}/**/*.ts\"",
|
|
87
87
|
"lint-markdownlint": "bash -o pipefail -c 'pnpm exec markdownlint-cli2 \"**/*.md\" \"!{node_modules,dist}/**\"| grep -v \"^Finding:\"'",
|
|
88
88
|
"lint-pre-release": "alex-c-line package-json check --rules no-pre-release-dependencies",
|