From 9bb1f0090c3acb4fcd17783b93d5e36a825115ee Mon Sep 17 00:00:00 2001 From: Aferdita Muriqi Date: Wed, 29 Mar 2023 07:48:31 -0400 Subject: [PATCH] Downgrade pdfjs to support safari >=14 --- package-lock.json | 22 +++++++++++----------- package.json | 4 ++-- src/navigator/PDFNavigator.ts | 2 +- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/package-lock.json b/package-lock.json index 71f572de..225a50fb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@d-i-t-a/reader", - "version": "2.3.2", + "version": "2.3.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@d-i-t-a/reader", - "version": "2.3.2", + "version": "2.3.3", "license": "Apache-2.0", "dependencies": { "@types/pdfjs-dist": "^2.7.4", @@ -20,7 +20,7 @@ "lodash.clonedeep": "^4.5.0", "loglevel": "^1.8.0", "mark.js": "^8.11.1", - "pdfjs-dist": "2.16.105", + "pdfjs-dist": "2.14.305", "promise-polyfill": "^8.2.0", "r2-shared-js": "^1.0.51", "recursive-readdir": "^2.2.2", @@ -8514,11 +8514,11 @@ } }, "node_modules/pdfjs-dist": { - "version": "2.16.105", - "resolved": "https://registry.npmjs.org/pdfjs-dist/-/pdfjs-dist-2.16.105.tgz", - "integrity": "sha512-J4dn41spsAwUxCpEoVf6GVoz908IAA3mYiLmNxg8J9kfRXc2jxpbUepcP0ocp0alVNLFthTAM8DZ1RaHh8sU0A==", + "version": "2.14.305", + "resolved": "https://registry.npmjs.org/pdfjs-dist/-/pdfjs-dist-2.14.305.tgz", + "integrity": "sha512-5f7i25J1dKIBczhgfxEgNxfYNIxXEdxqo6Qb4ehY7Ja+p6AI4uUmk/OcVGXfRGm2ys5iaJJhJUwBFwv6Jl/Qww==", "dependencies": { - "dommatrix": "^1.0.3", + "dommatrix": "^1.0.1", "web-streams-polyfill": "^3.2.1" }, "peerDependencies": { @@ -17701,11 +17701,11 @@ "dev": true }, "pdfjs-dist": { - "version": "2.16.105", - "resolved": "https://registry.npmjs.org/pdfjs-dist/-/pdfjs-dist-2.16.105.tgz", - "integrity": "sha512-J4dn41spsAwUxCpEoVf6GVoz908IAA3mYiLmNxg8J9kfRXc2jxpbUepcP0ocp0alVNLFthTAM8DZ1RaHh8sU0A==", + "version": "2.14.305", + "resolved": "https://registry.npmjs.org/pdfjs-dist/-/pdfjs-dist-2.14.305.tgz", + "integrity": "sha512-5f7i25J1dKIBczhgfxEgNxfYNIxXEdxqo6Qb4ehY7Ja+p6AI4uUmk/OcVGXfRGm2ys5iaJJhJUwBFwv6Jl/Qww==", "requires": { - "dommatrix": "^1.0.3", + "dommatrix": "^1.0.1", "web-streams-polyfill": "^3.2.1" } }, diff --git a/package.json b/package.json index 8f22de68..6e74fee0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@d-i-t-a/reader", - "version": "2.3.2", + "version": "2.3.3", "description": "A viewer application for EPUB files.", "repository": "https://github.com/d-i-t-a/R2D2BC", "license": "Apache-2.0", @@ -35,7 +35,7 @@ "lodash.clonedeep": "^4.5.0", "loglevel": "^1.8.0", "mark.js": "^8.11.1", - "pdfjs-dist": "2.16.105", + "pdfjs-dist": "2.14.305", "promise-polyfill": "^8.2.0", "r2-shared-js": "^1.0.51", "recursive-readdir": "^2.2.2", diff --git a/src/navigator/PDFNavigator.ts b/src/navigator/PDFNavigator.ts index 30652bd7..9b5b461f 100644 --- a/src/navigator/PDFNavigator.ts +++ b/src/navigator/PDFNavigator.ts @@ -83,7 +83,7 @@ export class PDFNavigator extends EventEmitter implements Navigator { this.resourceIndex = 0; this.resource = this.publication.readingOrder[this.resourceIndex]; - GlobalWorkerOptions.workerSrc = `//cdnjs.cloudflare.com/ajax/libs/pdf.js/2.16.105/pdf.worker.js`; + GlobalWorkerOptions.workerSrc = `//cdnjs.cloudflare.com/ajax/libs/pdf.js/2.14.305/pdf.worker.js`; this.wrapper = HTMLUtilities.findRequiredElement( this.mainElement, "main#iframe-wrapper"