@alextheman/utility 5.1.3 → 5.1.4

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 CHANGED
@@ -613,25 +613,6 @@ function isMonthlyMultiple(firstDate, secondDate) {
613
613
  return firstDate.getDate() === secondDate.getDate();
614
614
  }
615
615
 
616
- //#endregion
617
- //#region src/internal/getDependenciesFromGroup.ts
618
- /**
619
- * Get the dependencies from a given dependency group in `package.json`.
620
- *
621
- * @category Miscellaneous
622
- *
623
- * @param packageInfo - The data coming from `package.json`.
624
- * @param dependencyGroup - The group to get dependency information about (can be `dependencies` or `devDependencies`).
625
- *
626
- * @returns A record consisting of the package names and version ranges from the given dependency group.
627
- */
628
- function getDependenciesFromGroup(packageInfo, dependencyGroup) {
629
- return {
630
- dependencies: parseZodSchema(zod.default.record(zod.default.string(), zod.default.string()), packageInfo.dependencies ?? {}),
631
- devDependencies: parseZodSchema(zod.default.record(zod.default.string(), zod.default.string()), packageInfo.devDependencies ?? {})
632
- }[dependencyGroup];
633
- }
634
-
635
616
  //#endregion
636
617
  //#region src/root/functions/miscellaneous/convertFileToBase64.ts
637
618
  /**
@@ -1586,7 +1567,6 @@ exports.deepFreeze = deepFreeze;
1586
1567
  exports.encryptWithKey = encryptWithKey;
1587
1568
  exports.fillArray = fillArray;
1588
1569
  exports.formatDateAndTime = formatDateAndTime;
1589
- exports.getDependenciesFromGroup = getDependenciesFromGroup;
1590
1570
  exports.getRandomNumber = getRandomNumber;
1591
1571
  exports.getRecordKeys = getRecordKeys;
1592
1572
  exports.getStringsAndInterpolations = getStringsAndInterpolations;
package/dist/index.d.cts CHANGED
@@ -190,26 +190,6 @@ declare function isMonthlyMultiple(firstDate: Date, secondDate: Date): boolean;
190
190
  */
191
191
  declare function isSameDate(firstDate: Date, secondDate: Date): boolean;
192
192
  //#endregion
193
- //#region src/internal/DependencyGroup.d.ts
194
- declare const DependencyGroup: {
195
- readonly DEPENDENCIES: "dependencies";
196
- readonly DEV_DEPENDENCIES: "devDependencies";
197
- };
198
- type DependencyGroup = CreateEnumType<typeof DependencyGroup>;
199
- //#endregion
200
- //#region src/internal/getDependenciesFromGroup.d.ts
201
- /**
202
- * Get the dependencies from a given dependency group in `package.json`.
203
- *
204
- * @category Miscellaneous
205
- *
206
- * @param packageInfo - The data coming from `package.json`.
207
- * @param dependencyGroup - The group to get dependency information about (can be `dependencies` or `devDependencies`).
208
- *
209
- * @returns A record consisting of the package names and version ranges from the given dependency group.
210
- */
211
- declare function getDependenciesFromGroup(packageInfo: Record<string, unknown>, dependencyGroup: DependencyGroup): Record<string, string>;
212
- //#endregion
213
193
  //#region src/root/functions/miscellaneous/convertFileToBase64.d.ts
214
194
  /**
215
195
  * Asynchronously converts a file to a base 64 string
@@ -1072,4 +1052,4 @@ declare function normaliseIndents(strings: TemplateStringsArray, ...interpolatio
1072
1052
  */
1073
1053
  declare const normalizeIndents: typeof normaliseIndents;
1074
1054
  //#endregion
