@vzn/vx 0.0.92 → 0.0.94

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vzn/vx",
3
- "version": "0.0.92",
3
+ "version": "0.0.94",
4
4
  "description": "A fast, correct task runner and build cache for JavaScript monorepos.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -17,10 +17,10 @@
17
17
  "node": ">=18"
18
18
  },
19
19
  "optionalDependencies": {
20
- "@vzn/vx-linux-x64": "0.0.92",
21
- "@vzn/vx-linux-arm64": "0.0.92",
22
- "@vzn/vx-darwin-x64": "0.0.92",
23
- "@vzn/vx-darwin-arm64": "0.0.92"
20
+ "@vzn/vx-linux-x64": "0.0.94",
21
+ "@vzn/vx-linux-arm64": "0.0.94",
22
+ "@vzn/vx-darwin-x64": "0.0.94",
23
+ "@vzn/vx-darwin-arm64": "0.0.94"
24
24
  },
25
25
  "dependencies": {
26
26
  "@anthropic-ai/sandbox-runtime": "^0.0.76"
package/src/cli/run.ts CHANGED
@@ -156,7 +156,11 @@ export function parseRunArgs(args: readonly string[]): RunArgs {
156
156
  const v = a === '--concurrency' ? before[++i] : a.slice('--concurrency='.length)
157
157
  if (v === undefined) return { ...out, error: `--concurrency requires a value` }
158
158
  const n = parseConcurrency(v)
159
- if (n === null) return { ...out, error: `invalid concurrency: ${v}` }
159
+ if (n === null)
160
+ return {
161
+ ...out,
162
+ error: `invalid concurrency: ${v} (a positive integer, or a share of the cores such as 50%)`,
163
+ }
160
164
  out.concurrency = n
161
165
  } else if (a === '--all') {
162
166
  out.all = true
@@ -281,14 +285,14 @@ export function parseRunArgs(args: readonly string[]): RunArgs {
281
285
  const v = a === '--verbosity' ? before[++i] : a.slice('--verbosity='.length)
282
286
  if (v === undefined) return { ...out, error: `--verbosity requires a value` }
283
287
  const n = parseDecimalInt(v)
284
- if (n === null) return { ...out, error: `invalid verbosity: ${v}` }
288
+ if (n === null) return { ...out, error: `invalid verbosity: ${v} (a non-negative integer)` }
285
289
  out.verbosity = n
286
290
  } else if (a === '--dry') {
287
291
  out.dry = 'text'
288
292
  } else if (a?.startsWith('--dry=')) {
289
293
  const fmt = a.slice('--dry='.length)
290
294
  if (fmt !== 'text' && fmt !== 'json') {
291
- return { ...out, error: `invalid --dry value: ${fmt}` }
295
+ return { ...out, error: `invalid --dry value: ${fmt} (text or json)` }
292
296
  }
293
297
  out.dry = fmt
294
298
  } else if (a === '--graph') {
package/src/cli/show.ts CHANGED
@@ -36,6 +36,9 @@ export function parseShowArgs(args: readonly string[]): ShowArgs {
36
36
  else if (a.startsWith('-'))
37
37
  return { ...out, error: `unknown flag: ${a}${flagHint('show', a)}${seeHelp('show')}` }
38
38
  else if (out.target !== undefined) return { ...out, error: `unexpected argument: ${a}` }
39
+ // An empty name is a part of every name: its "did you mean" listed the
40
+ // whole workspace.
41
+ else if (a === '') return { ...out, error: 'empty target (omit it to list every project)' }
39
42
  else out.target = a
40
43
 
41
44
  if (format !== undefined) {
package/src/cli/why.ts CHANGED
@@ -86,7 +86,8 @@ export function parseWhyArgs(args: readonly string[]): WhyArgs {
86
86
  if (a.startsWith('-'))
87
87
  return { ...out, error: `unknown flag: ${a}${flagHint('why', a)}${seeHelp('why')}` }
88
88
  if (out.target !== undefined) return { ...out, error: `unexpected argument: ${a}` }
89
- out.target = a
89
+ // Empty is no task: read as a query it matched every recorded one.
90
+ if (a !== '') out.target = a
90
91
  }
91
92
  return out
92
93
  }
@@ -108,7 +109,11 @@ function suggest(query: string, ids: readonly string[]): string {
108
109
  }
109
110
  hits = nearMatches(query, byTask.keys()).flatMap((t) => byTask.get(t) ?? [])
110
111
  }
111
- return hits.length > 0 ? ` — did you mean ${hits.slice(0, 3).join(', ')}?` : ''
112
+ if (hits.length > 0) return ` — did you mean ${hits.slice(0, 3).join(', ')}?`
113
+ // No near name: say where to look, or that there is nothing yet.
114
+ return ids.length === 0
115
+ ? `; nothing has run here yet (vx run ${query}, then vx why)`
116
+ : '; `vx last --list` shows what has run'
112
117
  }
113
118
 
114
119
  /**