@netlify/git-utils 5.0.2 → 5.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.
package/lib/exec.js CHANGED
@@ -10,7 +10,7 @@ const mGit = function (args, cwd) {
10
10
  return stdout;
11
11
  }
12
12
  catch (error) {
13
- // The child process `error.message` includes stderr and stdout output which most of the times contains duplicate
13
+ // The child process `error.message` includes stderr and stdout output which most of the time contains duplicate
14
14
  // information. We rely on `error.shortMessage` instead.
15
15
  error.message = error.shortMessage;
16
16
  throw error;
package/lib/refs.js CHANGED
@@ -47,8 +47,8 @@ const checkRef = function (ref, cwd) {
47
47
  const refExists = function ({ error }) {
48
48
  return error === undefined;
49
49
  };
50
- const throwError = function (name, { ref, error: { message, stderr }, }) {
51
- const messages = [message, stderr].filter(Boolean).join('\n');
50
+ const throwError = function (name, { ref, error, }) {
51
+ const messages = [error === null || error === void 0 ? void 0 : error.message, error === null || error === void 0 ? void 0 : error.stderr].filter(Boolean).join('\n');
52
52
  const messageA = `Invalid ${name} commit ${ref}\n${messages}`;
53
53
  throw new Error(messageA);
54
54
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netlify/git-utils",
3
- "version": "5.0.2",
3
+ "version": "5.1.1",
4
4
  "description": "Utility for dealing with modified, created, deleted files since a git commit",
5
5
  "type": "module",
6
6
  "exports": "./lib/main.js",
@@ -57,12 +57,12 @@
57
57
  "path-exists": "^5.0.0"
58
58
  },
59
59
  "devDependencies": {
60
- "@types/node": "^14.18.31",
60
+ "@types/node": "^18.14.2",
61
61
  "typescript": "^4.8.4",
62
62
  "vitest": "^0.24.1"
63
63
  },
64
64
  "engines": {
65
65
  "node": "^14.16.0 || >=16.0.0"
66
66
  },
67
- "gitHead": "be9da6e85afa0223bdcd6d228c929f4372515538"
67
+ "gitHead": "35d6533c324d061b9e8e4165d369880a25bab707"
68
68
  }