1075
- export { APIError, ArrayElement, CallReturnType, CamelToKebabOptions, CreateEnumType, CreateFormDataOptions, CreateFormDataOptionsNullableResolution, CreateFormDataOptionsUndefinedOrNullResolution, DataError, DisallowUndefined, Env, FILE_PATH_REGEX, FormDataArrayResolutionStrategy, FormDataNullableResolutionStrategy, HTTPErrorCode, IgnoreCase, IsTypeArgumentString, KebabToCamelOptions, NAMESPACE_EXPORT_REGEX, NonUndefined, NormaliseIndentsFunction, NormaliseIndentsOptions, NormalizeIndentsFunction, NormalizeIndentsOptions, OptionalOnCondition, ParallelTuple, RecordKey, RemoveUndefined, StringListToArrayOptions, VERSION_NUMBER_REGEX, VersionNumber, FormatOptionsBase as VersionNumberToStringOptions, VersionType, addDaysToDate, appendSemicolon, camelToKebab, convertFileToBase64, createFormData, createTemplateStringsArray, deepCopy, deepFreeze, encryptWithKey, fillArray, formatDateAndTime, getDependenciesFromGroup, getRandomNumber, getRecordKeys, getStringsAndInterpolations, httpErrorCodeLookup, interpolate, interpolateObjects, isAnniversary, isLeapYear, isMonthlyMultiple, isOrdered, isSameDate, isTemplateStringsArray, kebabToCamel, normaliseIndents, normalizeIndents, omitProperties, paralleliseArrays, parseBoolean, parseEnv, parseFormData, parseIntStrict, parseVersionType, parseZodSchema, parseZodSchemaAsync, randomiseArray, range, removeDuplicates, removeUndefinedFromObject, sayHello, stringListToArray, stringifyDotenv, truncate, wait, zodVersionNumber };
1055
+ export { APIError, ArrayElement, CallReturnType, CamelToKebabOptions, CreateEnumType, CreateFormDataOptions, CreateFormDataOptionsNullableResolution, CreateFormDataOptionsUndefinedOrNullResolution, DataError, DisallowUndefined, Env, FILE_PATH_REGEX, FormDataArrayResolutionStrategy, FormDataNullableResolutionStrategy, HTTPErrorCode, IgnoreCase, IsTypeArgumentString, KebabToCamelOptions, NAMESPACE_EXPORT_REGEX, NonUndefined, NormaliseIndentsFunction, NormaliseIndentsOptions, NormalizeIndentsFunction, NormalizeIndentsOptions, OptionalOnCondition, ParallelTuple, RecordKey, RemoveUndefined, StringListToArrayOptions, VERSION_NUMBER_REGEX, VersionNumber, FormatOptionsBase as VersionNumberToStringOptions, VersionType, addDaysToDate, appendSemicolon, camelToKebab, convertFileToBase64, createFormData, createTemplateStringsArray, deepCopy, deepFreeze, encryptWithKey, fillArray, formatDateAndTime, getRandomNumber, getRecordKeys, getStringsAndInterpolations, httpErrorCodeLookup, interpolate, interpolateObjects, isAnniversary, isLeapYear, isMonthlyMultiple, isOrdered, isSameDate, isTemplateStringsArray, kebabToCamel, normaliseIndents, normalizeIndents, omitProperties, paralleliseArrays, parseBoolean, parseEnv, parseFormData, parseIntStrict, parseVersionType, parseZodSchema, parseZodSchemaAsync, randomiseArray, range, removeDuplicates, removeUndefinedFromObject, sayHello, stringListToArray, stringifyDotenv, truncate, wait, zodVersionNumber };
package/dist/index.d.ts CHANGED
@@ -190,26 +190,6 @@ declare function isMonthlyMultiple(firstDate: Date, secondDate: Date): boolean;
190
190
  */
191
191
  declare function isSameDate(firstDate: Date, secondDate: Date): boolean;
192
192
  //#endregion
193
- //#region src/internal/DependencyGroup.d.ts
194
- declare const DependencyGroup: {
195
- readonly DEPENDENCIES: "dependencies";
196
- readonly DEV_DEPENDENCIES: "devDependencies";
197
- };
198
- type DependencyGroup = CreateEnumType<typeof DependencyGroup>;
199
- //#endregion
200
- //#region src/internal/getDependenciesFromGroup.d.ts
201
- /**
202
- * Get the dependencies from a given dependency group in `package.json`.
203
- *
204
- * @category Miscellaneous
205
- *
206
- * @param packageInfo - The data coming from `package.json`.
207
- * @param dependencyGroup - The group to get dependency information about (can be `dependencies` or `devDependencies`).
208
- *
209
- * @returns A record consisting of the package names and version ranges from the given dependency group.
210
- */
211
- declare function getDependenciesFromGroup(packageInfo: Record<string, unknown>, dependencyGroup: DependencyGroup): Record<string, string>;
212
- //#endregion
213
193
  //#region src/root/functions/miscellaneous/convertFileToBase64.d.ts
