Fix incremental build fingerprint invalidation
This commit is contained in:
@@ -32,12 +32,15 @@ export function inputFiles() {
|
||||
export function fingerprint() {
|
||||
const hash = crypto.createHash("sha256");
|
||||
for (const file of inputFiles()) {
|
||||
const stat = fs.statSync(file);
|
||||
// Read nanosecond metadata as bigint. Without the explicit option
|
||||
// `mtimeNs` is undefined in Node, so same-sized edits can reuse stale
|
||||
// bundles indefinitely.
|
||||
const stat = fs.statSync(file, { bigint: true });
|
||||
hash.update(path.relative(root, file));
|
||||
hash.update("\0");
|
||||
hash.update(String(stat.size));
|
||||
hash.update(stat.size.toString());
|
||||
hash.update("\0");
|
||||
hash.update(String(stat.mtimeNs));
|
||||
hash.update(stat.mtimeNs.toString());
|
||||
hash.update("\n");
|
||||
}
|
||||
return hash.digest("hex");
|
||||
|
||||
@@ -28,7 +28,7 @@ button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-
|
||||
.topbar-actions button:disabled { color: #606060; background: transparent; cursor: default; }
|
||||
.workspace-tabs { flex: 1 1 auto; align-self: stretch; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
|
||||
.workspace-tabs::-webkit-scrollbar, .topbar::-webkit-scrollbar, .workspace-toolbar::-webkit-scrollbar { display: none; }
|
||||
.workspace-tab { flex: none; min-width: auto; padding-inline: 9px; border: 0; border-radius: 0; font-size: 10px; }
|
||||
.workspace-tab { flex: none; min-width: auto; padding-inline: 6px; border: 0; border-radius: 0; font-size: 10px; }
|
||||
.workspace-tab.active { color: #fff; background: #303030; box-shadow: inset 0 -2px #4c94c8; }
|
||||
.workspace-add { flex: none; width: 24px; padding: 0; font-size: 16px; }
|
||||
.topbar-actions { flex: none; margin-left: auto; }
|
||||
|
||||
Reference in New Issue
Block a user