@vzn/vx 0.0.404 → 0.0.406

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.404",
3
+ "version": "0.0.406",
4
4
  "description": "The fastest 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.404",
25
- "@vzn/vx-linux-arm64": "0.0.404",
26
- "@vzn/vx-darwin-x64": "0.0.404",
27
- "@vzn/vx-darwin-arm64": "0.0.404"
24
+ "@vzn/vx-linux-x64": "0.0.406",
25
+ "@vzn/vx-linux-arm64": "0.0.406",
26
+ "@vzn/vx-darwin-x64": "0.0.406",
27
+ "@vzn/vx-darwin-arm64": "0.0.406"
28
28
  },
29
29
  "dependencies": {
30
30
  "@anthropic-ai/sandbox-runtime": "^0.0.76"
@@ -874,6 +874,25 @@ export function migrateScripts(
874
874
  `\`${sibling}\` runs another member's work outside the graph, again beside that member's own task: name that task under dependsOn (\`<member>#<task>\`) and drop it from the command`,
875
875
  )
876
876
  }
877
+ // A chain of this package's own scripts (`check: pnpm run build &&
878
+ // pnpm run lint`) ran each again inside the command, beside the task
879
+ // of that name: `vx run check` built twice. The chain's order may
880
+ // matter, so it is named rather than turned into a group.
881
+ const ownRuns = own
882
+ .split(/&&|\|\||;/)
883
+ .map((part) => part.trim())
884
+ .filter((part) => {
885
+ const d = delegatedScript(part)
886
+ return d !== null && d !== name && isTask(d)
887
+ })
888
+ if (ownRuns.length > 0) {
889
+ const list = ownRuns.map((r) => `\`${r}\``).join(', ')
890
+ todos.push(
891
+ ownRuns.length === 1
892
+ ? `${list} runs this package's own task again inside the command, beside that task: name it under dependsOn and drop it from the command`
893
+ : `${list} run this package's own tasks again inside the command, beside those tasks: name them under dependsOn and drop them from the command`,
894
+ )
895
+ }
877
896
  const exec: Record<string, unknown> = { command }
878
897
  const npm = npmEnv(command, name, hooks.length > 0)
879
898
  if (Object.keys(npm.define).length > 0) exec['env'] = { define: npm.define }
@@ -568,7 +568,18 @@ export async function discoverProjects(
568
568
  .text()
569
569
  .catch((err: unknown) => absent(err, null)),
570
570
  ])
571
- if (text === null) return null
571
+ if (text === null) {
572
+ // A member dir with a vx config and no manifest was skipped without
573
+ // a word: `--all` said no package matched, and a run from inside
574
+ // it "not inside a project" (D-128). The config was found in the
575
+ // same flight as the failed read, so naming it costs nothing.
576
+ if (configPath !== null) {
577
+ process.stderr.write(
578
+ `vx: ${relPosix(workspace.root, dir)} has a vx config but no package.json — skipped: vx names a project by its package.json "name"\n`,
579
+ )
580
+ }
581
+ return null
582
+ }
572
583
  const pkg = parsePackageJson(text, pkgJsonPath)
573
584
  return { dir, pkg, configPath }
574
585
  }),
@@ -604,7 +615,12 @@ export async function discoverProjects(
604
615
  projects.push({ name, dir, packageJson: pkg, configPath })
605
616
  continue
606
617
  }
607
- const dirs = group.map((e) => relPosix(workspace.root, e.dir)).sort()
618
+ // The root's own manifest is '' relative to itself, and the refusal read
619
+ // "in workspace: and packages/a" (D-127).
620
+ const dirs = group
621
+ .map((e) => relPosix(workspace.root, e.dir))
622
+ .sort()
623
+ .map((d) => (d === '' ? 'the workspace root' : d))
608
624
  // pnpm accepts two manifests of one name (vite's playground, sveltejs/kit's
609
625
  // test apps); vx cannot, since a project is addressed by it. Like a
610
626
  // nameless one, a pair that declares no vx tasks is left out, so the