From b5adbfc4d97cc4adb0e3fab20d3306d3cfd34702 Mon Sep 17 00:00:00 2001 From: Miguel Serrano Date: Wed, 2 Sep 2020 11:57:57 +0200 Subject: [PATCH] Merge pull request #3153 from overleaf/msm-pdfjs-2-4-es5 updated pdf-js to 2.4.456 using es5 distribution GitOrigin-RevId: 6890b26300a6984486c3a624cc20712574d8cbf0 --- .../js/ide/pdfng/directives/pdfJsLoader.js | 4 +- services/web/package-lock.json | 50 +++++++++---------- services/web/package.json | 5 +- 3 files changed, 30 insertions(+), 29 deletions(-) diff --git a/services/web/frontend/js/ide/pdfng/directives/pdfJsLoader.js b/services/web/frontend/js/ide/pdfng/directives/pdfJsLoader.js index dd5aabab63..99cc6e40fc 100644 --- a/services/web/frontend/js/ide/pdfng/directives/pdfJsLoader.js +++ b/services/web/frontend/js/ide/pdfng/directives/pdfJsLoader.js @@ -18,8 +18,8 @@ * to customise the loader's options. However the rest of the file is identical * to the one provided by PDF.js. */ -var pdfjs = require('pdfjs-dist/build/pdf.js') -var PdfjsWorker = require('pdfjs-dist/build/pdf.worker.js') +var pdfjs = require('pdfjs-dist/es5/build/pdf.js') +var PdfjsWorker = require('pdfjs-dist/es5/build/pdf.worker.js') if (typeof window !== 'undefined' && 'Worker' in window) { pdfjs.GlobalWorkerOptions.workerPort = new PdfjsWorker() diff --git a/services/web/package-lock.json b/services/web/package-lock.json index c810764d2b..307d724edd 100644 --- a/services/web/package-lock.json +++ b/services/web/package-lock.json @@ -5625,7 +5625,8 @@ "big.js": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz", - "integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==" + "integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==", + "dev": true }, "bignumber.js": { "version": "7.2.1", @@ -14936,6 +14937,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz", "integrity": "sha512-gkD9aSEG9UGglyPcDJqY9YBTUtCLKaBK6ihD2VP1d1X60lTfFspNZNulGBBbUZLkPygy4LySYHyxBpq+VhjObQ==", + "dev": true, "requires": { "big.js": "^3.1.3", "emojis-list": "^2.0.0", @@ -14945,7 +14947,8 @@ "json5": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", - "integrity": "sha512-4xrs1aW+6N5DalkqSVA8fxh458CXvR99WU8WLKmq4v8eWAL86Xo3BVqyd3SkA9wEVjCMqyvvRRkshAdOnBp5rw==" + "integrity": "sha512-4xrs1aW+6N5DalkqSVA8fxh458CXvR99WU8WLKmq4v8eWAL86Xo3BVqyd3SkA9wEVjCMqyvvRRkshAdOnBp5rw==", + "dev": true } } }, @@ -16500,11 +16503,6 @@ "propagate": "^2.0.0" } }, - "node-ensure": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/node-ensure/-/node-ensure-0.0.0.tgz", - "integrity": "sha512-DRI60hzo2oKN1ma0ckc6nQWlHU69RH6xN0sjQTjMpChPfTYvKZdcQFfdYK2RWbJcKyUizSIy/l8OTGxMAM1QDw==" - }, "node-environment-flags": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.5.tgz", @@ -18532,13 +18530,9 @@ } }, "pdfjs-dist": { - "version": "2.2.228", - "resolved": "https://registry.npmjs.org/pdfjs-dist/-/pdfjs-dist-2.2.228.tgz", - "integrity": "sha512-W5LhYPMS2UKX0ELIa4u+CFCMoox5qQNQElt0bAK2mwz1V8jZL0rvLao+0tBujce84PK6PvWG36Nwr7agCCWFGQ==", - "requires": { - "node-ensure": "^0.0.0", - "worker-loader": "^2.0.0" - } + "version": "2.4.456", + "resolved": "https://registry.npmjs.org/pdfjs-dist/-/pdfjs-dist-2.4.456.tgz", + "integrity": "sha512-yckJEHq3F48hcp6wStEpbN9McOj328Ib09UrBlGAKxvN2k+qYPN5iq6TH6jD1C0pso7zTep+g/CKsYgdrQd5QA==" }, "pend": { "version": "1.2.0", @@ -21705,36 +21699,41 @@ "version": "0.4.7", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.7.tgz", "integrity": "sha512-v/iwU6wvwGK8HbU9yi3/nhGzP0yGSuhQMzL6ySiec1FSrZZDkhm4noOSWzrNFo/jEc+SJY6jRTwuwbSXJPDUnQ==", + "dev": true, "requires": { "ajv": "^6.1.0", "ajv-keywords": "^3.1.0" }, "dependencies": { "ajv": { - "version": "6.10.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz", - "integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==", + "version": "6.12.4", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.4.tgz", + "integrity": "sha512-eienB2c9qVQs2KWexhkrdMLVDoIQCz5KSeLxwg9Lzk4DOfBtIK9PQwwufcsn1jjGuf9WZmqPMbGxOzfcuphJCQ==", + "dev": true, "requires": { - "fast-deep-equal": "^2.0.1", + "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", "json-schema-traverse": "^0.4.1", "uri-js": "^4.2.2" } }, "ajv-keywords": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.4.1.tgz", - "integrity": "sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ==" + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "dev": true }, "fast-deep-equal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha512-bCK/2Z4zLidyB4ReuIsvALH6w31YfAQDmXMqMx6FyfHqvBxtjC0eRumeSu4Bs3XtXwpyIywtSTrVT99BxY1f9w==" + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true }, "json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true } } }, @@ -26637,6 +26636,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/worker-loader/-/worker-loader-2.0.0.tgz", "integrity": "sha512-tnvNp4K3KQOpfRnD20m8xltE3eWh89Ye+5oj7wXEEHKac1P4oZ6p9oTj8/8ExqoSBnk9nu5Pr4nKfQ1hn2APJw==", + "dev": true, "requires": { "loader-utils": "^1.0.0", "schema-utils": "^0.4.0" diff --git a/services/web/package.json b/services/web/package.json index e8eb0a3267..93645e400c 100644 --- a/services/web/package.json +++ b/services/web/package.json @@ -115,7 +115,7 @@ "passport-orcid": "0.0.4", "passport-saml": "^1.3.3", "passport-twitter": "^1.0.4", - "pdfjs-dist": "^2.2.228", + "pdfjs-dist": "^2.4.456", "prop-types": "^15.7.2", "pug": "^2.0.4", "qrcode": "^1.4.4", @@ -215,6 +215,7 @@ "webpack-cli": "^3.3.11", "webpack-dev-server": "^3.11.0", "webpack-manifest-plugin": "^2.2.0", - "webpack-merge": "^4.2.2" + "webpack-merge": "^4.2.2", + "worker-loader": "^2.0.0" } }