@vzn/vx 0.0.412 → 0.0.413
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.
|
|
3
|
+
"version": "0.0.413",
|
|
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.
|
|
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.413",
|
|
25
|
+
"@vzn/vx-linux-arm64": "0.0.413",
|
|
26
|
+
"@vzn/vx-darwin-x64": "0.0.413",
|
|
27
|
+
"@vzn/vx-darwin-arm64": "0.0.413"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@anthropic-ai/sandbox-runtime": "^0.0.76"
|
|
@@ -10,7 +10,7 @@ import { unlink } from 'node:fs/promises'
|
|
|
10
10
|
import path from 'node:path'
|
|
11
11
|
import { executablePath, relPosix, UserError } from '../util/index.js'
|
|
12
12
|
import type { ProjectMeta } from './workspace.js'
|
|
13
|
-
import { loadWorkspace, unreachedHint, unreachedPackages } from './workspace.js'
|
|
13
|
+
import { loadWorkspace, reachesManifest, unreachedHint, unreachedPackages } from './workspace.js'
|
|
14
14
|
import { WORKSPACE_CONFIG_FILENAMES } from './project-loader.js'
|
|
15
15
|
|
|
16
16
|
/**
|
|
@@ -357,8 +357,10 @@ export async function applyMigration(args: ApplyMigrationArgs): Promise<number>
|
|
|
357
357
|
// Globs that reach no package: "no scripts" was true and named nothing
|
|
358
358
|
// to fix (M-42).
|
|
359
359
|
const globs = workspace?.packageGlobs.filter((g) => g !== '.') ?? []
|
|
360
|
+
// Asked of the globs, not of `metas`: a nameless or shared-name member
|
|
361
|
+
// is matched yet absent from `metas` (M-46).
|
|
360
362
|
const noMembers =
|
|
361
|
-
globs.length > 0 &&
|
|
363
|
+
workspace !== undefined && globs.length > 0 && !(await reachesManifest(workspace))
|
|
362
364
|
? [
|
|
363
365
|
`the workspace globs (${globs.map((g) => `"${g}"`).join(', ')}) match no package.json: add a package under one, or fix the glob`,
|
|
364
366
|
]
|
|
@@ -395,6 +395,28 @@ export function memberBaseDirs(workspace: Workspace): string[] {
|
|
|
395
395
|
return [...bases]
|
|
396
396
|
}
|
|
397
397
|
|
|
398
|
+
/**
|
|
399
|
+
* True when a member glob reaches a `package.json` other than the root's,
|
|
400
|
+
* addressable or not: a nameless manifest, or two sharing a name, is
|
|
401
|
+
* matched and left out, not unmatched (M-46).
|
|
402
|
+
*/
|
|
403
|
+
export async function reachesManifest(workspace: Workspace): Promise<boolean> {
|
|
404
|
+
const { positive, negative } = splitPackageGlobs(workspace.packageGlobs)
|
|
405
|
+
const root = path.resolve(workspace.root)
|
|
406
|
+
for (const pattern of positive) {
|
|
407
|
+
for (const dir of await memberDirs(workspace.root, pattern)) {
|
|
408
|
+
if (path.resolve(dir) === root) continue
|
|
409
|
+
if (negative.length > 0 && excludedBy(relPosix(workspace.root, dir), negative)) continue
|
|
410
|
+
try {
|
|
411
|
+
if ((await stat(path.join(dir, 'package.json'))).isFile()) return true
|
|
412
|
+
} catch (err) {
|
|
413
|
+
absent(err, undefined)
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
return false
|
|
418
|
+
}
|
|
419
|
+
|
|
398
420
|
/**
|
|
399
421
|
* The directories a workspace glob names. For the `<dir>/*` shape this is
|
|
400
422
|
* one readdir of `<dir>` — the same answer `Bun.Glob` gives, at a third of
|