diff-lockfiles 1.0.0 → 1.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/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Change Log
2
2
 
3
+ ## 1.0.1 - 2023-09-07
4
+
5
+ - Improve documentation
6
+
3
7
  ## 1.0.0 - 2023-09-06
4
8
 
5
9
  - First release
package/README.md CHANGED
@@ -16,8 +16,8 @@ diff-lockfiles origin/main dependabot/branch
16
16
  ## Usage
17
17
 
18
18
  ```text
19
- diff-lockfiles.js --help
20
- Usage: diff-lockfiles.js [options] <from> <to>
19
+ diff-lockfiles --help
20
+ Usage: diff-lockfiles [options] <from> <to>
21
21
 
22
22
  diff all changed package-lock.json files in repo
23
23
 
@@ -32,7 +32,7 @@ Options:
32
32
  ### `--format=text` (default)
33
33
 
34
34
  ```text
35
- $ diff-lockfiles.js --format text HEAD~1 HEAD
35
+ $ diff-lockfiles --format text HEAD~1 HEAD
36
36
  node_modules/@jest/console 29.6.2 -> 29.6.3
37
37
  node_modules/@jest/core 29.6.2 -> 29.6.3
38
38
  node_modules/@jest/environment 29.6.2 -> 29.6.3
@@ -89,7 +89,7 @@ node_modules/@jest/reporters/node_modules/istanbul-lib-instrument added
89
89
 
90
90
  ### `--format=json`
91
91
 
92
- `diff-lockfiles.js --format text HEAD~1 HEAD`
92
+ `diff-lockfiles --format text HEAD~1 HEAD`
93
93
 
94
94
  ```json
95
95
  {
@@ -307,7 +307,7 @@ node_modules/@jest/reporters/node_modules/istanbul-lib-instrument added
307
307
  ### `--format=table`
308
308
 
309
309
  ```texst
310
- $ diff-lockfiles.js --format table HEAD~1 HEAD
310
+ $ diff-lockfiles --format table HEAD~1 HEAD
311
311
  ╔═══════════════════════════════════════════════════════════════════╤═════════════╤═════════════╗
312
312
  ║ package-lock.json │ │ ║
313
313
  ╟───────────────────────────────────────────────────────────────────┼─────────────┼─────────────╢
@@ -418,3 +418,9 @@ $ diff-lockfiles.js --format table HEAD~1 HEAD
418
418
  ║ node_modules/@jest/reporters/node_modules/istanbul-lib-instrument │ null │ 6.0.0 ║
419
419
  ╚═══════════════════════════════════════════════════════════════════╧═════════════╧═════════════╝
420
420
  ```
421
+
422
+ ## Testing
423
+
424
+ ```bash
425
+ NODE_OPTIONS=--experimental-vm-modules npm test
426
+ ```
@@ -6,6 +6,7 @@ import { promisify } from 'node:util';
6
6
  import { diff, print } from '../lib/index.js';
7
7
 
8
8
  const execPromise = promisify(exec);
9
+ const version = '1.0.1';
9
10
 
10
11
  const lockFiles = async function getLockChangedLockFiles(a, b) {
11
12
  const output = await execPromise(`git diff ${a} ${b} --name-only | grep package-lock.json`);
@@ -32,9 +33,9 @@ const lockFileString = async function getLockFileString(maxBuffer, branch, filen
32
33
 
33
34
  const cli = new Command();
34
35
  cli
35
- .command('diff-lockfiles.js')
36
+ .command('diff-lockfiles')
36
37
  .description('diff all changed package-lock.json files in repo')
37
- .version('1.0.0')
38
+ .version(version)
38
39
  .arguments('<from> <to>')
39
40
  .option('-f, --format <format>', 'changes the output format', 'text')
40
41
  .option('-m, --max-buffer', 'maximum read buffer size', 1024 * 10000)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "diff-lockfiles",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "a diff for package-lock.json files",
5
5
  "repository": {
6
6
  "type": "git",