214
194
  /**
215
195
  * Asynchronously converts a file to a base 64 string
@@ -1072,4 +1052,4 @@ declare function normaliseIndents(strings: TemplateStringsArray, ...interpolatio
1072
1052
  */
1073
1053
  declare const normalizeIndents: typeof normaliseIndents;
1074
1054
  //#endregion
1075
- export { APIError, type ArrayElement, type CallReturnType, CamelToKebabOptions, type CreateEnumType, type CreateFormDataOptions, type CreateFormDataOptionsNullableResolution, type CreateFormDataOptionsUndefinedOrNullResolution, DataError, type DisallowUndefined, Env, FILE_PATH_REGEX, type FormDataArrayResolutionStrategy, type FormDataNullableResolutionStrategy, type HTTPErrorCode, type IgnoreCase, type IsTypeArgumentString, KebabToCamelOptions, NAMESPACE_EXPORT_REGEX, type NonUndefined, NormaliseIndentsFunction, NormaliseIndentsOptions, NormalizeIndentsFunction, NormalizeIndentsOptions, type OptionalOnCondition, ParallelTuple, type RecordKey, type RemoveUndefined, type StringListToArrayOptions, VERSION_NUMBER_REGEX, VersionNumber, type FormatOptionsBase as VersionNumberToStringOptions, VersionType, addDaysToDate, appendSemicolon, camelToKebab, convertFileToBase64, createFormData, createTemplateStringsArray, deepCopy, deepFreeze, encryptWithKey, fillArray, formatDateAndTime, getDependenciesFromGroup, getRandomNumber, getRecordKeys, getStringsAndInterpolations, httpErrorCodeLookup, interpolate, interpolateObjects, isAnniversary, isLeapYear, isMonthlyMultiple, isOrdered, isSameDate, isTemplateStringsArray, kebabToCamel, normaliseIndents, normalizeIndents, omitProperties, paralleliseArrays, parseBoolean, parseEnv, parseFormData, parseIntStrict, parseVersionType, parseZodSchema, parseZodSchemaAsync, randomiseArray, range, removeDuplicates, removeUndefinedFromObject, sayHello, stringListToArray, stringifyDotenv, truncate, wait, zodVersionNumber };
1055
+ export { APIError, type ArrayElement, type CallReturnType, CamelToKebabOptions, type CreateEnumType, type CreateFormDataOptions, type CreateFormDataOptionsNullableResolution, type CreateFormDataOptionsUndefinedOrNullResolution, DataError, type DisallowUndefined, Env, FILE_PATH_REGEX, type FormDataArrayResolutionStrategy, type FormDataNullableResolutionStrategy, type HTTPErrorCode, type IgnoreCase, type IsTypeArgumentString, KebabToCamelOptions, NAMESPACE_EXPORT_REGEX, type NonUndefined, NormaliseIndentsFunction, NormaliseIndentsOptions, NormalizeIndentsFunction, NormalizeIndentsOptions, type OptionalOnCondition, ParallelTuple, type RecordKey, type RemoveUndefined, type StringListToArrayOptions, VERSION_NUMBER_REGEX, VersionNumber, type FormatOptionsBase as VersionNumberToStringOptions, VersionType, addDaysToDate, appendSemicolon, camelToKebab, convertFileToBase64, createFormData, createTemplateStringsArray, deepCopy, deepFreeze, encryptWithKey, fillArray, formatDateAndTime, getRandomNumber, getRecordKeys, getStringsAndInterpolations, httpErrorCodeLookup, interpolate, interpolateObjects, isAnniversary, isLeapYear, isMonthlyMultiple, isOrdered, isSameDate, isTemplateStringsArray, kebabToCamel, normaliseIndents, normalizeIndents, omitProperties, paralleliseArrays, parseBoolean, parseEnv, parseFormData, parseIntStrict, parseVersionType, parseZodSchema, parseZodSchemaAsync, randomiseArray, range, removeDuplicates, removeUndefinedFromObject, sayHello, stringListToArray, stringifyDotenv, truncate, wait, zodVersionNumber };
package/dist/index.js CHANGED
@@ -583,25 +583,6 @@ function isMonthlyMultiple(firstDate, secondDate) {
583
583
  return firstDate.getDate() === secondDate.getDate();
584
584
  }
