@better-internet/oss-verify 0.1.0-draft → 0.1.1

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.
Files changed (2) hide show
  1. package/dist/src/git.js +10 -1
  2. package/package.json +1 -1
package/dist/src/git.js CHANGED
@@ -1,5 +1,14 @@
1
1
  import { execSync } from "node:child_process";
2
- const exec = (cmd, cwd) => execSync(cmd, { cwd, encoding: "utf8", stdio: ["ignore", "pipe", "pipe"] }).trim();
2
+ // 64 MiB stdout `git ls-files` on a 21k-file repo (posthog) exceeds the
3
+ // 1 MiB default and throws ENOBUFS before we can do anything with it; the
4
+ // other helpers here are small but inherit the same setting for consistency.
5
+ const MAX_BUFFER = 64 * 1024 * 1024;
6
+ const exec = (cmd, cwd) => execSync(cmd, {
7
+ cwd,
8
+ encoding: "utf8",
9
+ stdio: ["ignore", "pipe", "pipe"],
10
+ maxBuffer: MAX_BUFFER,
11
+ }).trim();
3
12
  export function commitSha(repoRoot) {
4
13
  return exec("git rev-parse HEAD", repoRoot);
5
14
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@better-internet/oss-verify",
3
- "version": "0.1.0-draft",
3
+ "version": "0.1.1",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"