@vzn/vx 0.0.134 → 0.0.135
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.135",
|
|
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.
|
|
21
|
-
"@vzn/vx-linux-arm64": "0.0.
|
|
22
|
-
"@vzn/vx-darwin-x64": "0.0.
|
|
23
|
-
"@vzn/vx-darwin-arm64": "0.0.
|
|
20
|
+
"@vzn/vx-linux-x64": "0.0.135",
|
|
21
|
+
"@vzn/vx-linux-arm64": "0.0.135",
|
|
22
|
+
"@vzn/vx-darwin-x64": "0.0.135",
|
|
23
|
+
"@vzn/vx-darwin-arm64": "0.0.135"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@anthropic-ai/sandbox-runtime": "^0.0.76"
|
|
@@ -180,6 +180,22 @@ function npmEnv(
|
|
|
180
180
|
return { define, unset, readsManifest }
|
|
181
181
|
}
|
|
182
182
|
|
|
183
|
+
/**
|
|
184
|
+
* A script that never exits by design (D-40): a `watch` segment in its
|
|
185
|
+
* name (`build:watch`, `watch-css`), a `--watch` flag, `tsc -w` /
|
|
186
|
+
* `rollup -w`, or nodemon. Run as a plain task it held its dependents
|
|
187
|
+
* forever. A bare `-w` elsewhere is not read: `npm run x -w pkg` is a
|
|
188
|
+
* workspace.
|
|
189
|
+
*/
|
|
190
|
+
function isWatcher(name: string, command: string): boolean {
|
|
191
|
+
if (name.split(/[:\-_.]/).includes('watch')) return true
|
|
192
|
+
return (
|
|
193
|
+
/(?:^|\s)--watch(?:All)?(?:[=\s]|$)/.test(command) ||
|
|
194
|
+
/\b(?:tsc|rollup)\b[^&|;]*\s-w(?:\s|$)/.test(command) ||
|
|
195
|
+
/(?:^|[\s&|;])nodemon\b/.test(command)
|
|
196
|
+
)
|
|
197
|
+
}
|
|
198
|
+
|
|
183
199
|
function scriptsOf(meta: ProjectMeta): Record<string, unknown> {
|
|
184
200
|
// package.json is a boundary: `scripts` is whatever the file holds. A
|
|
185
201
|
// string or an array would enumerate its indices as script names.
|
|
@@ -298,7 +314,7 @@ export function migrateScripts(metas: readonly ProjectMeta[]): MigrationPlan {
|
|
|
298
314
|
)
|
|
299
315
|
}
|
|
300
316
|
const task: Record<string, unknown> = { exec }
|
|
301
|
-
if (PERSISTENT_TASK_NAMES.has(name)) {
|
|
317
|
+
if (PERSISTENT_TASK_NAMES.has(name) || isWatcher(name, own)) {
|
|
302
318
|
exec['persistent'] = {}
|
|
303
319
|
todos.push(PERSISTENT_TODO)
|
|
304
320
|
}
|