@vzn/vx 0.0.33 → 0.0.34

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.33",
3
+ "version": "0.0.34",
4
4
  "description": "An open, extensible monorepo task runner.",
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.33",
21
- "@vzn/vx-linux-arm64": "0.0.33",
22
- "@vzn/vx-darwin-x64": "0.0.33",
23
- "@vzn/vx-darwin-arm64": "0.0.33"
20
+ "@vzn/vx-linux-x64": "0.0.34",
21
+ "@vzn/vx-linux-arm64": "0.0.34",
22
+ "@vzn/vx-darwin-x64": "0.0.34",
23
+ "@vzn/vx-darwin-arm64": "0.0.34"
24
24
  },
25
25
  "dependencies": {
26
26
  "@anthropic-ai/sandbox-runtime": "^0.0.76"
@@ -188,7 +188,21 @@ export async function applyKeyHooks(
188
188
  }
189
189
  }
190
190
  if (parts.length > 0) {
191
- parts.sort((a, b) => (a[0] < b[0] ? -1 : a[0] > b[0] ? 1 : 0))
191
+ const byName = (a: readonly [string, string], b: readonly [string, string]): number =>
192
+ a[0] < b[0] ? -1 : a[0] > b[0] ? 1 : a[1] < b[1] ? -1 : a[1] > b[1] ? 1 : 0
193
+ parts.sort(byName)
194
+ // A plugin's name is its package's, and one package may define two
195
+ // plugins (`@vzn/vx-migrate`'s `turbo()` and `turboCache()`): two
196
+ // parts named alike folded both values under one name, and `vx why`
197
+ // could not say which moved (item 1028). The repeats take `#2`, `#3`
198
+ // in value order, so declaration order still keys nothing.
199
+ let previous = ''
200
+ let n = 0
201
+ for (const [i, [name, value]] of parts.entries()) {
202
+ n = name === previous ? n + 1 : 1
203
+ previous = name
204
+ if (n > 1) parts[i] = [`${name}#${n}`, value]
205
+ }
192
206
  node.keyParts = parts
193
207
  }
194
208
  }