-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[major] update pdfjs-dist dep from 3.9.179 to 4.2.67
Switch from CommonJS to ESM to use the new pdfjs-dist builds. Switch from ts-node to tsx for running tests because ts-node doesn't work with ESM still. Remove test coverage testing since it doesn't work with tsx. Update .nvmrc to 22 because pdfjs-dist doesn't work below that. Remove BinaryData export beacuse pdfjs-dist no longer exports it. Fix the data input to match pdfjs-dist's new type. Delete globalThis.pdfjsWorker after reading a PDF as pdfjs-dist doesn't clean it up itself. Update all other deps as well.
- Loading branch information
1 parent
d95e232
commit ff61939
Showing
13 changed files
with
1,719 additions
and
2,000 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
20 | ||
22 |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
File renamed without changes.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
import {dirname, join, resolve} from 'path'; | ||
import {dirname, join, resolve} from 'node:path'; | ||
import {fileURLToPath} from 'node:url'; | ||
|
||
/** | ||
* Path to the repo's root. Does not use the package name because the source code could | ||
* theoretically be cloned into any folder. "src" is used for the ts source code files (so they CAN | ||
* be run directly without transpiling it into JS) and "dist" is used for the transpiled JS output | ||
* directory. | ||
*/ | ||
const repoRootDir = dirname(__dirname); | ||
const repoRootDir = dirname(dirname(fileURLToPath(import.meta.url))); | ||
|
||
export const sampleFilesDir = join(repoRootDir, 'test-files'); | ||
export const nodeModulesDir = resolve(__dirname, '..', 'node_modules', 'pdfjs-dist'); | ||
export const nodeModulesDir = resolve(repoRootDir, 'node_modules', 'pdfjs-dist'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"compilerOptions": { | ||
"module": "ES2022", | ||
"outDir": "./dist", | ||
"rootDir": "./src" | ||
}, | ||
|