@vzn/vx 0.0.339 → 0.0.340
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 +1 -1
- package/package.json +5 -5
- package/src/cache/output-index.ts +14 -2
- package/src/cli/foreign-flags.ts +68 -0
package/README.md
CHANGED
|
@@ -120,7 +120,7 @@ Give a task a cache block (what it reads, what it writes):
|
|
|
120
120
|
|
|
121
121
|
```ts
|
|
122
122
|
// packages/app/vx.config.ts
|
|
123
|
-
import { defineProject } from '@vzn/vx'
|
|
123
|
+
import { defineProject } from '@vzn/vx/config'
|
|
124
124
|
|
|
125
125
|
export default defineProject({
|
|
126
126
|
tasks: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vzn/vx",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.340",
|
|
4
4
|
"description": "A fast, correct task runner and build cache for JavaScript monorepos.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
"node": ">=18"
|
|
22
22
|
},
|
|
23
23
|
"optionalDependencies": {
|
|
24
|
-
"@vzn/vx-linux-x64": "0.0.
|
|
25
|
-
"@vzn/vx-linux-arm64": "0.0.
|
|
26
|
-
"@vzn/vx-darwin-x64": "0.0.
|
|
27
|
-
"@vzn/vx-darwin-arm64": "0.0.
|
|
24
|
+
"@vzn/vx-linux-x64": "0.0.340",
|
|
25
|
+
"@vzn/vx-linux-arm64": "0.0.340",
|
|
26
|
+
"@vzn/vx-darwin-x64": "0.0.340",
|
|
27
|
+
"@vzn/vx-darwin-arm64": "0.0.340"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@anthropic-ai/sandbox-runtime": "^0.0.76"
|
|
@@ -67,6 +67,8 @@ export class OutputIndex {
|
|
|
67
67
|
* hash refreshes rather than appends).
|
|
68
68
|
*/
|
|
69
69
|
replaceFileRows(hash: string, rows: ReadonlyArray<[string, number, number, number]>): void {
|
|
70
|
+
// A stamp taken for the rows this replaces describes their files, not these.
|
|
71
|
+
this.pendingStamps.delete(hash)
|
|
70
72
|
this.deleteOutputFiles.run(hash)
|
|
71
73
|
for (const [rel, size, mode, mtime] of rows) {
|
|
72
74
|
this.insertOutputFile.run(hash, rel, size, mode, mtime)
|
|
@@ -83,8 +85,9 @@ export class OutputIndex {
|
|
|
83
85
|
// warm-hit path (called up to 3× per hit) reuses one statement instead of
|
|
84
86
|
// recompiling on every call.
|
|
85
87
|
// A reader in the same process (`vx watch`'s next cycle, a test) sees
|
|
86
|
-
// the stamps taken, not only the ones flushed
|
|
87
|
-
|
|
88
|
+
// the stamps taken, not only the ones flushed: overlaid below from
|
|
89
|
+
// memory. A flush here committed a transaction per read, and a restore
|
|
90
|
+
// reads its rows twice.
|
|
88
91
|
const placeholders = hashes.map(() => '?').join(',')
|
|
89
92
|
const stmt = this.db.query(
|
|
90
93
|
`SELECT entry_hash, path, size_bytes, mode, mtime_ms, ino, ctime_ms FROM output_files WHERE entry_hash IN (${placeholders})`,
|
|
@@ -114,6 +117,15 @@ export class OutputIndex {
|
|
|
114
117
|
row.ino = r.ino
|
|
115
118
|
row.ctimeMs = r.ctime_ms
|
|
116
119
|
}
|
|
120
|
+
const pending = this.pendingStamps.get(r.entry_hash)
|
|
121
|
+
if (pending !== undefined) {
|
|
122
|
+
for (const [rel, ino, ctime] of pending) {
|
|
123
|
+
if (rel !== r.path) continue
|
|
124
|
+
row.ino = ino
|
|
125
|
+
row.ctimeMs = ctime
|
|
126
|
+
break
|
|
127
|
+
}
|
|
128
|
+
}
|
|
117
129
|
list.push(row)
|
|
118
130
|
}
|
|
119
131
|
return out
|
package/src/cli/foreign-flags.ts
CHANGED
|
@@ -163,6 +163,74 @@ export const FOREIGN_FLAGS: readonly ForeignFlag[] = [
|
|
|
163
163
|
vx: '`--exclude-dependencies`',
|
|
164
164
|
to: () => ['--exclude-dependencies'],
|
|
165
165
|
},
|
|
166
|
+
{
|
|
167
|
+
runner: 'turbo',
|
|
168
|
+
names: ['--color'],
|
|
169
|
+
value: false,
|
|
170
|
+
outcome: 'refuse',
|
|
171
|
+
vx: 'set `FORCE_COLOR=1`',
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
runner: 'turbo',
|
|
175
|
+
names: ['--no-color'],
|
|
176
|
+
value: false,
|
|
177
|
+
outcome: 'refuse',
|
|
178
|
+
vx: 'set `NO_COLOR=1`',
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
runner: 'turbo',
|
|
182
|
+
names: ['--heap', '--trace'],
|
|
183
|
+
value: true,
|
|
184
|
+
outcome: 'refuse',
|
|
185
|
+
vx: "use `--profile[=<path>]` for vx's own trace",
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
runner: 'turbo',
|
|
189
|
+
names: ['--login'],
|
|
190
|
+
value: true,
|
|
191
|
+
outcome: 'refuse',
|
|
192
|
+
vx: 'vx has no login: a remote cache is a plugin (`turboCache()` from @vzn/vx-migrate)',
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
runner: 'turbo',
|
|
196
|
+
names: ['--no-update-notifier'],
|
|
197
|
+
value: false,
|
|
198
|
+
outcome: 'refuse',
|
|
199
|
+
vx: 'vx prints no update notice: drop it',
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
runner: 'turbo',
|
|
203
|
+
names: ['--skip-infer'],
|
|
204
|
+
value: false,
|
|
205
|
+
outcome: 'refuse',
|
|
206
|
+
vx: 'vx runs the binary it is: drop it',
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
runner: 'turbo',
|
|
210
|
+
names: ['--root-turbo-json'],
|
|
211
|
+
value: true,
|
|
212
|
+
outcome: 'refuse',
|
|
213
|
+
vx: '`turbo()` reads the `turbo.json` at the workspace root: move it there',
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
runner: 'turbo',
|
|
217
|
+
names: [
|
|
218
|
+
'--experimental-otel-enabled',
|
|
219
|
+
'--experimental-otel-protocol',
|
|
220
|
+
'--experimental-otel-endpoint',
|
|
221
|
+
'--experimental-otel-timeout-ms',
|
|
222
|
+
'--experimental-otel-interval-ms',
|
|
223
|
+
'--experimental-otel-header',
|
|
224
|
+
'--experimental-otel-resource',
|
|
225
|
+
'--experimental-otel-metrics-run-summary',
|
|
226
|
+
'--experimental-otel-metrics-task-details',
|
|
227
|
+
'--experimental-otel-use-remote-cache-token',
|
|
228
|
+
],
|
|
229
|
+
value: true,
|
|
230
|
+
shown: '`--experimental-otel-*`',
|
|
231
|
+
outcome: 'refuse',
|
|
232
|
+
vx: 'telemetry is a plugin: `otel()` from @vzn/vx-otel in vx.workspace.ts',
|
|
233
|
+
},
|
|
166
234
|
{
|
|
167
235
|
runner: 'nx',
|
|
168
236
|
names: ['--parallel'],
|