You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat:support monorepo(output separate and combined)
* feat:add cli options monorepo mode
* feat:add fallback logic
* feat:delete the monorepo yarn detect(due to impact the signle repository)
* feat:add monorepo separate repository output file ignore
* feat:optimize monorepo parse code into function
* feat:optimize monorepo parse separately in cluster workers
* feat:add the ut for monorepo
* feat:optimize the large monorepo parse(dynamically select parsing strategy)
* feat:support edenx workspaces mode
* feat:fill the readme
* fix:cluster mode graph building - Add UNKNOWN node creation for missing dependencies
* feat: modify the ut
* fix:fix the ut
---------
Co-authored-by: yewanting <yewanting@bytedance.com>
A TypeScript AST parser that extracts method calls, variable references, and dependencies.
3
+
A TypeScript AST parser that extracts method calls, variable references, and dependencies with advanced monorepo support and intelligent parsing strategies.
4
4
5
-
Usage:
5
+
## Features
6
+
7
+
- 🚀 **Monorepo Support**: Intelligent detection and parsing of monorepo projects
8
+
- ⚡ **Smart Parsing Strategy**: Automatic selection between single-process and cluster-based parsing
9
+
- 📦 **Multiple Monorepo Formats**: Support for Edex, pnpm workspaces, Lerna
10
+
- 🎯 **Flexible Output Modes**: Combined or separate repo output for monorepo packages
| -t, --tsconfig <file> | Path to tsconfig.json file, if you provide a relative path, it will be relative to **the directory of the input file** (default: "tsconfig.json") |
21
-
| --no-dist | Ignore dist folder and its contents |
22
-
| --pretty | Pretty print JSON output |
23
-
| --src <dirs> | Directory paths to include (comma-separated) |
| -t, --tsconfig <file> | Path to tsconfig.json file, if you provide a relative path, it will be relative to **the directory of the input file** (default: "tsconfig.json") |
44
+
| --no-dist | Ignore dist folder and its contents |
45
+
| --pretty | Pretty print JSON output |
46
+
| --src <dirs> | Directory paths to include (comma-separated) |
The parser intelligently selects the optimal parsing strategy based on project size:
63
+
64
+
-**Single Process Mode**: For small to medium projects
65
+
-**Cluster Mode**: For large projects with parallel processing across multiple CPU cores
29
66
30
67
## Notes
31
68
32
-
1. MUST correctly specify the location of the current project's `tsconfig.json`.
69
+
1. MUST correctly specify the location of the current project's `tsconfig.json`.
33
70
34
71
2. If you provide a relative path to argument `--tsconfig`, it will be relative to **the directory of the input file**.
35
72
36
73
3. Before usage, please configure the dependencies for your TypeScript project, such as running npm install and setting up cross-package dependencies in monorepo.
37
74
38
-
4. If the repository you're analyzing is too large, you may need to adjust Node.js's maximum memory allocation.
75
+
4. For large monorepo projects, the parser will automatically use cluster-based processing to improve performance.
76
+
77
+
5. If the repository you're analyzing is too large, you may need to adjust Node.js's maximum memory allocation.
39
78
40
79
## Terminology
41
80
@@ -46,10 +85,9 @@ See `./index.ts` for more information.
46
85
47
86
This terminology mapping is used consistently throughout the parser to align with the UniAST specification, but it may initially seem counterintuitive to developers familiar with JavaScript/TypeScript conventions.
48
87
49
-
50
88
## Some known issues
51
89
52
90
- When there is a circular dependency, the parser will choose one of the dependencies as the main dependency.
53
91
- The parser does not handle dynamic imports.
54
92
- The parser does not handle TypeScript decorators.
55
-
- For external symbol which has no `.d.ts` declaration file, the parser will not be able to resolve the symbol.
93
+
- For external symbol which has no `.d.ts` declaration file, the parser will not be able to resolve the symbol.
0 commit comments