Support pdfjs-dist 6.x
- Lingua principale
- TypeScript
- Stelle
- 395
- Fork
- 39
- Merge medio
- 7h 7m
- PR unite (30g)
- 12
Descrizione
pdfjs-dist 6.0.227 was released on May 30, 2026. Lector currently declares `pdfjs-dist: ^5.5.207` as a peer dependency, which excludes 6.x.
I checked lector's source against the v6 breaking changes and it appears **no code changes are needed** — only the peer dependency range:
- **`getDocument()` no longer accepts bare args** — lector already normalizes all sources into `DocumentInitParameters` via `buildDocumentInitParams()` in `document.ts`.
- **`PDFDocumentProxy.destroy()` removed** — lector already uses `loadingTask.destroy()` directly.
- **`getXfaPageViewport` moved** — not used by lector.
- **Legacy build path** (`pdfjs-dist/legacy/build/pdf.mjs`) — still exists in v6.
The fix should be as simple as widening the peer dep to `"^5.5.207 || ^6.0.0"` (or `"^6.0.0"` if dropping v5). Happy to open a PR.
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.