Skip to content

Commit

Permalink
Update pdfjs-dist to 4.8.69 (#1921)
Browse files Browse the repository at this point in the history
* Update pdfjs-dist to 4.8.69

* Update canvas to 3.0.0-rc2

---------

Co-authored-by: Wojciech Maj <[email protected]>
  • Loading branch information
MGPOCKY and wojtekmaj authored Dec 19, 2024
1 parent a98238a commit 70a0f3b
Show file tree
Hide file tree
Showing 6 changed files with 280 additions and 172 deletions.
16 changes: 0 additions & 16 deletions .yarn/patches/pdfjs-dist-npm-4.6.82-35a0e70ced.patch

This file was deleted.

16 changes: 16 additions & 0 deletions .yarn/patches/pdfjs-dist-npm-4.8.69-789befba80.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
diff --git a/build/pdf.mjs b/build/pdf.mjs
index f3f03fa38953ebe0b8666c706c751c7e12628752..9dcca9f372547f63b35c9afcaeaa5171932b636c 100644
--- a/build/pdf.mjs
+++ b/build/pdf.mjs
@@ -5766,8 +5766,9 @@ if (isNodeJS) {
const fs = await import(/*webpackIgnore: true*/"fs"),
http = await import(/*webpackIgnore: true*/"http"),
https = await import(/*webpackIgnore: true*/"https"),
- url = await import(/*webpackIgnore: true*/"url");
- let canvas, path2d;
+ url = await import(/*webpackIgnore: true*/"url"),
+ canvas = await import( /*webpackIgnore: true*/"canvas");
+ let path2d;
return new Map(Object.entries({
fs,
http,
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"husky": "^9.0.0"
},
"resolutions": {
"pdfjs-dist": "patch:pdfjs-dist@npm:4.6.82#.yarn/patches/pdfjs-dist-npm-4.6.82-35a0e70ced.patch"
"pdfjs-dist": "patch:pdfjs-dist@npm:4.8.69#.yarn/patches/pdfjs-dist-npm-4.8.69-789befba80.patch"
},
"packageManager": "[email protected]"
}
4 changes: 2 additions & 2 deletions packages/react-pdf/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"make-cancellable-promise": "^1.3.1",
"make-event-props": "^1.6.0",
"merge-refs": "^1.3.0",
"pdfjs-dist": "4.6.82",
"pdfjs-dist": "4.8.69",
"tiny-invariant": "^1.0.0",
"warning": "^4.0.0"
},
Expand All @@ -70,7 +70,7 @@
"@types/react": "*",
"@types/react-dom": "*",
"@types/warning": "^3.0.0",
"canvas": "^2.11.2",
"canvas": "^3.0.0-rc2",
"core-js": "^3.37.0",
"cpy-cli": "^5.0.0",
"jsdom": "^24.0.0",
Expand Down
1 change: 1 addition & 0 deletions packages/react-pdf/src/Page/AnnotationLayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ export default function AnnotationLayer(): React.ReactElement {
div: layer,
l10n: null, // TODO: Implement this
page,
structTreeLayer: null, // TODO: Implement this
viewport: clonedViewport,
};

Expand Down
Loading

0 comments on commit 70a0f3b

Please sign in to comment.