@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.
- package/.github/workflows/gh-pages.yml +6 -6
- package/.vscode/extensions.json +1 -1
- package/.vscode/settings.json +1 -1
- package/README.md +7 -0
- package/dist/browser.js +6 -2
- package/dist/browser.js.map +1 -1
- package/dist/cli.js +32 -3
- package/dist/cli.js.map +1 -1
- package/dist/decode.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/pdf.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/worker.js.map +1 -1
- package/package.json +2 -2
- package/prettier.config.js +1 -1
- package/src/cli.ts +29 -0
- package/src/decode.ts +1 -3
- package/src/index.ts +9 -2
- package/src/pdf.ts +3 -1
- package/tsconfig.json +53 -50
- package/wasm/core.c +6 -3
|
@@ -36,21 +36,21 @@ jobs:
|
|
|
36
36
|
- name: Setup Node.js
|
|
37
37
|
uses: actions/setup-node@v4
|
|
38
38
|
with:
|
|
39
|
-
node-version:
|
|
40
|
-
cache:
|
|
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:
|
|
53
|
+
path: "./dist"
|
|
54
54
|
|
|
55
55
|
# Deployment job
|
|
56
56
|
deploy:
|
package/.vscode/extensions.json
CHANGED
package/.vscode/settings.json
CHANGED
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.
|
|
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 {
|
|
1657
|
+
return {
|
|
1658
|
+
p: Promise.resolve(null),
|
|
1659
|
+
resolve: () => { },
|
|
1660
|
+
reject: () => { },
|
|
1661
|
+
};
|
|
1658
1662
|
}
|
|
1659
1663
|
let resolve;
|
|
1660
1664
|
let reject;
|