@vzn/vx 0.0.409 → 0.0.411
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 +20 -22
- package/package.json +5 -5
- package/src/cache/cache.ts +9 -2
package/README.md
CHANGED
|
@@ -34,11 +34,11 @@ Same graph, commands and concurrency: [how it is measured](https://vznjs.github.
|
|
|
34
34
|
|
|
35
35
|
<!-- bench:end -->
|
|
36
36
|
|
|
37
|
-
##
|
|
37
|
+
## What vx is
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
A task runner and build cache for JavaScript monorepos.
|
|
40
|
+
Each task is one shell command with declared inputs and outputs; vx runs
|
|
41
|
+
them in dependency order and replays results from a content-addressed cache.
|
|
42
42
|
|
|
43
43
|
## Install
|
|
44
44
|
|
|
@@ -103,6 +103,12 @@ start, not a way to run the repo. The numbers above are native vx
|
|
|
103
103
|
config. `@vzn/vx-migrate`'s first npm publish is pending.
|
|
104
104
|
[Migration guide](https://vznjs.github.io/vx/guides/migrate/).
|
|
105
105
|
|
|
106
|
+
## Why it is faster
|
|
107
|
+
|
|
108
|
+
- **Nothing boots per task:** no daemon, no Node process; vx spawns your command.
|
|
109
|
+
- **No source-file reads to hash:** on a clean tree, keys come from git's index; each project's `package.json` and the lockfile are still read.
|
|
110
|
+
- **One pass:** one git walk per run; each stat and lookup happens once.
|
|
111
|
+
|
|
106
112
|
## More than speed
|
|
107
113
|
|
|
108
114
|
- **A cache you can trust:** TypeScript configs are evaluated before
|
|
@@ -111,22 +117,21 @@ config. `@vzn/vx-migrate`'s first npm publish is pending.
|
|
|
111
117
|
- **Sandboxed tasks:** opt in per task; a workspace file the task did
|
|
112
118
|
not declare is out of its reach, so it cannot poison the cache.
|
|
113
119
|
- **Clean exits:** Ctrl-C reaps each task's process group.
|
|
114
|
-
- **Plugins at every stage
|
|
120
|
+
- **Plugins at every stage** (14 hooks, `commands` included): remote cache, remote execution, telemetry,
|
|
115
121
|
CLI verbs. Core ships none and needs none.
|
|
116
122
|
- **Free:** MIT. No paywall, no cloud, no account.
|
|
117
123
|
|
|
118
124
|
## How it compares
|
|
119
125
|
|
|
120
|
-
|
|
|
121
|
-
|
|
|
122
|
-
| Config
|
|
123
|
-
| Output ownership
|
|
124
|
-
| Clean-tree hashing
|
|
125
|
-
| Daemon
|
|
126
|
-
| Per-task sandbox
|
|
127
|
-
| Plugin API
|
|
128
|
-
|
|
|
129
|
-
| Install | **Single binary**; no Bun, Node optional | npm + Node | npm + Node |
|
|
126
|
+
| | vx | Turborepo | Nx |
|
|
127
|
+
| ------------------ | ----------------------------------------- | ------------------------------ | ---------------- |
|
|
128
|
+
| Config | TypeScript, evaluated into the cache key | JSON (static) | JSON (static) |
|
|
129
|
+
| Output ownership | **Strict**: wiped before exec and restore | Additive (stale files survive) | Additive |
|
|
130
|
+
| Clean-tree hashing | **No source reads** (git index OIDs) | git OIDs | re-hash / daemon |
|
|
131
|
+
| Daemon | **None** | None for `turbo run` | On by default |
|
|
132
|
+
| Per-task sandbox | **Yes**: kernel-level, opt-in | No | No |
|
|
133
|
+
| Plugin API | **Yes**: every pipeline stage | No | Yes (TS-tied) |
|
|
134
|
+
| Install | **Single binary**; no Bun, Node optional | npm + Node | npm + Node |
|
|
130
135
|
|
|
131
136
|
Every gap, and when another tool is the better pick:
|
|
132
137
|
[comparison](packages/vx/docs/comparison.md) ·
|
|
@@ -157,13 +162,6 @@ Write your own: [plugin guide](https://vznjs.github.io/vx/guides/plugins/) ·
|
|
|
157
162
|
vx. The schema may still change; 1.0's promise:
|
|
158
163
|
[versioning-1.0.md](packages/vx/docs/design/versioning-1.0.md).
|
|
159
164
|
|
|
160
|
-
| Surface | Maturity |
|
|
161
|
-
| -------------------------------------------------- | -------------------- |
|
|
162
|
-
| Core task runner + caching | **production-ready** |
|
|
163
|
-
| Plugin pipeline (14 hooks, `commands` included) | **shippable** |
|
|
164
|
-
| `vx init` / `@vzn/vx-migrate` (scripts; Turbo, Nx) | **shippable** |
|
|
165
|
-
| First-party plugins (table above) | **shippable** |
|
|
166
|
-
|
|
167
165
|
## Contributing
|
|
168
166
|
|
|
169
167
|
```sh
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vzn/vx",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.411",
|
|
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.411",
|
|
25
|
+
"@vzn/vx-linux-arm64": "0.0.411",
|
|
26
|
+
"@vzn/vx-darwin-x64": "0.0.411",
|
|
27
|
+
"@vzn/vx-darwin-arm64": "0.0.411"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@anthropic-ai/sandbox-runtime": "^0.0.76"
|
package/src/cache/cache.ts
CHANGED
|
@@ -2054,10 +2054,17 @@ const SQLITE_FCNTL_PERSIST_WAL = 10
|
|
|
2054
2054
|
* `sqlite3_close_v2` does), so `cache.db` and its `-wal` and `-shm` stayed
|
|
2055
2055
|
* open after `Cache.close()`: a leaked descriptor per run for an embedder
|
|
2056
2056
|
* (O-10).
|
|
2057
|
-
* `close(true)` finalizes them and closes.
|
|
2057
|
+
* `close(true)` finalizes them and closes. Below the Bun floor (1.3.14) it
|
|
2058
|
+
* does not finalize: it answers SQLITE_BUSY, "database is locked", and every
|
|
2059
|
+
* `vx run` exited 1 with that stack after its tasks had passed (M-44). There
|
|
2060
|
+
* the deferred close is the one that closes.
|
|
2058
2061
|
*/
|
|
2059
2062
|
function closeDb(db: Database): void {
|
|
2060
|
-
|
|
2063
|
+
try {
|
|
2064
|
+
db.close(true)
|
|
2065
|
+
} catch {
|
|
2066
|
+
db.close()
|
|
2067
|
+
}
|
|
2061
2068
|
}
|
|
2062
2069
|
|
|
2063
2070
|
/**
|