@vzn/vx 0.0.138 → 0.0.140
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
CHANGED
|
@@ -52,7 +52,8 @@ npx vx run build --all # again: up-to-date in milliseconds
|
|
|
52
52
|
|
|
53
53
|
Nothing is rewritten. `@vzn/vx-migrate` is not on npm yet (first publish
|
|
54
54
|
pending); [`examples/turbo`](examples/turbo) runs this setup on every
|
|
55
|
-
commit.
|
|
55
|
+
commit. Which `turbo.json`, `nx.json` and `project.json` keys vx honours,
|
|
56
|
+
key by key: [Turbo and Nx config support](https://vznjs.github.io/vx/compare/turbo-nx-support/).
|
|
56
57
|
|
|
57
58
|
## Why it is faster
|
|
58
59
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vzn/vx",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.140",
|
|
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.140",
|
|
21
|
+
"@vzn/vx-linux-arm64": "0.0.140",
|
|
22
|
+
"@vzn/vx-darwin-x64": "0.0.140",
|
|
23
|
+
"@vzn/vx-darwin-arm64": "0.0.140"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@anthropic-ai/sandbox-runtime": "^0.0.76"
|
|
@@ -135,7 +135,12 @@ export class TaskLogBuffer {
|
|
|
135
135
|
}
|
|
136
136
|
if (acc.chars > TASK_LOG_TAIL_CHARS && acc.chunks.length === 1) {
|
|
137
137
|
const only = acc.chunks[0]!
|
|
138
|
-
|
|
138
|
+
let start = only.length - TASK_LOG_TAIL_CHARS
|
|
139
|
+
// A cut between a surrogate pair would open the tail on a lone low
|
|
140
|
+
// surrogate, which a sink's UTF-8 encode turns into U+FFFD.
|
|
141
|
+
const first = only.charCodeAt(start)
|
|
142
|
+
if (first >= 0xdc00 && first <= 0xdfff) start++
|
|
143
|
+
const keep = only.slice(start)
|
|
139
144
|
acc.truncatedHeadChars += only.length - keep.length
|
|
140
145
|
acc.chunks[0] = keep
|
|
141
146
|
acc.chars = keep.length
|
package/src/workspace/filter.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Filter DSL — pnpm-style selectors for `--filter`.
|
|
2
2
|
//
|
|
3
3
|
// <pattern> name glob, `*` = any characters (e.g. foo, @scope/*)
|
|
4
|
-
// ./<dir>
|
|
4
|
+
// ./<dir> the package at <dir>, else the packages under it (relative to workspace root)
|
|
5
5
|
// {<dir>} same as ./<dir>
|
|
6
6
|
// <pattern>... pattern + its transitive workspace dependencies
|
|
7
7
|
// ...<pattern> pattern + its transitive workspace dependents
|
|
@@ -136,9 +136,15 @@ function matchProjects(
|
|
|
136
136
|
}
|
|
137
137
|
const out: string[] = []
|
|
138
138
|
if (filter.isPath) {
|
|
139
|
+
// A path naming a project's own directory is that project, as Turbo and
|
|
140
|
+
// pnpm read it: `.` is the root project, never every project under the
|
|
141
|
+
// root, and `./packages/app` leaves the examples nested in it (D-43).
|
|
142
|
+
// A directory that is no project keeps the "at or under" reading.
|
|
143
|
+
const exact = projects.find((p) => p.dir === filter.matcher)
|
|
144
|
+
if (exact !== undefined) return [exact.name]
|
|
139
145
|
const prefix = filter.matcher + path.sep
|
|
140
146
|
for (const p of projects) {
|
|
141
|
-
if (p.dir
|
|
147
|
+
if (p.dir.startsWith(prefix)) out.push(p.name)
|
|
142
148
|
}
|
|
143
149
|
// A path that names a project directory literally means that directory,
|
|
144
150
|
// as git reads a pathspec, even when it holds glob characters
|