diff-lockfiles 1.0.2 → 1.0.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Change Log
2
2
 
3
+ ## 1.0.3 - 2024-06-06
4
+
5
+ - Only diff files whose string *ends* with package-lock.json (GH #24 Tim
6
+ Vergenz)
7
+
3
8
  ## 1.0.2 - 2023-09-07
4
9
 
5
10
  - Default to table layout rather than text
@@ -8,19 +8,15 @@ import { diff, print } from '../lib/index.js';
8
8
  const execPromise = promisify(exec);
9
9
  const version = '1.0.2';
10
10
 
11
- const lockFiles = async function getLockChangedLockFiles(a, b) {
12
- const output = await execPromise(`git diff ${a} ${b} --name-only | grep package-lock.json`);
11
+ async function lockFiles(a, b) {
12
+ const output = await execPromise(`git diff ${a} ${b} --name-only | grep 'package-lock.json$'`);
13
13
  const lines = output.stdout;
14
14
  const list = lines.trim().split(/\r\n|\r|\n/);
15
15
 
16
- if (output.stderr.trim !== '') {
17
- // console.error(output.stderr.trim);
18
- }
19
-
20
16
  return list;
21
17
  };
22
18
 
23
- const lockFileString = async function getLockFileString(maxBuffer, branch, filename) {
19
+ async function lockFileString(maxBuffer, branch, filename) {
24
20
  const output = await execPromise(`git show ${branch}:${filename}`, { maxBuffer: maxBuffer });
25
21
  const lines = output.stdout.trim();
26
22
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "diff-lockfiles",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "a diff for package-lock.json files",
5
5
  "repository": {
6
6
  "type": "git",
@@ -20,12 +20,12 @@
20
20
  },
21
21
  "dependencies": {
22
22
  "chalk": "^5.3.0",
23
- "commander": "^11.0.0",
23
+ "commander": "^12.0.0",
24
24
  "semver": "^7.5.4",
25
25
  "table": "^6.8.1"
26
26
  },
27
27
  "devDependencies": {
28
- "eslint": "^8.48.0",
28
+ "eslint": "^9.0.0",
29
29
  "jest": "^29.6.2"
30
30
  }
31
31
  }