585
585
 
586
- //#endregion
587
- //#region src/internal/getDependenciesFromGroup.ts
588
- /**
589
- * Get the dependencies from a given dependency group in `package.json`.
590
- *
591
- * @category Miscellaneous
592
- *
593
- * @param packageInfo - The data coming from `package.json`.
594
- * @param dependencyGroup - The group to get dependency information about (can be `dependencies` or `devDependencies`).
595
- *
596
- * @returns A record consisting of the package names and version ranges from the given dependency group.
597
- */
598
- function getDependenciesFromGroup(packageInfo, dependencyGroup) {
599
- return {
600
- dependencies: parseZodSchema(z.record(z.string(), z.string()), packageInfo.dependencies ?? {}),
601
- devDependencies: parseZodSchema(z.record(z.string(), z.string()), packageInfo.devDependencies ?? {})
602
- }[dependencyGroup];
603
- }
604
-
605
586
  //#endregion
606
587
  //#region src/root/functions/miscellaneous/convertFileToBase64.ts
607
588
  /**
@@ -1537,4 +1518,4 @@ function truncate(stringToTruncate, maxLength = 5) {
1537
1518
  }
1538
1519
 
1539
1520
  //#endregion
1540
- export { APIError, DataError, Env, FILE_PATH_REGEX, NAMESPACE_EXPORT_REGEX, VERSION_NUMBER_REGEX, VersionNumber, VersionType, addDaysToDate, appendSemicolon, camelToKebab, convertFileToBase64, createFormData, createTemplateStringsArray, deepCopy, deepFreeze, encryptWithKey, fillArray, formatDateAndTime, getDependenciesFromGroup, getRandomNumber, getRecordKeys, getStringsAndInterpolations, httpErrorCodeLookup, interpolate, interpolateObjects, isAnniversary, isLeapYear, isMonthlyMultiple, isOrdered, isSameDate, isTemplateStringsArray, kebabToCamel, normaliseIndents, normalizeIndents, omitProperties, paralleliseArrays, parseBoolean, parseEnv, parseFormData, parseIntStrict, parseVersionType, parseZodSchema, parseZodSchemaAsync, randomiseArray, range, removeDuplicates, removeUndefinedFromObject, sayHello, stringListToArray, stringifyDotenv, truncate, wait, zodVersionNumber };
1521
+ export { APIError, DataError, Env, FILE_PATH_REGEX, NAMESPACE_EXPORT_REGEX, VERSION_NUMBER_REGEX, VersionNumber, VersionType, addDaysToDate, appendSemicolon, camelToKebab, convertFileToBase64, createFormData, createTemplateStringsArray, deepCopy, deepFreeze, encryptWithKey, fillArray, formatDateAndTime, getRandomNumber, getRecordKeys, getStringsAndInterpolations, httpErrorCodeLookup, interpolate, interpolateObjects, isAnniversary, isLeapYear, isMonthlyMultiple, isOrdered, isSameDate, isTemplateStringsArray, kebabToCamel, normaliseIndents, normalizeIndents, omitProperties, paralleliseArrays, parseBoolean, parseEnv, parseFormData, parseIntStrict, parseVersionType, parseZodSchema, parseZodSchemaAsync, randomiseArray, range, removeDuplicates, removeUndefinedFromObject, sayHello, stringListToArray, stringifyDotenv, truncate, wait, zodVersionNumber };
@@ -1,18 +1,5 @@
1
1
  import { ExecaMethod } from "execa";
2
2
 
3
- //#region src/internal/getDependenciesFromGroup.d.ts
4
- /**
5
- * Get the dependencies from a given dependency group in `package.json`.
6
- *
7
- * @category Miscellaneous
8
- *
9
- * @param packageInfo - The data coming from `package.json`.
10
- * @param dependencyGroup - The group to get dependency information about (can be `dependencies` or `devDependencies`).
11
- *
12
- * @returns A record consisting of the package names and version ranges from the given dependency group.
13
- */
14
- declare function getDependenciesFromGroup(packageInfo: Record<string, unknown>, dependencyGroup: DependencyGroup): Record<string, string>;
15
- //#endregion
16
3
  //#region src/root/types/RecordKey.d.ts
