Skip to content

Commit

Permalink
Updating libraries including pdfjs-dist v2
Browse files Browse the repository at this point in the history
  • Loading branch information
mikecousins committed Nov 2, 2017
1 parent e2cc746 commit c1ee606
Show file tree
Hide file tree
Showing 4 changed files with 89 additions and 70 deletions.
8 changes: 4 additions & 4 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
node: true
},
rules: {
consistent-return: "off",
linebreak-style: "off",
consistent-return: "warn",
no-bitwise: "off",
react/forbid-prop-types: "off",
react/require-default-props: "off"
prefer-promise-reject-errors: "warn",
react/forbid-prop-types: "warn",
react/require-default-props: "warn"
},
}
26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-pdf-js",
"version": "2.0.5",
"version": "3.0.0",
"description": "A React component to wrap PDF.js",
"main": "./lib/index.js",
"jsnext:main": "./src/index.js",
Expand Down Expand Up @@ -34,29 +34,29 @@
"react-dom": ">=15"
},
"dependencies": {
"pdfjs-dist": "^1.9.575",
"prop-types": "^15.5.10"
"pdfjs-dist": "^2.0.91",
"prop-types": "^15.6.0"
},
"devDependencies": {
"babel-cli": "6.26.0",
"babel-core": "6.26.0",
"babel-eslint": "8.0.0",
"babel-eslint": "8.0.1",
"babel-loader": "7.1.2",
"babel-plugin-transform-runtime": "6.23.0",
"babel-preset-env": "1.6.0",
"babel-preset-env": "1.6.1",
"babel-preset-react": "6.24.1",
"babel-preset-stage-2": "6.24.1",
"babel-runtime": "6.26.0",
"eslint": "4.7.1",
"eslint-config-airbnb": "15.1.0",
"eslint-plugin-import": "2.7.0",
"eslint-plugin-jsx-a11y": "5.1.1",
"eslint-plugin-react": "7.3.0",
"react": "16.0.0-rc.2",
"react-dom": "16.0.0-rc.2",
"eslint": "4.10.0",
"eslint-config-airbnb": "16.1.0",
"eslint-plugin-import": "2.8.0",
"eslint-plugin-jsx-a11y": "6.0.2",
"eslint-plugin-react": "7.4.0",
"react": "16.0.0",
"react-dom": "16.0.0",
"rifraf": "2.0.3",
"rimraf": "2.6.2",
"webpack": "3.6.0"
"webpack": "3.8.1"
},
"npmName": "react-pdf-js",
"npmFileMap": [
Expand Down
3 changes: 1 addition & 2 deletions src/Pdf.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React from 'react';
import PropTypes from 'prop-types';

require('pdfjs-dist/build/pdf.combined');
require('pdfjs-dist/web/compatibility');

const makeCancelable = (promise) => {
let hasCanceled = false;
Expand Down Expand Up @@ -62,7 +61,7 @@ class Pdf extends React.Component {
const encodings = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';

const bytes = new Uint8Array(arrayBuffer);
const byteLength = bytes.byteLength;
const { byteLength } = bytes;
const byteRemainder = byteLength % 3;
const mainLength = byteLength - byteRemainder;

Expand Down
122 changes: 71 additions & 51 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,9 @@ babel-core@6.26.0, babel-core@^6.26.0:
slash "^1.0.0"
source-map "^0.5.6"

babel-eslint@8.0.0:
version "8.0.0"
resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-8.0.0.tgz#ce06f385bdfb5b6d7e603f06222f891abd14c240"
babel-eslint@8.0.1:
version "8.0.1"
resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-8.0.1.tgz#5d718be7a328625d006022eb293ed3008cbd6346"
dependencies:
babel-code-frame "7.0.0-beta.0"
babel-traverse "7.0.0-beta.0"
Expand Down Expand Up @@ -796,9 +796,9 @@ babel-polyfill@^6.26.0:
core-js "^2.5.0"
regenerator-runtime "^0.10.5"

babel-preset-env@1.6.0:
version "1.6.0"
resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.6.0.tgz#2de1c782a780a0a5d605d199c957596da43c44e4"
babel-preset-env@1.6.1:
version "1.6.1"
resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.6.1.tgz#a18b564cc9b9afdf4aae57ae3c1b0d99188e6f48"
dependencies:
babel-plugin-check-es2015-constants "^6.22.0"
babel-plugin-syntax-trailing-function-commas "^6.22.0"
Expand Down Expand Up @@ -1635,17 +1635,17 @@ escope@^3.6.0:
esrecurse "^4.1.0"
estraverse "^4.1.1"

eslint-config-airbnb-base@^11.3.0:
version "11.3.1"
resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-11.3.1.tgz#c0ab108c9beed503cb999e4c60f4ef98eda0ed30"
eslint-config-airbnb-base@^12.1.0:
version "12.1.0"
resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-12.1.0.tgz#386441e54a12ccd957b0a92564a4bafebd747944"
dependencies:
eslint-restricted-globals "^0.1.1"

eslint-config-airbnb@15.1.0:
version "15.1.0"
resolved "https://registry.yarnpkg.com/eslint-config-airbnb/-/eslint-config-airbnb-15.1.0.tgz#fd432965a906e30139001ba830f58f73aeddae8e"
eslint-config-airbnb@16.1.0:
version "16.1.0"
resolved "https://registry.yarnpkg.com/eslint-config-airbnb/-/eslint-config-airbnb-16.1.0.tgz#2546bfb02cc9fe92284bf1723ccf2e87bc45ca46"
dependencies:
eslint-config-airbnb-base "^11.3.0"
eslint-config-airbnb-base "^12.1.0"

eslint-import-resolver-node@^0.3.1:
version "0.3.1"
Expand All @@ -1661,9 +1661,9 @@ eslint-module-utils@^2.1.1:
debug "^2.6.8"
pkg-dir "^1.0.0"

eslint-plugin-import@2.7.0:
version "2.7.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.7.0.tgz#21de33380b9efb55f5ef6d2e210ec0e07e7fa69f"
eslint-plugin-import@2.8.0:
version "2.8.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.8.0.tgz#fa1b6ef31fcb3c501c09859c1b86f1fc5b986894"
dependencies:
builtin-modules "^1.1.1"
contains-path "^0.1.0"
Expand All @@ -1676,9 +1676,9 @@ eslint-plugin-import@2.7.0:
minimatch "^3.0.3"
read-pkg-up "^2.0.0"

eslint-plugin-jsx-a11y@5.1.1:
version "5.1.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-5.1.1.tgz#5c96bb5186ca14e94db1095ff59b3e2bd94069b1"
eslint-plugin-jsx-a11y@6.0.2:
version "6.0.2"
resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.0.2.tgz#659277a758b036c305a7e4a13057c301cd3be73f"
dependencies:
aria-query "^0.7.0"
array-includes "^3.0.3"
Expand All @@ -1688,9 +1688,9 @@ eslint-plugin-jsx-a11y@5.1.1:
emoji-regex "^6.1.0"
jsx-ast-utils "^1.4.0"

eslint-plugin-react@7.3.0:
version "7.3.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.3.0.tgz#ca9368da36f733fbdc05718ae4e91f778f38e344"
eslint-plugin-react@7.4.0:
version "7.4.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.4.0.tgz#300a95861b9729c087d362dd64abcc351a74364a"
dependencies:
doctrine "^2.0.0"
has "^1.0.1"
Expand All @@ -1708,9 +1708,9 @@ eslint-scope@^3.7.1:
esrecurse "^4.1.0"
estraverse "^4.1.1"

eslint@4.7.1:
version "4.7.1"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.7.1.tgz#849804136953ebe366782f9f8611e2cbd1b54681"
eslint@4.10.0:
version "4.10.0"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.10.0.tgz#f25d0d7955c81968c2309aa5c9a229e045176bb7"
dependencies:
ajv "^5.2.0"
babel-code-frame "^6.22.0"
Expand Down Expand Up @@ -1853,6 +1853,18 @@ fast-levenshtein@~2.0.4:
version "2.0.6"
resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917"

fbjs@^0.8.16:
version "0.8.16"
resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.16.tgz#5e67432f550dc41b572bf55847b8aca64e5337db"
dependencies:
core-js "^1.0.0"
isomorphic-fetch "^2.1.1"
loose-envify "^1.0.0"
object-assign "^4.1.0"
promise "^7.1.1"
setimmediate "^1.0.5"
ua-parser-js "^0.7.9"

fbjs@^0.8.9:
version "0.8.12"
resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.12.tgz#10b5d92f76d45575fd63a217d4ea02bea2f8ed04"
Expand Down Expand Up @@ -2497,7 +2509,7 @@ loader-runner@^2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.3.0.tgz#f482aea82d543e07921700d5a46ef26fdac6b8a2"

loader-utils@^1.0.2, loader-utils@^1.1.0:
loader-utils@^1.0.0, loader-utils@^1.0.2, loader-utils@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.1.0.tgz#c98aef488bcceda2ffb5e2de646d6a754429f5cd"
dependencies:
Expand Down Expand Up @@ -2737,7 +2749,7 @@ oauth-sign@~0.8.1:
version "0.8.2"
resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43"

object-assign@^4.0.1, object-assign@^4.1.0:
object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"

Expand Down Expand Up @@ -2899,12 +2911,12 @@ pbkdf2@^3.0.3:
safe-buffer "^5.0.1"
sha.js "^2.4.8"

pdfjs-dist@^1.9.575:
version "1.9.575"
resolved "https://registry.yarnpkg.com/pdfjs-dist/-/pdfjs-dist-1.9.575.tgz#983cab659876f02f4f6bc67251c7385528c735e2"
pdfjs-dist@^2.0.91:
version "2.0.91"
resolved "https://registry.yarnpkg.com/pdfjs-dist/-/pdfjs-dist-2.0.91.tgz#2aae420b2cb940d074968883ef20e02eb4b8bd15"
dependencies:
node-ensure "^0.0.0"
worker-loader "^0.8.0"
worker-loader "^1.0.0"

performance-now@^0.2.0:
version "0.2.0"
Expand Down Expand Up @@ -2970,13 +2982,21 @@ promise@^7.1.1:
dependencies:
asap "~2.0.3"

prop-types@^15.5.10, prop-types@^15.5.6:
prop-types@^15.5.10:
version "15.5.10"
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.5.10.tgz#2797dfc3126182e3a95e3dfbb2e893ddd7456154"
dependencies:
fbjs "^0.8.9"
loose-envify "^1.3.1"

prop-types@^15.6.0:
version "15.6.0"
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.0.tgz#ceaf083022fc46b4a35f69e13ef75aed0d639856"
dependencies:
fbjs "^0.8.16"
loose-envify "^1.3.1"
object-assign "^4.1.1"

prr@~0.0.0:
version "0.0.0"
resolved "https://registry.yarnpkg.com/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a"
Expand Down Expand Up @@ -3037,23 +3057,23 @@ rc@^1.1.7:
minimist "^1.2.0"
strip-json-comments "~2.0.1"

react-dom@16.0.0-rc.2:
version "16.0.0-rc.2"
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.0.0-rc.2.tgz#f94dc1c350acd67284233558996a8293d7aa99c7"
react-dom@16.0.0:
version "16.0.0"
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.0.0.tgz#9cc3079c3dcd70d4c6e01b84aab2a7e34c303f58"
dependencies:
fbjs "^0.8.9"
fbjs "^0.8.16"
loose-envify "^1.1.0"
object-assign "^4.1.0"
prop-types "^15.5.6"
object-assign "^4.1.1"
prop-types "^15.6.0"

react@16.0.0-rc.2:
version "16.0.0-rc.2"
resolved "https://registry.yarnpkg.com/react/-/react-16.0.0-rc.2.tgz#1e55cc18fd9c56260f1d0ccf9caca6d3152dc83c"
react@16.0.0:
version "16.0.0"
resolved "https://registry.yarnpkg.com/react/-/react-16.0.0.tgz#ce7df8f1941b036f02b2cca9dbd0cb1f0e855e2d"
dependencies:
fbjs "^0.8.9"
fbjs "^0.8.16"
loose-envify "^1.1.0"
object-assign "^4.1.0"
prop-types "^15.5.6"
object-assign "^4.1.1"
prop-types "^15.6.0"

read-pkg-up@^2.0.0:
version "2.0.0"
Expand Down Expand Up @@ -3651,9 +3671,9 @@ webpack-sources@^1.0.1:
source-list-map "^2.0.0"
source-map "~0.5.3"

webpack@3.6.0:
version "3.6.0"
resolved "https://registry.yarnpkg.com/webpack/-/webpack-3.6.0.tgz#a89a929fbee205d35a4fa2cc487be9cbec8898bc"
webpack@3.8.1:
version "3.8.1"
resolved "https://registry.yarnpkg.com/webpack/-/webpack-3.8.1.tgz#b16968a81100abe61608b0153c9159ef8bb2bd83"
dependencies:
acorn "^5.0.0"
acorn-dynamic-import "^2.0.0"
Expand Down Expand Up @@ -3710,11 +3730,11 @@ wordwrap@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb"

worker-loader@^0.8.0:
version "0.8.1"
resolved "https://registry.yarnpkg.com/worker-loader/-/worker-loader-0.8.1.tgz#e8e995331ea34df5bf68296824bfb7f0ad578d43"
worker-loader@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/worker-loader/-/worker-loader-1.1.0.tgz#8cf21869a07add84d66f821d948d23c1eb98e809"
dependencies:
loader-utils "^1.0.2"
loader-utils "^1.0.0"
schema-utils "^0.3.0"

wrap-ansi@^2.0.0:
Expand Down

0 comments on commit c1ee606

Please sign in to comment.