@u1f992/pdfdiff 0.3.0 → 0.3.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.
@@ -36,21 +36,21 @@ jobs:
36
36
  - name: Setup Node.js
37
37
  uses: actions/setup-node@v4
38
38
  with:
39
- node-version: '22'
40
- cache: 'npm'
41
-
39
+ node-version: "22"
40
+ cache: "npm"
41
+
42
42
  - name: Install dependencies and build
43
43
  run: |
44
44
  npm ci
45
45
  npm run build
46
-
46
+
47
47
  - name: Setup Pages
48
48
  uses: actions/configure-pages@v5
49
-
49
+
50
50
  - name: Upload artifact
51
51
  uses: actions/upload-pages-artifact@v3
52
52
  with:
53
- path: './dist'
53
+ path: "./dist"
54
54
 
55
55
  # Deployment job
56
56
  deploy:
@@ -1,3 +1,3 @@
1
1
  {
2
2
  "recommendations": ["esbenp.prettier-vscode"]
3
- }
3
+ }
@@ -17,4 +17,4 @@
17
17
  "editor.formatOnSave": true,
18
18
  "editor.defaultFormatter": "esbenp.prettier-vscode"
19
19
  }
20
- }
20
+ }
package/README.md CHANGED
@@ -19,6 +19,13 @@ OPTIONS:
19
19
  --addition-color <#HEX> default: #4cae4fff
20
20
  --deletion-color <#HEX> default: #ff5724ff
21
21
  --modification-color <#HEX> default: #ffc105ff
22
+ --workers <N> default: min(CPU cores, 4)
23
+ --exit-code exit 1 if differences are found
22
24
  -v, --version
23
25
  -h, --help
26
+
27
+ EXIT STATUS:
28
+ 0 success (with --exit-code: no differences found)
29
+ 1 differences found (only with --exit-code)
30
+ 2 error
24
31
  ```
package/dist/browser.js CHANGED
@@ -1487,7 +1487,7 @@ function sliceBackingBuffer(src) {
1487
1487
  return src.buffer.slice(src.byteOffset, src.byteOffset + src.byteLength);
1488
1488
  }
1489
1489
 
1490
- const VERSION = "0.3.0";
1490
+ const VERSION = "0.3.1";
1491
1491
 
1492
1492
  // Default parallelism scales with the machine: rendering and diffing run across
1493
1493
  // several workers, so the out-of-the-box run uses the CPU rather than a single
@@ -1654,7 +1654,11 @@ async function* visualizeDifferences(a, b, options) {
1654
1654
  let aborted = null;
1655
1655
  const makeSlots = (count) => Array.from({ length: maxPages }, (_, i) => {
1656
1656
  if (i >= count) {
1657
- return { p: Promise.resolve(null), resolve: () => { }, reject: () => { } };
1657
+ return {
1658
+ p: Promise.resolve(null),
1659
+ resolve: () => { },
1660
+ reject: () => { },
1661
+ };
1658
1662
  }
1659
1663
  let resolve;
1660
1664
  let reject;