@bitfab/sdk 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
@@ -11,7 +11,7 @@ import {
11
11
  getCurrentReplayBranch,
12
12
  getCurrentSpan,
13
13
  getCurrentTrace
14
- } from "./chunk-RSM2TLKG.js";
14
+ } from "./chunk-VDFPZYLH.js";
15
15
  import {
16
16
  BITFAB_PROGRESS_PREFIX,
17
17
  BitfabError,
@@ -23,7 +23,7 @@ import {
23
23
  flushTraces,
24
24
  reportReplayProgress,
25
25
  serializeReplayResult
26
- } from "./chunk-AAMRJGZJ.js";
26
+ } from "./chunk-EKOAKLZC.js";
27
27
  export {
28
28
  BITFAB_PROGRESS_PREFIX,
29
29
  Bitfab,
package/dist/node.cjs CHANGED
@@ -88,7 +88,7 @@ var __version__;
88
88
  var init_version_generated = __esm({
89
89
  "src/version.generated.ts"() {
90
90
  "use strict";
91
- __version__ = "0.36.10";
91
+ __version__ = "0.36.11";
92
92
  }
93
93
  });
94
94
 
@@ -2267,7 +2267,7 @@ async function captureCodeChangeFromGit(cwd, label) {
2267
2267
  const tracked = await git(root, [
2268
2268
  "diff",
2269
2269
  "--name-status",
2270
- "--no-renames",
2270
+ "--find-renames",
2271
2271
  "-z",
2272
2272
  base,
2273
2273
  "--",
@@ -2283,23 +2283,23 @@ async function captureCodeChangeFromGit(cwd, label) {
2283
2283
  ]);
2284
2284
  const entries = [
2285
2285
  ...parseNameStatusZ(tracked ?? ""),
2286
- ...(untracked ?? "").split(NUL).filter((p) => p.length > 0).map((path) => ({ status: "A", path }))
2286
+ ...(untracked ?? "").split(NUL).filter((p) => p.length > 0).map((path) => ({ status: "A", beforePath: path, path }))
2287
2287
  ];
2288
2288
  if (entries.length === 0) {
2289
2289
  return null;
2290
2290
  }
2291
2291
  const files = [];
2292
2292
  let totalBytes = 0;
2293
- for (const { status, path } of entries) {
2293
+ for (const { status, beforePath, path } of entries) {
2294
2294
  if (files.length >= MAX_FILES) {
2295
2295
  break;
2296
2296
  }
2297
- const beforeBytes = status === "A" ? 0 : await blobBytes(base, path);
2297
+ const beforeBytes = status === "A" ? 0 : await blobBytes(base, beforePath);
2298
2298
  const afterBytes = status === "D" ? 0 : await workingBytes(path);
2299
2299
  if (beforeBytes > MAX_FILE_BYTES || afterBytes > MAX_FILE_BYTES) {
2300
2300
  continue;
2301
2301
  }
2302
- const before = (status === "A" ? "" : await git(root, ["show", `${base}:${path}`]) ?? "").replace(/\r\n/g, "\n");
2302
+ const before = (status === "A" ? "" : await git(root, ["show", `${base}:${beforePath}`]) ?? "").replace(/\r\n/g, "\n");
2303
2303
  const after = (status === "D" ? "" : await readWorkingFile(readFile, root, path)).replace(/\r\n/g, "\n");
2304
2304
  if (before === after) {
2305
2305
  continue;
@@ -2357,8 +2357,18 @@ async function readWorkingFile(readFile, root, path) {
2357
2357
  function parseNameStatusZ(raw) {
2358
2358
  const parts = raw.split(NUL).filter((p) => p.length > 0);
2359
2359
  const out = [];
2360
- for (let i = 0; i + 1 < parts.length; i += 2) {
2361
- out.push({ status: parts[i].charAt(0), path: parts[i + 1] });
2360
+ let i = 0;
2361
+ while (i + 1 < parts.length) {
2362
+ const status = parts[i].charAt(0);
2363
+ i += 1;
2364
+ const beforePath = parts[i];
2365
+ i += 1;
2366
+ if ((status === "R" || status === "C") && i < parts.length) {
2367
+ out.push({ status, beforePath, path: parts[i] });
2368
+ i += 1;
2369
+ } else {
2370
+ out.push({ status, beforePath, path: beforePath });
2371
+ }
2362
2372
  }
2363
2373
  return out;
2364
2374
  }