bitfab 0.36.10 → 0.36.11

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/index.d.cts CHANGED
@@ -2575,7 +2575,7 @@ declare class BitfabFunction {
2575
2575
  /**
2576
2576
  * SDK version from package.json (injected at build time)
2577
2577
  */
2578
- declare const __version__ = "0.36.10";
2578
+ declare const __version__ = "0.36.11";
2579
2579
 
2580
2580
  /**
2581
2581
  * Constants for the Bitfab SDK.
package/dist/index.d.ts CHANGED
@@ -2575,7 +2575,7 @@ declare class BitfabFunction {
2575
2575
  /**
2576
2576
  * SDK version from package.json (injected at build time)
2577
2577
  */
2578
- declare const __version__ = "0.36.10";
2578
+ declare const __version__ = "0.36.11";
2579
2579
 
2580
2580
  /**
2581
2581
  * Constants for the Bitfab SDK.
package/dist/index.js CHANGED
@@ -20,7 +20,7 @@ import {
20
20
  getCurrentReplayBranch,
21
21
  getCurrentSpan,
22
22
  getCurrentTrace
23
- } from "./chunk-RSM2TLKG.js";
23
+ } from "./chunk-VDFPZYLH.js";
24
24
  import {
25
25
  BITFAB_PROGRESS_PREFIX,
26
26
  BitfabError,
@@ -32,7 +32,7 @@ import {
32
32
  flushTraces,
33
33
  reportReplayProgress,
34
34
  serializeReplayResult
35
- } from "./chunk-AAMRJGZJ.js";
35
+ } from "./chunk-EKOAKLZC.js";
36
36
  export {
37
37
  BITFAB_PROGRESS_PREFIX,
38
38
  Bitfab,
package/dist/node.cjs CHANGED
@@ -97,7 +97,7 @@ var __version__;
97
97
  var init_version_generated = __esm({
98
98
  "src/version.generated.ts"() {
99
99
  "use strict";
100
- __version__ = "0.36.10";
100
+ __version__ = "0.36.11";
101
101
  }
102
102
  });
103
103
 
@@ -2276,7 +2276,7 @@ async function captureCodeChangeFromGit(cwd, label) {
2276
2276
  const tracked = await git(root, [
2277
2277
  "diff",
2278
2278
  "--name-status",
2279
- "--no-renames",
2279
+ "--find-renames",
2280
2280
  "-z",
2281
2281
  base,
2282
2282
  "--",
@@ -2292,23 +2292,23 @@ async function captureCodeChangeFromGit(cwd, label) {
2292
2292
  ]);
2293
2293
  const entries = [
2294
2294
  ...parseNameStatusZ(tracked ?? ""),
2295
- ...(untracked ?? "").split(NUL).filter((p) => p.length > 0).map((path) => ({ status: "A", path }))
2295
+ ...(untracked ?? "").split(NUL).filter((p) => p.length > 0).map((path) => ({ status: "A", beforePath: path, path }))
2296
2296
  ];
2297
2297
  if (entries.length === 0) {
2298
2298
  return null;
2299
2299
  }
2300
2300
  const files = [];
2301
2301
  let totalBytes = 0;
2302
- for (const { status, path } of entries) {
2302
+ for (const { status, beforePath, path } of entries) {
2303
2303
  if (files.length >= MAX_FILES) {
2304
2304
  break;
2305
2305
  }
2306
- const beforeBytes = status === "A" ? 0 : await blobBytes(base, path);
2306
+ const beforeBytes = status === "A" ? 0 : await blobBytes(base, beforePath);
2307
2307
  const afterBytes = status === "D" ? 0 : await workingBytes(path);
2308
2308
  if (beforeBytes > MAX_FILE_BYTES || afterBytes > MAX_FILE_BYTES) {
2309
2309
  continue;
2310
2310
  }
2311
- const before = (status === "A" ? "" : await git(root, ["show", `${base}:${path}`]) ?? "").replace(/\r\n/g, "\n");
2311
+ const before = (status === "A" ? "" : await git(root, ["show", `${base}:${beforePath}`]) ?? "").replace(/\r\n/g, "\n");
2312
2312
  const after = (status === "D" ? "" : await readWorkingFile(readFile, root, path)).replace(/\r\n/g, "\n");
2313
2313
  if (before === after) {
2314
2314
  continue;
@@ -2366,8 +2366,18 @@ async function readWorkingFile(readFile, root, path) {
2366
2366
  function parseNameStatusZ(raw) {
2367
2367
  const parts = raw.split(NUL).filter((p) => p.length > 0);
2368
2368
  const out = [];
2369
- for (let i = 0; i + 1 < parts.length; i += 2) {
2370
- out.push({ status: parts[i].charAt(0), path: parts[i + 1] });
2369
+ let i = 0;
2370
+ while (i + 1 < parts.length) {
2371
+ const status = parts[i].charAt(0);
2372
+ i += 1;
2373
+ const beforePath = parts[i];
2374
+ i += 1;
2375
+ if ((status === "R" || status === "C") && i < parts.length) {
2376
+ out.push({ status, beforePath, path: parts[i] });
2377
+ i += 1;
2378
+ } else {
2379
+ out.push({ status, beforePath, path: beforePath });
2380
+ }
2371
2381
  }
2372
2382
  return out;
2373
2383
  }