17
4
  /**
18
5
  * Represents the native Record's possible key type.
@@ -79,6 +66,19 @@ declare const DependencyGroup: {
79
66
  };
80
67
  type DependencyGroup = CreateEnumType<typeof DependencyGroup>;
81
68
  //#endregion
69
+ //#region src/internal/getDependenciesFromGroup.d.ts
70
+ /**
71
+ * Get the dependencies from a given dependency group in `package.json`.
72
+ *
73
+ * @category Miscellaneous
74
+ *
75
+ * @param packageInfo - The data coming from `package.json`.
76
+ * @param dependencyGroup - The group to get dependency information about (can be `dependencies` or `devDependencies`).
77
+ *
78
+ * @returns A record consisting of the package names and version ranges from the given dependency group.
79
+ */
80
+ declare function getDependenciesFromGroup(packageInfo: Record<string, unknown>, dependencyGroup: DependencyGroup): Record<string, string>;
81
+ //#endregion
82
82
  //#region src/internal/getExpectedTgzName.d.ts
83
83
  declare function getExpectedTgzName(packagePath: string, packageManager: string): Promise<string>;
84
84
  //#endregion
@@ -1,19 +1,6 @@
1
1
  import z from "zod";
2
2
  import { ExecaMethod } from "execa";
3
3
 
4
- //#region src/internal/getDependenciesFromGroup.d.ts
5
- /**
6
- * Get the dependencies from a given dependency group in `package.json`.
7
- *
8
- * @category Miscellaneous
9
- *
10
- * @param packageInfo - The data coming from `package.json`.
11
- * @param dependencyGroup - The group to get dependency information about (can be `dependencies` or `devDependencies`).
12
- *
13
- * @returns A record consisting of the package names and version ranges from the given dependency group.
14
- */
15
- declare function getDependenciesFromGroup(packageInfo: Record<string, unknown>, dependencyGroup: DependencyGroup): Record<string, string>;
16
- //#endregion
17
4
  //#region src/root/types/RecordKey.d.ts
18
5
  /**
19
6
  * Represents the native Record's possible key type.
@@ -80,6 +67,19 @@ declare const DependencyGroup: {
80
67
  };
81
68
  type DependencyGroup = CreateEnumType<typeof DependencyGroup>;
82
69
  //#endregion
70
+ //#region src/internal/getDependenciesFromGroup.d.ts
71
+ /**
72
+ * Get the dependencies from a given dependency group in `package.json`.
73
+ *
74
+ * @category Miscellaneous
75
+ *
76
+ * @param packageInfo - The data coming from `package.json`.
77
+ * @param dependencyGroup - The group to get dependency information about (can be `dependencies` or `devDependencies`).
78
+ *
79
+ * @returns A record consisting of the package names and version ranges from the given dependency group.
80
+ */
81
+ declare function getDependenciesFromGroup(packageInfo: Record<string, unknown>, dependencyGroup: DependencyGroup): Record<string, string>;
82
+ //#endregion
83
83
  //#region src/internal/getExpectedTgzName.d.ts
84
84
  declare function getExpectedTgzName(packagePath: string, packageManager: string): Promise<string>;
85
85
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alextheman/utility",
3
- "version": "5.1.3",
3
+ "version": "5.1.4",
4
4
  "description": "Helpful utility functions.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -37,13 +37,13 @@
37
37
  },
38
38
  "devDependencies": {
39
39
  "@alextheman/eslint-plugin": "^5.7.1",
40
- "@types/node": "^25.2.3",
41
- "alex-c-line": "^1.26.2",
40
+ "@types/node": "^25.3.0",
41
+ "alex-c-line": "^1.28.0",
42
42
  "dotenv-cli": "^11.0.0",
43
- "eslint": "^10.0.0",
43
+ "eslint": "^10.0.1",
44
44
  "globals": "^17.3.0",
45
45
  "husky": "^9.1.7",
46
- "jsdom": "^28.0.0",
46
+ "jsdom": "^28.1.0",
47
47
  "prettier": "^3.8.1",
48
48
  "tempy": "^3.2.0",
49
49
  "tsdown": "^0.20.3",