@netlify/git-utils 4.1.4 → 5.0.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
@@ -1,6 +1,6 @@
1
1
  import process from 'process';
2
2
  import { execaSync } from 'execa';
3
- import moize from 'moize';
3
+ import moize from 'moize/mjs/index.mjs';
4
4
  import { pathExistsSync } from 'path-exists';
5
5
  // Fires the `git` binary. Memoized.
6
6
  const mGit = function (args, cwd) {
package/lib/main.js CHANGED
@@ -4,7 +4,7 @@ import { fileMatch } from './match.js';
4
4
  import { getBase, getHead } from './refs.js';
5
5
  import { getLinesOfCode } from './stats.js';
6
6
  // Main entry point to the git utilities
7
- export const getGitUtils = function ({ base, head, cwd } = {}) {
7
+ export const getGitUtils = function ({ base, head, cwd, } = {}) {
8
8
  const headA = getHead(cwd, head);
9
9
  const baseA = getBase(base, headA, cwd);
10
10
  const { modifiedFiles, createdFiles, deletedFiles } = getDiffFiles(baseA, headA, cwd);
package/lib/refs.js CHANGED
@@ -47,7 +47,7 @@ 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 } }) {
50
+ const throwError = function (name, { ref, error: { message, stderr }, }) {
51
51
  const messages = [message, stderr].filter(Boolean).join('\n');
52
52
  const messageA = `Invalid ${name} commit ${ref}\n${messages}`;
53
53
  throw new Error(messageA);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netlify/git-utils",
3
- "version": "4.1.4",
3
+ "version": "5.0.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",
@@ -13,8 +13,9 @@
13
13
  "scripts": {
14
14
  "prebuild": "rm -rf lib",
15
15
  "build": "tsc",
16
- "test": "ava",
17
- "test:ci": "c8 -r lcovonly -r text -r json ava"
16
+ "test": "vitest run",
17
+ "test:dev": "vitest",
18
+ "test:ci": "vitest run --reporter=default"
18
19
  },
19
20
  "keywords": [
20
21
  "nodejs",
@@ -52,15 +53,16 @@
52
53
  "execa": "^6.0.0",
53
54
  "map-obj": "^5.0.0",
54
55
  "micromatch": "^4.0.2",
55
- "moize": "^6.0.0",
56
+ "moize": "^6.1.3",
56
57
  "path-exists": "^5.0.0"
57
58
  },
58
59
  "devDependencies": {
59
- "ava": "^4.0.0",
60
- "c8": "^7.12.0"
60
+ "@types/node": "^14.18.31",
61
+ "typescript": "^4.8.4",
62
+ "vitest": "^0.24.1"
61
63
  },
62
64
  "engines": {
63
- "node": "^12.20.0 || ^14.14.0 || >=16.0.0"
65
+ "node": "^14.16.0 || >=16.0.0"
64
66
  },
65
- "gitHead": "5555ff52d82f1c26f2074ee52d5e7c5c6c8d02d2"
67
+ "gitHead": "701e883d4e19c048e8de9801e49e21de5c891a18"
66
68
  }