@phren/cli 0.3.34 → 0.3.35
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/dist/bridge/changes.js +12 -4
- package/dist/bridge-hook.mjs +10 -4
- package/package.json +1 -1
package/dist/bridge/changes.js
CHANGED
|
@@ -101,10 +101,18 @@ async function treeHash(root, env, signal) {
|
|
|
101
101
|
const index = path.resolve(root, (await git(root, ["rev-parse", "--git-path", "index"], {}, signal)).trim());
|
|
102
102
|
const temp = env.GIT_INDEX_FILE;
|
|
103
103
|
await unlink(temp).catch(() => undefined);
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
//
|
|
107
|
-
|
|
104
|
+
// Keep the real index's mtime (a second early, for rounding): Git rechecks
|
|
105
|
+
// the content of entries as new as the index, so a file rewritten to the
|
|
106
|
+
// same size in one instant is still seen. Read before the copy, so an index
|
|
107
|
+
// replaced meanwhile only makes more entries racy. An epoch mtime instead
|
|
108
|
+
// made every tracked file racy, and rehashing them all overran the budget
|
|
109
|
+
// on a busy machine (about 3 s for 6,000 files).
|
|
110
|
+
const real = await stat(index).catch(error => { if (error.code !== "ENOENT")
|
|
111
|
+
throw error; return undefined; });
|
|
112
|
+
if (real && await copyFile(index, temp).then(() => true, error => { if (error.code !== "ENOENT")
|
|
113
|
+
throw error; return false; })) {
|
|
114
|
+
await utimes(temp, real.atimeMs / 1000, real.mtimeMs / 1000 - 1);
|
|
115
|
+
}
|
|
108
116
|
await git(root, ["add", "-A", "--", "."], env, signal);
|
|
109
117
|
return (await git(root, ["write-tree"], env, signal)).trim();
|
|
110
118
|
}
|
package/dist/bridge-hook.mjs
CHANGED
|
@@ -26587,10 +26587,16 @@ async function treeHash(root, env, signal) {
|
|
|
26587
26587
|
const index2 = path18.resolve(root, (await git2(root, ["rev-parse", "--git-path", "index"], {}, signal)).trim());
|
|
26588
26588
|
const temp = env.GIT_INDEX_FILE;
|
|
26589
26589
|
await unlink2(temp).catch(() => void 0);
|
|
26590
|
-
await
|
|
26590
|
+
const real2 = await stat5(index2).catch((error62) => {
|
|
26591
26591
|
if (error62.code !== "ENOENT") throw error62;
|
|
26592
|
+
return void 0;
|
|
26592
26593
|
});
|
|
26593
|
-
await
|
|
26594
|
+
if (real2 && await copyFile(index2, temp).then(() => true, (error62) => {
|
|
26595
|
+
if (error62.code !== "ENOENT") throw error62;
|
|
26596
|
+
return false;
|
|
26597
|
+
})) {
|
|
26598
|
+
await utimes(temp, real2.atimeMs / 1e3, real2.mtimeMs / 1e3 - 1);
|
|
26599
|
+
}
|
|
26594
26600
|
await git2(root, ["add", "-A", "--", "."], env, signal);
|
|
26595
26601
|
return (await git2(root, ["write-tree"], env, signal)).trim();
|
|
26596
26602
|
}
|
|
@@ -37420,7 +37426,7 @@ var init_package_metadata = __esm({
|
|
|
37420
37426
|
__dirname = path37.dirname(fileURLToPath2(import.meta.url));
|
|
37421
37427
|
ROOT = path37.join(__dirname, "..");
|
|
37422
37428
|
PACKAGE_JSON_PATH = path37.join(ROOT, "package.json");
|
|
37423
|
-
BUNDLED_VERSION = true ? "0.3.
|
|
37429
|
+
BUNDLED_VERSION = true ? "0.3.35" : "0.0.0";
|
|
37424
37430
|
PACKAGE_JSON = readPackageJson();
|
|
37425
37431
|
PACKAGE_NAME = PACKAGE_JSON.name || "phren";
|
|
37426
37432
|
VERSION = PACKAGE_JSON.version || BUNDLED_VERSION;
|
|
@@ -64382,7 +64388,7 @@ async function main() {
|
|
|
64382
64388
|
return askpass2(args[1]);
|
|
64383
64389
|
}
|
|
64384
64390
|
const { runBridge: runBridge2 } = await Promise.resolve().then(() => (init_command(), command_exports));
|
|
64385
|
-
return runBridge2(args, "0.3.
|
|
64391
|
+
return runBridge2(args, "0.3.35");
|
|
64386
64392
|
}
|
|
64387
64393
|
main().then((code) => {
|
|
64388
64394
|
process.exitCode = code;
|