Skip to content

Commit 3c1178a

Browse files
authored
Merge pull request #29 from mindee/pdfjs-dist
chg: ⬆️ update pdfjs-dist to v4.10.38
2 parents eead39a + a387579 commit 3c1178a

File tree

10 files changed

+127
-18
lines changed

10 files changed

+127
-18
lines changed

.github/workflows/deploy-beta.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
- name: Checkout
1111
uses: actions/checkout@v3
1212
- name: Setup pnpm
13-
uses: pnpm/action-setup@v2
13+
uses: pnpm/action-setup@v4
1414
with:
1515
version: 8.x
1616
- name: Setup Node.js

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
- name: Checkout
1212
uses: actions/checkout@v3
1313
- name: Setup pnpm
14-
uses: pnpm/action-setup@v2
14+
uses: pnpm/action-setup@v4
1515
with:
1616
version: 8.x
1717
- name: Setup Node.js

.github/workflows/deprecate-version.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
deprecate:
1919
runs-on: ubuntu-latest
2020
steps:
21-
- uses: pnpm/action-setup@v2
21+
- uses: pnpm/action-setup@v4
2222
with:
2323
version: 8.x
2424
- uses: actions/setup-node@v3

.github/workflows/tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- name: Setup pnpm
11-
uses: pnpm/action-setup@v2.2.2
11+
uses: pnpm/action-setup@v4
1212
with:
1313
version: 8.x
1414
- name: Checkout
@@ -22,7 +22,7 @@ jobs:
2222
runs-on: ubuntu-latest
2323
steps:
2424
- name: Setup pnpm
25-
uses: pnpm/action-setup@v2.2.2
25+
uses: pnpm/action-setup@v4
2626
with:
2727
version: 8.x
2828
- name: Checkout

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# CHANGELOG
22

3+
## v1.6.2 (10/10/2023)
4+
5+
### Changes
6+
7+
- :arrow_up: update pdfjs-dist to v4.10.38
8+
39
## v1.6.1 (10/10/2023)
410

511
### Changes

cypress/downloads/downloads.html

2.62 MB
Binary file not shown.
-150 KB
Loading

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-mindee-js",
3-
"version": "1.6.1",
3+
"version": "1.6.2",
44
"description": "Front-End Computer Vision SDK for React",
55
"author": "@mindee",
66
"license": "MIT",
@@ -16,7 +16,7 @@
1616
"@types/utif": "^3.0.1",
1717
"heic2any": "^0.0.4",
1818
"konva": "^8.1.3",
19-
"pdfjs-dist": "2.6.347",
19+
"pdfjs-dist": "4.10.38",
2020
"utif": "^3.1.0",
2121
"uuid": "^8.3.2"
2222
},
@@ -57,8 +57,8 @@
5757
"cy:prepare": "pnpm build",
5858
"prepare": "ts-patch install -s",
5959
"build": "vite build",
60-
"cy:open": "cypress open --component --browser firefox",
61-
"cy:run": "cypress run --component --browser firefox",
60+
"cy:open": "cypress open --component --browser chrome",
61+
"cy:run": "cypress run --component --browser chrome",
6262
"docs:start": "pnpm --dir ./docs start",
6363
"docs:install": "pnpm --dir ./docs install",
6464
"docs:prepare": "pnpm build && pnpm docs:install",

pnpm-lock.yaml

Lines changed: 106 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/utils/getImagesFromPDF.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
import { getDocument, GlobalWorkerOptions, version } from 'pdfjs-dist'
21
import {
2+
getDocument,
3+
GlobalWorkerOptions,
34
PDFDocumentProxy,
45
PDFPageProxy,
5-
RenderParameters,
6-
} from 'pdfjs-dist/types/display/api'
6+
version,
7+
} from 'pdfjs-dist'
8+
import { RenderParameters } from 'pdfjs-dist/types/src/display/api'
79

810
import { MAX_PDF_SCALE, PDF_RESOLUTION } from '@/common/constants'
911

10-
GlobalWorkerOptions.workerSrc = `//cdnjs.cloudflare.com/ajax/libs/pdf.js/${version}/pdf.worker.js`
12+
GlobalWorkerOptions.workerSrc = `//unpkg.com/pdfjs-dist@${version}/build/pdf.worker.min.mjs`
1113

1214
const getImageFromPage = async (
1315
_document: PDFDocumentProxy,

0 commit comments

Comments
 (0)