diff --git a/package.json b/package.json index fedecdc1a..62bf5bb4f 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,7 @@ "make-event-props": "^1.1.0", "merge-class-names": "^1.1.1", "merge-refs": "^1.0.0", - "pdfjs-dist": "2.4.456", + "pdfjs-dist": "2.5.207", "prop-types": "^15.6.2", "worker-loader": "^3.0.0" }, diff --git a/src/Document.jsx b/src/Document.jsx index c1a54d73a..f700b35b6 100644 --- a/src/Document.jsx +++ b/src/Document.jsx @@ -6,7 +6,7 @@ import PropTypes from 'prop-types'; import makeEventProps from 'make-event-props'; import makeCancellable from 'make-cancellable-promise'; import mergeClassNames from 'merge-class-names'; -import pdfjs from 'pdfjs-dist/build/pdf'; +import * as pdfjs from 'pdfjs-dist'; import DocumentContext from './DocumentContext'; diff --git a/src/Page.spec.jsx b/src/Page.spec.jsx index f10c5aea6..b2d6c5dd8 100644 --- a/src/Page.spec.jsx +++ b/src/Page.spec.jsx @@ -54,8 +54,8 @@ describe('Page', () => { unregisterPageArguments = page._pageIndex; }); - describe('loading', () => { - it('loads a page and calls onLoadSuccess callback properly', async () => { + describe.only('loading', () => { + it.only('loads a page and calls onLoadSuccess callback properly', async () => { const { func: onLoadSuccess, promise: onLoadSuccessPromise } = makeAsyncCallback(); shallow( diff --git a/src/Page/AnnotationLayer.jsx b/src/Page/AnnotationLayer.jsx index ba07fd1cc..4d929edcd 100644 --- a/src/Page/AnnotationLayer.jsx +++ b/src/Page/AnnotationLayer.jsx @@ -1,6 +1,6 @@ import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; -import pdfjs from 'pdfjs-dist/build/pdf'; +import * as pdfjs from 'pdfjs-dist/build/pdf'; import makeCancellable from 'make-cancellable-promise'; import DocumentContext from '../DocumentContext'; diff --git a/src/Page/PageSVG.jsx b/src/Page/PageSVG.jsx index 64eed2ef7..5c2a963b3 100644 --- a/src/Page/PageSVG.jsx +++ b/src/Page/PageSVG.jsx @@ -1,6 +1,6 @@ import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; -import pdfjs from 'pdfjs-dist/build/pdf'; +import * as pdfjs from 'pdfjs-dist/build/pdf'; import PageContext from '../PageContext'; diff --git a/src/entry.jest.js b/src/entry.jest.js index 8d7e2505e..0c3ea85d4 100644 --- a/src/entry.jest.js +++ b/src/entry.jest.js @@ -1,4 +1,4 @@ -import pdfjs from 'pdfjs-dist/es5/build/pdf'; +import * as pdfjs from 'pdfjs-dist/es5/build/pdf'; import Document from './Document'; import Outline from './Outline'; import Page from './Page'; diff --git a/src/entry.js b/src/entry.js index baba403c8..4c537bf74 100644 --- a/src/entry.js +++ b/src/entry.js @@ -1,4 +1,4 @@ -import pdfjs from 'pdfjs-dist/build/pdf'; +import * as pdfjs from 'pdfjs-dist/build/pdf'; import Document from './Document'; import Outline from './Outline'; import Page from './Page'; diff --git a/src/entry.parcel.js b/src/entry.parcel.js index 7f0c724b5..eb0d621ab 100644 --- a/src/entry.parcel.js +++ b/src/entry.parcel.js @@ -1,4 +1,4 @@ -import pdfjs from 'pdfjs-dist/build/pdf'; +import * as pdfjs from 'pdfjs-dist/build/pdf'; import Document from './Document'; import Outline from './Outline'; import Page from './Page'; diff --git a/src/entry.webpack.js b/src/entry.webpack.js index 301d59f8e..7503addbb 100644 --- a/src/entry.webpack.js +++ b/src/entry.webpack.js @@ -1,4 +1,4 @@ -import pdfjs from 'pdfjs-dist/build/pdf'; +import * as pdfjs from 'pdfjs-dist/build/pdf'; import Document from './Document'; import Outline from './Outline'; import Page from './Page'; diff --git a/yarn.lock b/yarn.lock index b26387f0b..8857f4934 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6755,10 +6755,10 @@ fsevents@^2.1.2: languageName: node linkType: hard -"pdfjs-dist@npm:2.4.456": - version: 2.4.456 - resolution: "pdfjs-dist@npm:2.4.456" - checksum: 3d90379d6503127d5b969d16a23cb1928cd58e01752efa065c1b530fd9981f4ec9a4239e37fff7690315ff8d4335994f3e292206ac1d537cdf3e5b0f6ddcd27d +"pdfjs-dist@npm:2.5.207": + version: 2.5.207 + resolution: "pdfjs-dist@npm:2.5.207" + checksum: b1a1536d46507493316cdb1f90e103f95a1538353c592c5b31a70bff39d4a10ee731541705d95aa36b7293ffca8af2203af2a86af1761fae75b65b1be196c147 languageName: node linkType: hard @@ -7032,7 +7032,7 @@ fsevents@^2.1.2: make-event-props: ^1.1.0 merge-class-names: ^1.1.1 merge-refs: ^1.0.0 - pdfjs-dist: 2.4.456 + pdfjs-dist: 2.5.207 prop-types: ^15.6.2 react: ^16.7.0 react-dom: ^16.7.0