ai-unit-test-generator 1.4.4 → 1.4.5
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/CHANGELOG.md +7 -2
- package/lib/core/scorer.mjs +2 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
@@ -5,13 +5,18 @@ All notable changes to this project will be documented in this file.
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
7
7
|
|
8
|
-
## [1.4.
|
8
|
+
## [1.4.5] - 2025-01-11
|
9
|
+
|
10
|
+
### Fixed
|
11
|
+
- Fixed ESM import issue in `scorer.mjs` (removed `require`, use existing imports)
|
12
|
+
|
13
|
+
## [1.4.4] - 2025-01-11
|
9
14
|
|
10
15
|
### Fixed
|
11
16
|
- Fixed CLI template path to use `default.config.jsonc` instead of `.json`
|
12
17
|
- Fixed config auto-detection order: `ai-test.config.jsonc` → `ai-test.config.json`
|
13
18
|
|
14
|
-
## [1.4.3] - 2025-01-
|
19
|
+
## [1.4.3] - 2025-01-11
|
15
20
|
|
16
21
|
### Changed
|
17
22
|
- **Config file format**: Changed default config from `.json` to `.jsonc` with comprehensive inline comments
|
package/lib/core/scorer.mjs
CHANGED
@@ -31,13 +31,12 @@ function stripJsonComments(s) {
|
|
31
31
|
.replace(/(^|\s)\/\/.*$/gm, '')
|
32
32
|
}
|
33
33
|
function loadConfig(pathFromArg) {
|
34
|
-
const fs = require('fs')
|
35
34
|
const paths = [pathFromArg, 'ai-test.config.jsonc', 'ai-test.config.json']
|
36
35
|
for (const p of paths) {
|
37
36
|
if (!p) continue
|
38
37
|
try {
|
39
|
-
if (
|
40
|
-
const raw =
|
38
|
+
if (existsSync(p)) {
|
39
|
+
const raw = readFileSync(p, 'utf8')
|
41
40
|
return JSON.parse(stripJsonComments(raw))
|
42
41
|
}
|
43
42
|
} catch {}
|