Skip to content

Commit

Permalink
Update pdfjs-dist to 4.3.136
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekmaj committed May 29, 2024
1 parent fc0343c commit b83b127
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 25 deletions.
2 changes: 1 addition & 1 deletion packages/react-pdf/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"make-cancellable-promise": "^1.3.1",
"make-event-props": "^1.6.0",
"merge-refs": "^1.3.0",
"pdfjs-dist": "4.2.67",
"pdfjs-dist": "4.3.136",
"tiny-invariant": "^1.0.0",
"warning": "^4.0.0"
},
Expand Down
5 changes: 3 additions & 2 deletions packages/react-pdf/src/Page/TextLayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,11 @@ export default function TextLayer() {
viewport,
};

const cancellable = pdfjs.renderTextLayer(parameters);
const cancellable = new pdfjs.TextLayer(parameters);
const runningTask = cancellable;

cancellable.promise
cancellable
.render()
.then(() => {
const end = document.createElement('div');
end.className = 'endOfContent';
Expand Down
2 changes: 1 addition & 1 deletion packages/react-pdf/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"outDir": "dist",
"skipLibCheck": true,
"strict": true,
"target": "es2017",
"target": "es2015",
"verbatimModuleSyntax": true
},
"exclude": ["dist"]
Expand Down
8 changes: 0 additions & 8 deletions sample/vite/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,6 @@ const standardFontsDir = normalizePath(
);

export default defineConfig({
build: {
target: 'es2022',
},
optimizeDeps: {
esbuildOptions: {
target: 'es2022',
},
},
plugins: [
viteStaticCopy({
targets: [
Expand Down
8 changes: 0 additions & 8 deletions test/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,6 @@ const standardFontsDir = normalizePath(

export default defineConfig({
base: './',
build: {
target: 'es2022',
},
optimizeDeps: {
esbuildOptions: {
target: 'es2022',
},
},
plugins: [
react(),
viteStaticCopy({
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4297,9 +4297,9 @@ __metadata:
languageName: node
linkType: hard

"pdfjs-dist@npm:4.2.67":
version: 4.2.67
resolution: "pdfjs-dist@npm:4.2.67"
"pdfjs-dist@npm:4.3.136":
version: 4.3.136
resolution: "pdfjs-dist@npm:4.3.136"
dependencies:
canvas: "npm:^2.11.2"
path2d: "npm:^0.2.0"
Expand All @@ -4308,7 +4308,7 @@ __metadata:
optional: true
path2d:
optional: true
checksum: 10c0/1d6d427a2253b2c15cbb168d7f95fc26428134ff61113359653c36f92475a4abd8552913b1492489933304ccc4285328b5cbcff36825ae533b8cd4c279881348
checksum: 10c0/4cb88d737f56100d45d2c9c0c6e8dc2f3dfd856362a55e47801ae32c52b2f12b3e74819c3cafb995a1e84c43eb580598a69c6710a78b1a11cdb52ef24bf8a633
languageName: node
linkType: hard

Expand Down Expand Up @@ -4530,7 +4530,7 @@ __metadata:
make-event-props: "npm:^1.6.0"
merge-refs: "npm:^1.3.0"
nodemon: "npm:^3.0.0"
pdfjs-dist: "npm:4.2.67"
pdfjs-dist: "npm:4.3.136"
prettier: "npm:^3.2.0"
react: "npm:^18.2.0"
react-dom: "npm:^18.2.0"
Expand Down

0 comments on commit b83b127

Please sign in to comment.