@aiready/consistency 0.21.2 → 0.21.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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @aiready/consistency@0.21.2 build /Users/pengcao/projects/aiready/packages/consistency
2
+ > @aiready/consistency@0.21.3 build /Users/pengcao/projects/aiready/packages/consistency
3
3
  > tsup src/index.ts src/cli.ts --format cjs,esm --dts
4
4
 
5
5
  CLI Building entry: src/cli.ts, src/index.ts
@@ -8,15 +8,15 @@ CLI tsup v8.5.1
8
8
  CLI Target: es2020
9
9
  CJS Build start
10
10
  ESM Build start
11
- CJS dist/cli.js 41.01 KB
12
- CJS dist/index.js 35.42 KB
13
- CJS ⚡️ Build success in 100ms
14
- ESM dist/index.mjs 3.27 KB
15
11
  ESM dist/cli.mjs 8.85 KB
16
12
  ESM dist/chunk-ZG3KFSD3.mjs 30.58 KB
17
- ESM ⚡️ Build success in 100ms
13
+ ESM dist/index.mjs 3.27 KB
14
+ ESM ⚡️ Build success in 335ms
15
+ CJS dist/cli.js 41.01 KB
16
+ CJS dist/index.js 35.42 KB
17
+ CJS ⚡️ Build success in 355ms
18
18
  DTS Build start
19
- DTS ⚡️ Build success in 7814ms
19
+ DTS ⚡️ Build success in 8292ms
20
20
  DTS dist/cli.d.ts 20.00 B
21
21
  DTS dist/index.d.ts 3.94 KB
22
22
  DTS dist/cli.d.mts 20.00 B
@@ -1,59 +1,32 @@
1
1
 
2
- > @aiready/consistency@0.21.1 test /Users/pengcao/projects/aiready/packages/consistency
2
+ > @aiready/consistency@0.21.2 test /Users/pengcao/projects/aiready/packages/consistency
3
3
  > vitest run
4
4
 
5
5
 
6
6
   RUN  v4.0.18 /Users/pengcao/projects/aiready/packages/consistency
7
7
 
8
- ✓ src/__tests__/naming-constants.test.ts (14 tests) 11ms
9
- ✓ dist/__tests__/scoring.test.js (8 tests) 11ms
10
- ✓ src/__tests__/scope-tracker.test.ts (11 tests) 13ms
11
- ✓ src/__tests__/scoring.test.ts (8 tests) 3ms
12
- ✓ src/__tests__/language-filter.test.ts (3 tests) 6ms
13
- Sourcemap for "/Users/pengcao/projects/aiready/packages/consistency/dist/analyzers/naming-python.js" points to missing source files
14
- ✓ dist/__tests__/language-filter.test.js (3 tests) 3ms
15
- ❯ src/__tests__/naming.test.ts (5 tests | 1 failed) 6ms
16
-  × should detect single letter variables 4ms
17
- ✓ should not detect common loop variables 0ms
18
- ✓ should detect snake_case in TypeScript files 0ms
19
- ✓ should not detect snake_case in non-TS/JS files 0ms
20
- ✓ should detect vague short names 0ms
21
- ✓ src/__tests__/provider.test.ts (2 tests) 6ms
8
+ ✓ src/__tests__/naming-constants.test.ts (14 tests) 3ms
9
+ ✓ src/__tests__/scope-tracker.test.ts (11 tests) 7ms
10
+ ✓ dist/__tests__/scoring.test.js (8 tests) 3ms
11
+ ✓ src/__tests__/naming.test.ts (5 tests) 6ms
22
12
  stdout | src/__tests__/contract.test.ts > Consistency Spoke Contract Validation > should produce output matching the SpokeOutput contract
23
13
  Consistency: Skipping unparseable file file1.ts: ENOENT: no such file or directory, open 'file1.ts'
24
14
 
25
- ✓ src/__tests__/contract.test.ts (1 test) 22ms
26
- ✓ dist/__tests__/analyzer.test.js (18 tests) 834ms
27
- ✓ should analyze naming issues  387ms
28
- ✓ should detect minimum severity filtering  332ms
29
- ✓ src/__tests__/analyzer.test.ts (21 tests) 1247ms
30
- ✓ should analyze naming issues  642ms
31
-
32
- ⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯
33
-
34
-  FAIL  src/__tests__/naming.test.ts > analyzeNaming > single letter variables detection > should detect single letter variables
35
- AssertionError: expected [ …(2) ] to have a length of 3 but got 2
36
-
37
- - Expected
38
- + Received
39
-
40
- - 3
41
- + 2
42
-
43
-  ❯ src/__tests__/naming.test.ts:25:22
44
-  23|  const issues = await analyzeNaming(['test.ts']);
45
-  24| 
46
-  25|  expect(issues).toHaveLength(3);
47
-  |  ^
48
-  26|  expect(issues[0].type).toBe('poor-naming');
49
-  27|  expect(issues[0].suggestion).toContain('single letter');
50
-
51
- ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯
52
-
53
-
54
-  Test Files  1 failed | 10 passed (11)
55
-  Tests  1 failed | 93 passed (94)
56
-  Start at  14:03:17
57
-  Duration  4.89s (transform 10.22s, setup 0ms, import 26.32s, tests 2.16s, environment 1ms)
15
+ ✓ src/__tests__/contract.test.ts (1 test) 11ms
16
+ Sourcemap for "/Users/pengcao/projects/aiready/packages/consistency/dist/analyzers/naming-python.js" points to missing source files
17
+ ✓ src/__tests__/provider.test.ts (2 tests) 5ms
18
+ ✓ dist/__tests__/language-filter.test.js (3 tests) 5ms
19
+ ✓ src/__tests__/scoring.test.ts (8 tests) 4ms
20
+ ✓ src/__tests__/language-filter.test.ts (3 tests) 6ms
21
+ ✓ dist/__tests__/analyzer.test.js (18 tests) 1483ms
22
+ ✓ should analyze naming issues  583ms
23
+ ✓ should detect minimum severity filtering  767ms
24
+ ✓ src/__tests__/analyzer.test.ts (21 tests) 1633ms
25
+ ✓ should analyze naming issues  851ms
26
+ ✓ should detect minimum severity filtering  536ms
27
+
28
+  Test Files  11 passed (11)
29
+  Tests  94 passed (94)
30
+  Start at  14:30:43
31
+  Duration  5.18s (transform 3.92s, setup 0ms, import 24.48s, tests 3.17s, environment 1ms)
58
32
 
59
-  ELIFECYCLE  Test failed. See above for more details.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiready/consistency",
3
- "version": "0.21.2",
3
+ "version": "0.21.3",
4
4
  "description": "Detects consistency issues in naming, patterns, and architecture that confuse AI models",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -43,7 +43,7 @@
43
43
  "@typescript-eslint/typescript-estree": "^8.53.0",
44
44
  "chalk": "^5.3.0",
45
45
  "commander": "^14.0.0",
46
- "@aiready/core": "0.24.2"
46
+ "@aiready/core": "0.24.3"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@types/node": "^24.0.0",
@@ -15,7 +15,7 @@ describe('analyzeNaming', () => {
15
15
  describe('single letter variables detection', () => {
16
16
  it('should detect single letter variables', async () => {
17
17
  const mockContent = `const a = 10;
18
- let b = 20;
18
+ let e = 20;
19
19
  var c = 30;`;
20
20
 
21
21
  (readFileSync as ReturnType<typeof vi.fn>).mockReturnValue(mockContent);