@front-ops/domino 0.7.2 → 1.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 +35 -1
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -17,6 +17,7 @@ domino is a drop-in replacement for the TypeScript version of [traf](https://git
|
|
|
17
17
|
|
|
18
18
|
- **Semantic Change Detection**: Analyzes actual code changes at the AST level, not just file changes
|
|
19
19
|
- **Cross-File Reference Tracking**: Follows symbol references across your entire workspace
|
|
20
|
+
- **Lockfile Change Detection**: Detects dependency version changes in npm, yarn, pnpm, and bun lockfiles and traces affected projects
|
|
20
21
|
- **Fast Oxc Parser**: 3-5x faster than TypeScript's compiler API
|
|
21
22
|
- **Workspace Support**: Works with Nx, Turborepo, and generic npm/yarn/pnpm/bun workspaces
|
|
22
23
|
- **Module Resolution**: Uses oxc_resolver (same as Rolldown and Nova) for accurate module resolution
|
|
@@ -112,6 +113,37 @@ domino affected --report report.html
|
|
|
112
113
|
- `--report <PATH>`: Generate a detailed analysis report
|
|
113
114
|
- `--debug`: Enable debug logging
|
|
114
115
|
- `--cwd <PATH>`: Set the current working directory
|
|
116
|
+
- `--lockfile-strategy <STRATEGY>`: Lockfile change detection strategy (default: `direct`)
|
|
117
|
+
|
|
118
|
+
### Lockfile Change Detection
|
|
119
|
+
|
|
120
|
+
domino automatically detects when your lockfile changes and identifies which projects are affected by dependency version updates. This works with all major package managers:
|
|
121
|
+
|
|
122
|
+
| Package Manager | Lockfile |
|
|
123
|
+
| --------------- | ------------------- |
|
|
124
|
+
| npm | `package-lock.json` |
|
|
125
|
+
| yarn | `yarn.lock` |
|
|
126
|
+
| pnpm | `pnpm-lock.yaml` |
|
|
127
|
+
| bun | `bun.lock` |
|
|
128
|
+
|
|
129
|
+
Three strategies are available via `--lockfile-strategy`:
|
|
130
|
+
|
|
131
|
+
- **`none`** — Ignore lockfile changes entirely
|
|
132
|
+
- **`direct`** (default) — Mark projects that directly import an affected dependency
|
|
133
|
+
- **`full`** — Like `direct`, but also traces the full reference chain (e.g. if `lib-a` changed and `ProjectA` imports it, `full` follows all re-exports of `lib-a` symbols to find additional affected projects)
|
|
134
|
+
|
|
135
|
+
The detection is transitive: if a deeply nested dependency changes, domino walks the reverse dependency graph to find which direct dependency was affected, then finds all projects importing that dependency.
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
# Default: detect lockfile changes with "direct" strategy
|
|
139
|
+
domino affected
|
|
140
|
+
|
|
141
|
+
# Disable lockfile detection
|
|
142
|
+
domino affected --lockfile-strategy none
|
|
143
|
+
|
|
144
|
+
# Full reference chain tracing
|
|
145
|
+
domino affected --lockfile-strategy full
|
|
146
|
+
```
|
|
115
147
|
|
|
116
148
|
## How It Works
|
|
117
149
|
|
|
@@ -119,7 +151,8 @@ domino affected --report report.html
|
|
|
119
151
|
2. **Semantic Parsing**: Parses all TypeScript/JavaScript files using Oxc
|
|
120
152
|
3. **Symbol Resolution**: Identifies which symbols (functions, classes, constants) were modified
|
|
121
153
|
4. **Reference Finding**: Recursively finds all cross-file references to those symbols
|
|
122
|
-
5. **
|
|
154
|
+
5. **Lockfile Analysis**: Detects dependency version changes and traces affected imports
|
|
155
|
+
6. **Project Mapping**: Maps affected files to their owning projects
|
|
123
156
|
|
|
124
157
|
## Performance
|
|
125
158
|
|
|
@@ -147,6 +180,7 @@ Thanks to Rust and Oxc, domino is significantly faster than the TypeScript versi
|
|
|
147
180
|
- **Workspace Discovery** (`src/workspace/`): Discovers projects in Nx, Turbo, and generic npm/yarn/pnpm/bun workspaces
|
|
148
181
|
- **Semantic Analyzer** (`src/semantic/analyzer.rs`): Uses Oxc to parse and analyze TypeScript/JavaScript
|
|
149
182
|
- **Reference Finder** (`src/semantic/reference_finder.rs`): Tracks cross-file symbol references
|
|
183
|
+
- **Lockfile Analyzer** (`src/lockfile.rs`): Parses lockfiles, builds reverse dependency graphs, and detects affected packages
|
|
150
184
|
- **Core Algorithm** (`src/core.rs`): Orchestrates the affected detection logic
|
|
151
185
|
|
|
152
186
|
### Key Technologies
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@front-ops/domino",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "True Affected - Semantic change detection for monorepos",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": {
|
|
@@ -57,10 +57,10 @@
|
|
|
57
57
|
"format:toml": "taplo format",
|
|
58
58
|
"format:rs": "cargo fmt",
|
|
59
59
|
"lint": "oxlint .",
|
|
60
|
-
"prepublishOnly": "napi prepublish -t npm",
|
|
60
|
+
"prepublishOnly": "napi prepublish -t npm --no-gh-release",
|
|
61
61
|
"test": "ava",
|
|
62
62
|
"preversion": "napi build --platform && git add .",
|
|
63
|
-
"version": "napi version",
|
|
63
|
+
"version": "napi version && node scripts/sync-cargo-version.js && git add Cargo.toml",
|
|
64
64
|
"prepare": "husky"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
@@ -80,13 +80,13 @@
|
|
|
80
80
|
"typescript": "^5.9.2"
|
|
81
81
|
},
|
|
82
82
|
"optionalDependencies": {
|
|
83
|
-
"@front-ops/domino-win32-x64-msvc": "0.
|
|
84
|
-
"@front-ops/domino-darwin-x64": "0.
|
|
85
|
-
"@front-ops/domino-linux-x64-gnu": "0.
|
|
86
|
-
"@front-ops/domino-linux-x64-musl": "0.
|
|
87
|
-
"@front-ops/domino-darwin-arm64": "0.
|
|
88
|
-
"@front-ops/domino-linux-arm64-musl": "0.
|
|
89
|
-
"@front-ops/domino-linux-arm64-gnu": "0.
|
|
83
|
+
"@front-ops/domino-win32-x64-msvc": "1.0.1",
|
|
84
|
+
"@front-ops/domino-darwin-x64": "1.0.1",
|
|
85
|
+
"@front-ops/domino-linux-x64-gnu": "1.0.1",
|
|
86
|
+
"@front-ops/domino-linux-x64-musl": "1.0.1",
|
|
87
|
+
"@front-ops/domino-darwin-arm64": "1.0.1",
|
|
88
|
+
"@front-ops/domino-linux-arm64-musl": "1.0.1",
|
|
89
|
+
"@front-ops/domino-linux-arm64-gnu": "1.0.1"
|
|
90
90
|
},
|
|
91
91
|
"lint-staged": {
|
|
92
92
|
"*.@(js|ts|tsx)": [
|