ghost-import-hunter 2.0.0 → 2.0.1
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/README.md +8 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -15,6 +15,8 @@
|
|
|
15
15
|
## 🚀 Features
|
|
16
16
|
|
|
17
17
|
- **Deterministic Validation** - Verify every import against your actual installed modules. No guessing or regex.
|
|
18
|
+
- **Deep Export Analysis** - Uses TypeScript Compiler API to correctly resolve `export *`, re-exports, and aliases.
|
|
19
|
+
- **Local File Scanning** - Validates imports from your own local files, not just external packages.
|
|
18
20
|
- **Zero Configuration** - Works out of the box. Just run `npx ghost-hunter` in your project root.
|
|
19
21
|
- **CI/CD Ready** - Fails the build if hallucinations are detected. Preventing bad code from merging.
|
|
20
22
|
|
|
@@ -54,9 +56,12 @@ Ghost Hunter uses three core technologies to ensure your code is safe:
|
|
|
54
56
|
**Role:** Finding your files.
|
|
55
57
|
Just like your terminal finds files when you type `ls *.ts`, Ghost Hunter uses `glob` to scan your entire project's TypeScript and JavaScript files, ignoring junk like `node_modules`.
|
|
56
58
|
|
|
57
|
-
### 2.
|
|
58
|
-
**Role:**
|
|
59
|
-
|
|
59
|
+
### 2. TypeScript Compiler API - The Brain
|
|
60
|
+
**Role:** Understanding your code.
|
|
61
|
+
Unlike v1 which used Regex, v2.0 uses the real **TypeScript Compiler API** to parse your code, resolve symbols, and track exports across files. This allows it to:
|
|
62
|
+
- Follow `export * from ...` chains.
|
|
63
|
+
- Understand aliased imports (`import { foo as bar }`).
|
|
64
|
+
- Detect missing exports in local files.
|
|
60
65
|
|
|
61
66
|
### 3. `chalk` - The Reporter
|
|
62
67
|
**Role:** Making sense of the output.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ghost-import-hunter",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "Deterministic tool to detect AI hallucinations and code bloat by verifying import safety against installed node_modules",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -45,4 +45,4 @@
|
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"ts-node": "^10.9.2"
|
|
47
47
|
}
|
|
48
|
-
}
|
|
48
|
+
}
|