@evandu/super-pi 0.1.298 → 0.1.300

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.
@@ -8,7 +8,7 @@
8
8
  <link rel="alternate icon" href="/favicon.ico" />
9
9
  <link rel="apple-touch-icon" href="/favicon.svg" />
10
10
  <title>Super Pi</title>
11
- <script type="module" crossorigin src="/assets/index-CKsNRehl.js"></script>
11
+ <script type="module" crossorigin src="/assets/index-BYAipWq-.js"></script>
12
12
  <link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-XKyaHtl9.js">
13
13
  <link rel="stylesheet" crossorigin href="/assets/index-Dcs7gmUf.css">
14
14
  </head>
@@ -55,7 +55,7 @@ async function expandAtReferences(store, workspace, content) {
55
55
  continue;
56
56
  }
57
57
  try {
58
- const { stdout } = await execFileAsync("git", ["-C", workspace.path, "worktree", "list", "--porcelain"], { maxBuffer: 1024 * 1024 });
58
+ const { stdout } = await execFileAsync("git", ["-C", workspace.path, "worktree", "list", "--porcelain"], { env: { ...process.env, GIT_OPTIONAL_LOCKS: "0" }, maxBuffer: 1024 * 1024 });
59
59
  const entries = stdout.split(/\n\n+/).map(block => {
60
60
  const path = block.match(/^worktree (.+)$/m)?.[1];
61
61
  return path ? { path, block } : undefined;
@@ -7,7 +7,8 @@ import { mkdir, readFile, realpath, stat } from "node:fs/promises";
7
7
  import { MAX_FILE_BYTES } from "./files.js";
8
8
  import { ignoreWorkspaceTrash } from "./workspace-file-operations.js";
9
9
  const exec = promisify(execFile);
10
- async function git(cwd, args, options) { return exec("git", ["--literal-pathspecs", "-c", "core.quotepath=false", ...args], { cwd, windowsHide: true, maxBuffer: options?.maxBuffer ?? 8 * 1024 * 1024, timeout: options?.timeout }); }
10
+ // Background reads must not refresh the index under an optional lock; writes still take required locks.
11
+ async function git(cwd, args, options) { return exec("git", ["--literal-pathspecs", "-c", "core.quotepath=false", "-c", "diff.autoRefreshIndex=false", ...args], { cwd, env: { ...process.env, GIT_OPTIONAL_LOCKS: "0" }, windowsHide: true, maxBuffer: options?.maxBuffer ?? 8 * 1024 * 1024, timeout: options?.timeout }); }
11
12
  function files(raw, cwd = "") {
12
13
  const staged = [], unstaged = [], untracked = [];
13
14
  const records = raw.split("\0");
@@ -470,8 +471,8 @@ export async function gitStashes(root, cwd, query = "", offset = 0) {
470
471
  }
471
472
  export async function gitStagedDraftInput(root, cwd) {
472
473
  const maxBytes = 24 * 1024;
473
- const child = spawn("git", ["--literal-pathspecs", "--no-pager", "diff", "--cached", "--no-ext-diff", "--no-textconv", "--no-color", "--", cwd || "."], {
474
- cwd: root, stdio: ["ignore", "pipe", "ignore"], windowsHide: true,
474
+ const child = spawn("git", ["--literal-pathspecs", "-c", "diff.autoRefreshIndex=false", "--no-pager", "diff", "--cached", "--no-ext-diff", "--no-textconv", "--no-color", "--", cwd || "."], {
475
+ cwd: root, env: { ...process.env, GIT_OPTIONAL_LOCKS: "0" }, stdio: ["ignore", "pipe", "ignore"], windowsHide: true,
475
476
  });
476
477
  const chunks = [];
477
478
  let bytes = 0, truncated = false;
@@ -15,7 +15,7 @@ export async function ignoreWorkspaceTrash(workspace, forthcoming = false) {
15
15
  return;
16
16
  let top, exclude;
17
17
  try {
18
- const options = { cwd: workspace, windowsHide: true, timeout: 5000 };
18
+ const options = { cwd: workspace, env: { ...process.env, GIT_OPTIONAL_LOCKS: "0" }, windowsHide: true, timeout: 5000 };
19
19
  top = (await exec("git", ["rev-parse", "--show-toplevel"], options)).stdout.trim();
20
20
  const path = (await exec("git", ["rev-parse", "--git-path", "info/exclude"], options)).stdout.trim();
21
21
  exclude = resolve(workspace, path);
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "superPi": {
4
4
  "managedDirectListener": true
5
5
  },
6
- "version": "0.1.298",
6
+ "version": "0.1.300",
7
7
  "description": "Web control plane and companion for Pi",
8
8
  "license": "MIT",
9
9
  "type": "module",