@controlium/utils 1.0.2-alpha.1 → 1.0.2-alpha.3

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.
@@ -70,21 +70,21 @@ export declare class Utils {
70
70
  * @param obj - Value to check.
71
71
  * @returns `true` if `null` or `undefined`, otherwise `false`.
72
72
  */
73
- static isNullOrUndefined(obj?: unknown): boolean;
74
- /**
73
+ static isNullOrUndefined(obj?: unknown): obj is null | undefined;
74
+ /**2
75
75
  * Safely checks if a value is `null`.
76
76
  *
77
77
  * @param obj - Value to check.
78
78
  * @returns `true` if `null`, otherwise `false`.
79
79
  */
80
- static isNull(obj?: unknown): boolean;
80
+ static isNull(obj?: unknown): obj is null;
81
81
  /**
82
82
  * Safely checks if a value is `undefined`.
83
83
  *
84
84
  * @param obj - Value to check.
85
85
  * @returns `true` if `undefined`, otherwise `false`.
86
86
  */
87
- static isUndefined(obj?: unknown): boolean;
87
+ static isUndefined(obj?: unknown): obj is undefined;
88
88
  /**
89
89
  * Checks whether a value evaluates to `true` according to common conventions.
90
90
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@controlium/utils",
3
- "version": "1.0.2-alpha.1",
3
+ "version": "1.0.2-alpha.3",
4
4
  "description": "Shared utilities for Controlium-based projects",
5
5
  "type": "module",
6
6
  "author": "Team Controllium contributors",
@@ -12,13 +12,11 @@
12
12
  "type": "git",
13
13
  "url": "https://github.com/TeamControlium/controlium-utils"
14
14
  },
15
- "main": "./dist/cjs/index.js",
16
15
  "module": "./dist/esm/index.js",
17
16
  "types": "./dist/types/index.d.ts",
18
17
  "exports": {
19
18
  ".": {
20
19
  "import": "./dist/esm/index.js",
21
- "require": "./dist/cjs/index.js",
22
20
  "types": "./dist/types/index.d.ts"
23
21
  }
24
22
  },
@@ -27,12 +25,11 @@
27
25
  ],
28
26
  "scripts": {
29
27
  "clean": "rm -rf dist coverage",
30
- "build:cjs": "tsc -p tsconfig.cjs.json",
31
- "build:esm": "tsc -p tsconfig.json",
32
- "build": "npm run clean && npm run build:cjs && npm run build:esm",
33
- "test": "jest --silent --runInBand",
34
- "test:debug": "jest --runInBand",
35
- "test:coverage": "jest --silent --coverage --runInBand",
28
+ "build:esm": "tsc -p tsconfig.build.json",
29
+ "build": "npm run clean && npm run build:esm",
30
+ "test": "vitest run",
31
+ "test:debug": "vitest run --reporter=verbose mock.spec",
32
+ "test:coverage": "vitest run --coverage",
36
33
  "lint": "eslint 'src/**/*.ts' --fix",
37
34
  "release": "semantic-release"
38
35
  },
@@ -41,7 +38,6 @@
41
38
  "controlium",
42
39
  "node",
43
40
  "esm",
44
- "cjs",
45
41
  "logger",
46
42
  "utilities"
47
43
  ],
@@ -52,63 +48,31 @@
52
48
  "date-fns": "^4.1.0",
53
49
  "date-fns-tz": "^3.2.0",
54
50
  "entities": "^6.0.1",
51
+ "json5": "^2.2.3",
55
52
  "jsonpath-plus": "^10.3.0",
56
53
  "jsonpointer": "^5.0.1",
57
54
  "jsonwebtoken": "^9.0.2",
58
55
  "lodash": "^4.17.12",
59
- "ps-tree": "^1.2.0"
56
+ "ps-tree": "^1.2.0",
57
+ "undici": "^8.1.0"
60
58
  },
61
59
  "devDependencies": {
62
- "@types/jest": "^29.0.0",
63
- "@types/jsonwebtoken": "^9.0.10",
64
- "@types/node": "^24.0.0",
65
- "@typescript-eslint/eslint-plugin": "^8.0.0",
66
- "@typescript-eslint/parser": "^8.0.0",
67
- "eslint": "^8.0.0",
68
- "jest": "^29.6.0",
69
- "ts-jest": "^29.4.2",
70
- "typescript": "^5.9.1",
71
- "semantic-release": "^24.0.0",
72
60
  "@semantic-release/changelog": "^6.0.0",
73
61
  "@semantic-release/commit-analyzer": "^13.0.0",
74
62
  "@semantic-release/git": "^10.0.0",
75
63
  "@semantic-release/npm": "^12.0.0",
76
- "@semantic-release/release-notes-generator": "^14.0.0"
64
+ "@semantic-release/release-notes-generator": "^14.0.0",
65
+ "@types/jsonwebtoken": "^9.0.10",
66
+ "@types/node": "^24.0.0",
67
+ "@typescript-eslint/eslint-plugin": "^8.58.0",
68
+ "@typescript-eslint/parser": "^8.58.0",
69
+ "@vitest/coverage-v8": "^4.1.4",
70
+ "eslint": "^8.0.0",
71
+ "semantic-release": "^24.0.0",
72
+ "typescript": "^6.0.2",
73
+ "vitest": "^4.1.4"
77
74
  },
78
75
  "publishConfig": {
79
76
  "access": "public"
80
- },
81
- "jest": {
82
- "moduleFileExtensions": [
83
- "js",
84
- "ts"
85
- ],
86
- "testMatch": [
87
- "**/*.spec.ts"
88
- ],
89
- "rootDir": "src",
90
- "transform": {
91
- "^.+\\.(t|j)s$": "ts-jest"
92
- },
93
- "transformIgnorePatterns": [],
94
- "coverageDirectory": "../coverage",
95
- "coverageReporters": [
96
- "html",
97
- "text",
98
- "lcov",
99
- "json-summary"
100
- ],
101
- "coverageThreshold": {
102
- "global": {
103
- "branches": 88,
104
- "functions": 90,
105
- "lines": 90,
106
- "statements": 90
107
- }
108
- },
109
- "testEnvironment": "node",
110
- "reporters": [
111
- "default"
112
- ]
113
77
  }
114
78
  }