@alextheman/utility 1.14.0 → 1.15.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 CHANGED
@@ -42,7 +42,7 @@ __export(index_exports, {
42
42
  isLeapYear: () => isLeapYear_default,
43
43
  isMonthlyMultiple: () => isMonthlyMultiple_default,
44
44
  isSameDate: () => isSameDate_default,
45
- newEnv: () => Env_default,
45
+ parseEnv: () => Env_default,
46
46
  randomiseArray: () => randomiseArray_default,
47
47
  range: () => range_default,
48
48
  truncate: () => truncate_default,
@@ -246,10 +246,10 @@ var APIError_default = APIError;
246
246
  // src/types/Env.ts
247
247
  var import_zod = require("zod");
248
248
  var envSchema = import_zod.z.enum(["test", "development", "production"]);
249
- function newEnv(data = "development") {
249
+ function parseEnv(data = "development") {
250
250
  return envSchema.parse(data);
251
251
  }
252
- var Env_default = newEnv;
252
+ var Env_default = parseEnv;
253
253
 
254
254
  // src/functions/validateUUID.ts
255
255
  function validateUUID(UUID, error = new APIError_default(400, "INVALID_UUID")) {
@@ -283,7 +283,7 @@ var wait_default = wait;
283
283
  isLeapYear,
284
284
  isMonthlyMultiple,
285
285
  isSameDate,
286
- newEnv,
286
+ parseEnv,
287
287
  randomiseArray,
288
288
  range,
289
289
  truncate,
package/dist/index.d.cts CHANGED
@@ -35,10 +35,10 @@ declare const envSchema: z.ZodEnum<{
35
35
  production: "production";
36
36
  }>;
37
37
  type Env = z.infer<typeof envSchema>;
38
- declare function newEnv(data?: unknown): Env;
38
+ declare function parseEnv(data?: unknown): Env;
39
39
 
40
40
  declare function validateUUID(UUID: string, error?: Error | APIError): string;
41
41
 
42
42
  declare function wait(seconds: number): Promise<void>;
43
43
 
44
- export { APIError, type Env, type HTTPErrorCodes, addDaysToDate, appendSemicolon, convertFileToBase64, formatDateAndTime, getRandomNumber, httpErrorCodeLookup, isLeapYear, isMonthlyMultiple, isSameDate, newEnv, randomiseArray, range, truncate, validateUUID, wait };
44
+ export { APIError, type Env, type HTTPErrorCodes, addDaysToDate, appendSemicolon, convertFileToBase64, formatDateAndTime, getRandomNumber, httpErrorCodeLookup, isLeapYear, isMonthlyMultiple, isSameDate, parseEnv, randomiseArray, range, truncate, validateUUID, wait };
package/dist/index.d.ts CHANGED
@@ -35,10 +35,10 @@ declare const envSchema: z.ZodEnum<{
35
35
  production: "production";
36
36
  }>;
37
37
  type Env = z.infer<typeof envSchema>;
38
- declare function newEnv(data?: unknown): Env;
38
+ declare function parseEnv(data?: unknown): Env;
39
39
 
40
40
  declare function validateUUID(UUID: string, error?: Error | APIError): string;
41
41
 
42
42
  declare function wait(seconds: number): Promise<void>;
43
43
 
44
- export { APIError, type Env, type HTTPErrorCodes, addDaysToDate, appendSemicolon, convertFileToBase64, formatDateAndTime, getRandomNumber, httpErrorCodeLookup, isLeapYear, isMonthlyMultiple, isSameDate, newEnv, randomiseArray, range, truncate, validateUUID, wait };
44
+ export { APIError, type Env, type HTTPErrorCodes, addDaysToDate, appendSemicolon, convertFileToBase64, formatDateAndTime, getRandomNumber, httpErrorCodeLookup, isLeapYear, isMonthlyMultiple, isSameDate, parseEnv, randomiseArray, range, truncate, validateUUID, wait };
package/dist/index.js CHANGED
@@ -197,10 +197,10 @@ var APIError_default = APIError;
197
197
  // src/types/Env.ts
198
198
  import { z } from "zod";
199
199
  var envSchema = z.enum(["test", "development", "production"]);
200
- function newEnv(data = "development") {
200
+ function parseEnv(data = "development") {
201
201
  return envSchema.parse(data);
202
202
  }
203
- var Env_default = newEnv;
203
+ var Env_default = parseEnv;
204
204
 
205
205
  // src/functions/validateUUID.ts
206
206
  function validateUUID(UUID, error = new APIError_default(400, "INVALID_UUID")) {
@@ -233,7 +233,7 @@ export {
233
233
  isLeapYear_default as isLeapYear,
234
234
  isMonthlyMultiple_default as isMonthlyMultiple,
235
235
  isSameDate_default as isSameDate,
236
- Env_default as newEnv,
236
+ Env_default as parseEnv,
237
237
  randomiseArray_default as randomiseArray,
238
238
  range_default as range,
239
239
  truncate_default as truncate,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alextheman/utility",
3
- "version": "1.14.0",
3
+ "version": "1.15.0",
4
4
  "main": "dist/index.cjs",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -11,11 +11,11 @@
11
11
  "scripts": {
12
12
  "test": "vitest run",
13
13
  "test-watch": "vitest",
14
- "format": "prettier --write --parser typescript 'src/**/*.ts' 'tests/**/*.test.ts' && ESLINT_MODE=fix eslint --fix 'src/**/*.ts' 'tests/**/*.ts'",
15
- "lint": "ESLINT_MODE=lint eslint 'src/**/*.ts' 'tests/**/*.ts' && prettier --check --parser typescript 'src/**/*.ts' 'tests/**/*.ts'",
14
+ "format": "prettier --write --parser typescript 'src/**/*.ts' 'tests/**/*.test.ts' && eslint --fix --suppress-all 'src/**/*.ts' 'tests/**/*.ts' && rm -f eslint-suppressions.json",
15
+ "lint": "tsc --noEmit && eslint 'src/**/*.ts' 'tests/**/*.ts' && prettier --check --parser typescript 'src/**/*.ts' 'tests/**/*.ts'",
16
16
  "prepare": "husky",
17
17
  "build": "tsup",
18
- "update-dependencies": "npx npm-check-updates -u && npm install",
18
+ "update-dependencies": "bash -c 'npx npm-check-updates -u \"$@\" && npm install' --",
19
19
  "change-major": "npm version major -m \"Change version number to v%s\"",
20
20
  "change-minor": "npm version minor -m \"Change version number to v%s\"",
21
21
  "change-patch": "npm version patch -m \"Change version number to v%s\""
@@ -25,7 +25,7 @@
25
25
  "license": "ISC",
26
26
  "description": "",
27
27
  "devDependencies": {
28
- "@alextheman/eslint-plugin": "^1.6.8",
28
+ "@alextheman/eslint-plugin": "^1.8.1",
29
29
  "@eslint/js": "^9.34.0",
30
30
  "@types/node": "^24.3.0",
31
31
  "eslint": "^9.34.0",
@@ -37,11 +37,11 @@
37
37
  "prettier": "^3.6.2",
38
38
  "tsup": "^8.5.0",
39
39
  "typescript": "^5.9.2",
40
- "typescript-eslint": "^8.40.0",
40
+ "typescript-eslint": "^8.41.0",
41
41
  "vite-tsconfig-paths": "^5.1.4",
42
42
  "vitest": "^3.2.4"
43
43
  },
44
44
  "dependencies": {
45
- "zod": "^4.1.0"
45
+ "zod": "^4.1.5"
46
46
  }
47
47
  }