pumuki-ast-hooks 6.0.8 → 6.0.10
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/docs/RELEASE_NOTES.md
CHANGED
|
@@ -1,3 +1,31 @@
|
|
|
1
|
+
# Release Notes - v6.0.10
|
|
2
|
+
|
|
3
|
+
**Release Date**: January 13, 2026
|
|
4
|
+
**Type**: Patch Release
|
|
5
|
+
**Compatibility**: Fully backward compatible with 6.0.x
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## ✅ Fixes
|
|
10
|
+
|
|
11
|
+
- **iOS DIP detector**: protocol-like types are detected even with module prefixes or optional markers (e.g. `Domain.LoginUseCase?`).
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# Release Notes - v6.0.9
|
|
16
|
+
|
|
17
|
+
**Release Date**: January 13, 2026
|
|
18
|
+
**Type**: Patch Release
|
|
19
|
+
**Compatibility**: Fully backward compatible with 6.0.x
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## ✅ Fixes
|
|
24
|
+
|
|
25
|
+
- **iOS DIP detector**: protocol-named types like `LoginUseCase` are treated as abstract unless they are `*Impl`.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
1
29
|
# Release Notes - v6.0.8
|
|
2
30
|
|
|
3
31
|
**Release Date**: January 13, 2026
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pumuki-ast-hooks",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.10",
|
|
4
4
|
"description": "Enterprise-grade AST Intelligence System with multi-platform support (iOS, Android, Backend, Frontend) and Feature-First + DDD + Clean Architecture enforcement. Includes dynamic violations API for intelligent querying.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -35,13 +35,7 @@ describe('DIValidationService', () => {
|
|
|
35
35
|
"'TestViewModel' depends on concrete 'APIClient' - use protocol"
|
|
36
36
|
);
|
|
37
37
|
|
|
38
|
-
expect(mockAnalyzer.pushFinding).
|
|
39
|
-
'ios.solid.dip.concrete_dependency',
|
|
40
|
-
'high',
|
|
41
|
-
'TestViewModel.swift',
|
|
42
|
-
10,
|
|
43
|
-
"'TestViewModel' depends on concrete 'UserRepository' - use protocol"
|
|
44
|
-
);
|
|
38
|
+
expect(mockAnalyzer.pushFinding).toHaveBeenCalledTimes(1);
|
|
45
39
|
});
|
|
46
40
|
|
|
47
41
|
it('should skip allowed types', async () => {
|
|
@@ -94,5 +88,23 @@ describe('DIValidationService', () => {
|
|
|
94
88
|
|
|
95
89
|
expect(mockAnalyzer.pushFinding).not.toHaveBeenCalled();
|
|
96
90
|
});
|
|
91
|
+
|
|
92
|
+
it('should skip protocol-named concrete-like types', async () => {
|
|
93
|
+
const properties = [
|
|
94
|
+
{ 'key.name': 'loginUseCase', 'key.typename': 'LoginUseCase' },
|
|
95
|
+
{ 'key.name': 'logoutUseCase', 'key.typename': 'LogoutUseCase' },
|
|
96
|
+
{ 'key.name': 'currentUserUseCase', 'key.typename': 'Domain.UserRetrievalUseCase?' }
|
|
97
|
+
];
|
|
98
|
+
|
|
99
|
+
await diValidationService.validateDependencyInjection(
|
|
100
|
+
mockAnalyzer,
|
|
101
|
+
properties,
|
|
102
|
+
'AuthLoginRepositoryImpl.swift',
|
|
103
|
+
'AuthLoginRepositoryImpl',
|
|
104
|
+
1
|
|
105
|
+
);
|
|
106
|
+
|
|
107
|
+
expect(mockAnalyzer.pushFinding).not.toHaveBeenCalled();
|
|
108
|
+
});
|
|
97
109
|
});
|
|
98
110
|
});
|
|
@@ -39,6 +39,10 @@ class ConcreteDependencyStrategy extends DIStrategy {
|
|
|
39
39
|
return true;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
+
if (this._isLikelyProtocolType(typename)) {
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
|
|
42
46
|
if (this._isGenericTypeParameter(typename, propName, className)) {
|
|
43
47
|
return true;
|
|
44
48
|
}
|
|
@@ -94,6 +98,19 @@ class ConcreteDependencyStrategy extends DIStrategy {
|
|
|
94
98
|
|
|
95
99
|
return hasConcretePattern && !hasProtocolIndicator;
|
|
96
100
|
}
|
|
101
|
+
|
|
102
|
+
_isLikelyProtocolType(typename) {
|
|
103
|
+
const normalized = typename
|
|
104
|
+
.replace(/^(any|some)\s+/, '')
|
|
105
|
+
.replace(/[!?]/g, '')
|
|
106
|
+
.split('.')
|
|
107
|
+
.pop() || typename;
|
|
108
|
+
|
|
109
|
+
if (/Impl$/.test(normalized)) {
|
|
110
|
+
return false;
|
|
111
|
+
}
|
|
112
|
+
return /UseCase$|Repository$/.test(normalized);
|
|
113
|
+
}
|
|
97
114
|
}
|
|
98
115
|
|
|
99
116
|
module.exports = ConcreteDependencyStrategy;
|