@vzn/vx-dte 0.0.649 → 0.0.650
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 +3 -3
- package/src/plugin.ts +5 -7
- package/src/tree.ts +7 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vzn/vx-dte",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.650",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Distributed task execution for vx: one run spread over workers your own CI spawns, joined through a relay.",
|
|
6
6
|
"keywords": [
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
"bun": ">=1.4.4"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@vzn/vx-dte-server": "0.0.
|
|
32
|
+
"@vzn/vx-dte-server": "0.0.650"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
|
-
"@vzn/vx": "^0.0.
|
|
35
|
+
"@vzn/vx": "^0.0.650"
|
|
36
36
|
},
|
|
37
37
|
"repository": {
|
|
38
38
|
"type": "git",
|
package/src/plugin.ts
CHANGED
|
@@ -2,7 +2,7 @@ import path from 'node:path'
|
|
|
2
2
|
import {
|
|
3
3
|
definePlugin,
|
|
4
4
|
hostPlatform,
|
|
5
|
-
|
|
5
|
+
localHistory,
|
|
6
6
|
PLATFORMS,
|
|
7
7
|
refuseUnknownOptions,
|
|
8
8
|
taskDefinitions,
|
|
@@ -436,12 +436,10 @@ export function dte(options: DteOptions = {}) {
|
|
|
436
436
|
const read = async (): Promise<void> => {
|
|
437
437
|
if (orchestrator === undefined) return
|
|
438
438
|
try {
|
|
439
|
-
peaks = await
|
|
440
|
-
ctx.
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
taskDefinitions(graph.values()),
|
|
444
|
-
).resourcesFor(ids)
|
|
439
|
+
peaks = await localHistory(ctx.localCache, {
|
|
440
|
+
branch: ctx.branch,
|
|
441
|
+
defs: taskDefinitions(graph.values()),
|
|
442
|
+
}).resourcesFor(ids)
|
|
445
443
|
tails = undefined
|
|
446
444
|
} catch (err) {
|
|
447
445
|
ctx.warn(
|
package/src/tree.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// them. Workers compare trees, not commits, so a run on uncommitted changes
|
|
3
3
|
// still matches the worktrees `local()` makes from them.
|
|
4
4
|
|
|
5
|
-
import { copyFile, mkdtemp, rm } from 'node:fs/promises'
|
|
5
|
+
import { copyFile, mkdtemp, rm, stat, utimes } from 'node:fs/promises'
|
|
6
6
|
import os from 'node:os'
|
|
7
7
|
import path from 'node:path'
|
|
8
8
|
|
|
@@ -27,6 +27,12 @@ export async function snapshot(root: string): Promise<{ commit: string; tree: st
|
|
|
27
27
|
const env = { GIT_INDEX_FILE: path.join(dir, 'index') }
|
|
28
28
|
try {
|
|
29
29
|
await copyFile(index, env.GIT_INDEX_FILE)
|
|
30
|
+
// The copy keeps the index's mtime (as core's refreshedIndex): git
|
|
31
|
+
// trusts an entry's stat only while its file is older than the index,
|
|
32
|
+
// and a fresh mtime took a same-size edit made in the tick the index
|
|
33
|
+
// was written for clean, its old blob in the tree (2026-10-29).
|
|
34
|
+
const st = await stat(index)
|
|
35
|
+
await utimes(env.GIT_INDEX_FILE, st.atime, st.mtime)
|
|
30
36
|
} catch {
|
|
31
37
|
// quiet: no index yet, so HEAD's tree is its tracked set.
|
|
32
38
|
if ((await git(['read-tree', head], root, env)) === undefined) return none
|