Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[breaking] Update pdfjs-dist to 4.2.67 #1774

Closed
wants to merge 4 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[breaking] Update pdfjs-dist to 4.2.67
wojtekmaj committed May 29, 2024
commit aeaa2aa043a0c6878b411959dfe14306b2d5761c
2 changes: 1 addition & 1 deletion packages/react-pdf/package.json
Original file line number Diff line number Diff line change
@@ -60,7 +60,7 @@
"make-cancellable-promise": "^1.3.1",
"make-event-props": "^1.6.0",
"merge-refs": "^1.3.0",
"pdfjs-dist": "4.0.379",
"pdfjs-dist": "4.2.67",
"tiny-invariant": "^1.0.0",
"warning": "^4.0.0"
},
1 change: 1 addition & 0 deletions packages/react-pdf/src/Page/AnnotationLayer.tsx
Original file line number Diff line number Diff line change
@@ -161,6 +161,7 @@ export default function AnnotationLayer() {
const annotationLayerParameters = {
accessibilityManager: null, // TODO: Implement this
annotationCanvasMap: null, // TODO: Implement this
annotationEditorUIManager: null, // TODO: Implement this
div: layer,
l10n: null, // TODO: Implement this
page,
2 changes: 1 addition & 1 deletion packages/react-pdf/src/index.spec.ts
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ describe('default entry', () => {
});

it('has GlobalWorkerOptions exported properly', () => {
expect(typeof pdfjs.GlobalWorkerOptions).toBe('object');
expect(typeof pdfjs.GlobalWorkerOptions).toBe('function');
});
});

4 changes: 3 additions & 1 deletion packages/react-pdf/src/shared/types.ts
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ import type {
PasswordResponses,
} from 'pdfjs-dist';
import type {
BinaryData,
TypedArray,
DocumentInitParameters,
RefProxy,
StructTreeNode,
@@ -57,6 +57,8 @@ export type ScrollPageIntoViewArgs = {
pageNumber: number;
};

type BinaryData = TypedArray | ArrayBuffer | number[] | string;

export type Source =
| { data: BinaryData | undefined }
| { range: PDFDataRangeTransport }
4 changes: 3 additions & 1 deletion test/shared/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import type { PDFDataRangeTransport } from 'pdfjs-dist';
import type { BinaryData } from 'pdfjs-dist/types/src/display/api.js';
import type { TypedArray } from 'pdfjs-dist/types/src/display/api.js';

type BinaryData = TypedArray | ArrayBuffer | number[] | string;

export type Source =
| { data: BinaryData | undefined }
22 changes: 11 additions & 11 deletions yarn.lock
Original file line number Diff line number Diff line change
@@ -4269,10 +4269,10 @@ __metadata:
languageName: node
linkType: hard

"path2d-polyfill@npm:^2.0.1":
version: 2.0.1
resolution: "path2d-polyfill@npm:2.0.1"
checksum: 10c0/b6d8c0764f65438cd884ef3b62c5af07d4f526b379c4c804effc26dd17936f18076941941f9e804c0df96d39720f155e9f0723e4b30feaee152ea4a441df023e
"path2d@npm:^0.2.0":
version: 0.2.0
resolution: "path2d@npm:0.2.0"
checksum: 10c0/fcf95e10a28ef9277a8e60c1df2b5279facb5894efa6a6c5225ec86b502aead1ea8fa90a3b21a7b5864e7a0ffb1405b360dc757c88794c5965bd43aa51b3c4f1
languageName: node
linkType: hard

@@ -4290,18 +4290,18 @@ __metadata:
languageName: node
linkType: hard

"pdfjs-dist@npm:4.0.379":
version: 4.0.379
resolution: "pdfjs-dist@npm:4.0.379"
"pdfjs-dist@npm:4.2.67":
version: 4.2.67
resolution: "pdfjs-dist@npm:4.2.67"
dependencies:
canvas: "npm:^2.11.2"
path2d-polyfill: "npm:^2.0.1"
path2d: "npm:^0.2.0"
dependenciesMeta:
canvas:
optional: true
path2d-polyfill:
path2d:
optional: true
checksum: 10c0/ac6bdc600ead7811482d5265a8b19ba40742babd0939823b31bda0fbc371d21ede86b173ef9c2adb3dbfcb27eab20e6cdba0a8811196e893d138bd280f2a7028
checksum: 10c0/1d6d427a2253b2c15cbb168d7f95fc26428134ff61113359653c36f92475a4abd8552913b1492489933304ccc4285328b5cbcff36825ae533b8cd4c279881348
languageName: node
linkType: hard

@@ -4522,7 +4522,7 @@ __metadata:
make-event-props: "npm:^1.6.0"
merge-refs: "npm:^1.3.0"
nodemon: "npm:^3.0.0"
pdfjs-dist: "npm:4.0.379"
pdfjs-dist: "npm:4.2.67"
prettier: "npm:^3.2.0"
react: "npm:^18.2.0"
react-dom: "npm:^18.2.0"