From 02eb49f3c3f8536c8952de4d308652f8fa546163 Mon Sep 17 00:00:00 2001 From: Andrii Vitiv Date: Fri, 20 Sep 2024 14:12:09 +0300 Subject: [PATCH] Update react-fast-pdf to v1.0.15 --- package-lock.json | 18 +++++++++--------- package.json | 28 +++++++++++++--------------- patches/react-fast-pdf+1.0.14.patch | 13 ------------- patches/react-pdf+9.1.0.patch | 24 ------------------------ 4 files changed, 22 insertions(+), 61 deletions(-) delete mode 100644 patches/react-fast-pdf+1.0.14.patch delete mode 100644 patches/react-pdf+9.1.0.patch diff --git a/package-lock.json b/package-lock.json index d43c8fee25c5..c5fe31ceab3d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -71,7 +71,7 @@ "react-content-loader": "^7.0.0", "react-dom": "18.3.1", "react-error-boundary": "^4.0.11", - "react-fast-pdf": "1.0.14", + "react-fast-pdf": "1.0.15", "react-map-gl": "^7.1.3", "react-native": "0.75.2", "react-native-android-location-enabler": "^2.0.1", @@ -117,7 +117,6 @@ "react-native-web": "^0.19.12", "react-native-web-sound": "^0.1.3", "react-native-webview": "13.8.6", - "react-pdf": "9.1.0", "react-plaid-link": "3.3.2", "react-web-config": "^1.0.0", "react-webcam": "^7.1.1", @@ -34250,10 +34249,11 @@ } }, "node_modules/react-fast-pdf": { - "version": "1.0.14", - "license": "MIT", + "version": "1.0.15", + "resolved": "https://registry.npmjs.org/react-fast-pdf/-/react-fast-pdf-1.0.15.tgz", + "integrity": "sha512-xXrwIfRUD3KSRrBdfAeGnLZTf0kYUa+d6GGee1Hu0PFAv5QPBeF3tcV+DU+Cm/JMjSuR7s5g0KK9bePQ/xiQ+w==", "dependencies": { - "react-pdf": "^7.7.0", + "react-pdf": "^9.1.1", "react-window": "^1.8.10" }, "engines": { @@ -34262,7 +34262,7 @@ }, "peerDependencies": { "lodash": "4.x", - "prop-types": "15.x", + "pdfjs-dist": "4.x", "react": "18.x", "react-dom": "18.x" } @@ -36653,9 +36653,9 @@ } }, "node_modules/react-pdf": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/react-pdf/-/react-pdf-9.1.0.tgz", - "integrity": "sha512-KhPDQE3QshkLdS3b48S5Bldv0N5flob6qwvsiADWdZOS5TMDaIrkRtEs+Dyl6ubRf2jTf9jWmFb6RjWu46lSSg==", + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/react-pdf/-/react-pdf-9.1.1.tgz", + "integrity": "sha512-Cn3RTJZMqVOOCgLMRXDamLk4LPGfyB2Np3OwQAUjmHIh47EpuGW1OpAA1Z1GVDLoHx4d5duEDo/YbUkDbr4QFQ==", "dependencies": { "clsx": "^2.0.0", "dequal": "^2.0.3", diff --git a/package.json b/package.json index e8322960c61c..c1f9221ac162 100644 --- a/package.json +++ b/package.json @@ -128,7 +128,7 @@ "react-content-loader": "^7.0.0", "react-dom": "18.3.1", "react-error-boundary": "^4.0.11", - "react-fast-pdf": "1.0.14", + "react-fast-pdf": "1.0.15", "react-map-gl": "^7.1.3", "react-native": "0.75.2", "react-native-android-location-enabler": "^2.0.1", @@ -174,22 +174,12 @@ "react-native-web": "^0.19.12", "react-native-web-sound": "^0.1.3", "react-native-webview": "13.8.6", - "react-pdf": "9.1.0", "react-plaid-link": "3.3.2", "react-web-config": "^1.0.0", "react-webcam": "^7.1.1", "react-window": "^1.8.9" }, "devDependencies": { - "@fullstory/babel-plugin-react-native": "^1.2.1", - "@kie/act-js": "^2.6.2", - "@kie/mock-github": "2.0.1", - "@vue/preload-webpack-plugin": "^2.0.0", - "jest-expo": "51.0.4", - "jest-when": "^3.5.2", - "react-compiler-runtime": "file:./lib/react-compiler-runtime", - "semver": "7.5.2", - "xlsx": "file:vendor/xlsx-0.20.3.tgz", "@actions/core": "1.10.0", "@actions/github": "5.1.1", "@babel/core": "^7.20.0", @@ -198,6 +188,7 @@ "@babel/plugin-proposal-export-namespace-from": "^7.18.9", "@babel/plugin-proposal-private-methods": "^7.18.6", "@babel/plugin-proposal-private-property-in-object": "^7.21.11", + "@babel/plugin-transform-class-properties": "^7.25.4", "@babel/preset-env": "^7.20.0", "@babel/preset-flow": "^7.12.13", "@babel/preset-react": "^7.10.4", @@ -209,7 +200,10 @@ "@dword-design/eslint-plugin-import-alias": "^5.0.0", "@electron/notarize": "^2.1.0", "@fullstory/babel-plugin-annotate-react": "^2.3.0", + "@fullstory/babel-plugin-react-native": "^1.2.1", "@jest/globals": "^29.5.0", + "@kie/act-js": "^2.6.2", + "@kie/mock-github": "2.0.1", "@ngneat/falso": "^7.1.1", "@octokit/core": "4.0.4", "@octokit/plugin-paginate-rest": "3.1.0", @@ -258,6 +252,7 @@ "@typescript-eslint/eslint-plugin": "^7.13.1", "@typescript-eslint/parser": "^7.13.1", "@vercel/ncc": "0.38.1", + "@vue/preload-webpack-plugin": "^2.0.0", "@welldone-software/why-did-you-render": "7.0.1", "ajv-cli": "^5.0.0", "babel-jest": "29.4.1", @@ -265,7 +260,6 @@ "babel-plugin-module-resolver": "^5.0.0", "babel-plugin-react-compiler": "0.0.0-experimental-334f00b-20240725", "babel-plugin-react-native-web": "^0.18.7", - "@babel/plugin-transform-class-properties": "^7.25.4", "babel-plugin-transform-remove-console": "^6.9.4", "clean-webpack-plugin": "^4.0.0", "concurrently": "^8.2.2", @@ -283,19 +277,21 @@ "eslint-plugin-deprecation": "^3.0.0", "eslint-plugin-jest": "^28.6.0", "eslint-plugin-jsdoc": "^46.2.6", + "eslint-plugin-lodash": "^7.4.0", "eslint-plugin-react-compiler": "0.0.0-experimental-9ed098e-20240725", "eslint-plugin-react-native-a11y": "^3.3.0", "eslint-plugin-storybook": "^0.8.0", "eslint-plugin-testing-library": "^6.2.2", "eslint-plugin-you-dont-need-lodash-underscore": "^6.14.0", - "eslint-plugin-lodash": "^7.4.0", "html-webpack-plugin": "^5.5.0", "http-server": "^14.1.1", "jest": "29.4.1", "jest-circus": "29.4.1", "jest-cli": "29.4.1", "jest-environment-jsdom": "^29.4.1", + "jest-expo": "51.0.4", "jest-transformer-svg": "^2.0.1", + "jest-when": "^3.5.2", "link": "^2.1.1", "memfs": "^4.6.0", "onchange": "^7.1.0", @@ -306,10 +302,12 @@ "prettier": "^2.8.8", "pusher-js-mock": "^0.3.3", "react-compiler-healthcheck": "^0.0.0-experimental-ab3118d-20240725", + "react-compiler-runtime": "file:./lib/react-compiler-runtime", "react-is": "^18.3.1", "react-native-clean-project": "^4.0.0-alpha4.0", "react-test-renderer": "18.3.1", "reassure": "^1.0.0-rc.4", + "semver": "7.5.2", "setimmediate": "^1.0.5", "shellcheck": "^1.1.0", "source-map": "^0.7.4", @@ -326,7 +324,8 @@ "webpack-bundle-analyzer": "^4.5.0", "webpack-cli": "^5.0.4", "webpack-dev-server": "^5.0.4", - "webpack-merge": "^5.8.0" + "webpack-merge": "^5.8.0", + "xlsx": "file:vendor/xlsx-0.20.3.tgz" }, "overrides": { "react-native": "0.75.2", @@ -338,7 +337,6 @@ "yargs-parser": "21.1.1", "@expo/config-plugins": "8.0.4", "ws": "8.17.1", - "react-pdf": "9.1.0", "micromatch": "4.0.8", "json5": "2.2.2", "loader-utils": "2.0.4", diff --git a/patches/react-fast-pdf+1.0.14.patch b/patches/react-fast-pdf+1.0.14.patch deleted file mode 100644 index 78a47bfb1b58..000000000000 --- a/patches/react-fast-pdf+1.0.14.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/node_modules/react-fast-pdf/dist/PDFPreviewer.js b/node_modules/react-fast-pdf/dist/PDFPreviewer.js -index 4407807..ea3964d 100644 ---- a/node_modules/react-fast-pdf/dist/PDFPreviewer.js -+++ b/node_modules/react-fast-pdf/dist/PDFPreviewer.js -@@ -28,7 +28,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) { - Object.defineProperty(exports, "__esModule", { value: true }); - // @ts-expect-error - This line imports a module from 'pdfjs-dist' package which lacks TypeScript typings. - // eslint-disable-next-line import/no-extraneous-dependencies --const pdf_worker_1 = __importDefault(require("pdfjs-dist/legacy/build/pdf.worker")); -+const pdf_worker_1 = __importDefault(require("pdfjs-dist/legacy/build/pdf.worker.mjs")); - const react_1 = __importStar(require("react")); - const times_1 = __importDefault(require("lodash/times")); - const prop_types_1 = __importDefault(require("prop-types")); diff --git a/patches/react-pdf+9.1.0.patch b/patches/react-pdf+9.1.0.patch deleted file mode 100644 index f046202de9c2..000000000000 --- a/patches/react-pdf+9.1.0.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/node_modules/react-pdf/dist/cjs/Document.js b/node_modules/react-pdf/dist/cjs/Document.js -index ed7114d..43d648b 100644 ---- a/node_modules/react-pdf/dist/cjs/Document.js -+++ b/node_modules/react-pdf/dist/cjs/Document.js -@@ -281,6 +281,7 @@ const Document = (0, react_1.forwardRef)(function Document(_a, ref) { - pdfDispatch({ type: 'REJECT', error }); - }); - return () => { -+ loadingTask._worker.destroy(); - loadingTask.destroy(); - }; - }, [options, pdfDispatch, source]); -diff --git a/node_modules/react-pdf/dist/esm/Document.js b/node_modules/react-pdf/dist/esm/Document.js -index 997a370..894e3c9 100644 ---- a/node_modules/react-pdf/dist/esm/Document.js -+++ b/node_modules/react-pdf/dist/esm/Document.js -@@ -253,6 +253,7 @@ const Document = forwardRef(function Document(_a, ref) { - pdfDispatch({ type: 'REJECT', error }); - }); - return () => { -+ loadingTask._worker.destroy(); - loadingTask.destroy(); - }; - }, [options, pdfDispatch, source]);