@suffolklitlab/alkiln 5.15.0 → 5.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/lib/utils/pdf_reader.js +9 -2
- package/npm-shrinkwrap.json +906 -949
- package/package.json +4 -8
package/CHANGELOG.md
CHANGED
|
@@ -45,6 +45,16 @@ Format:
|
|
|
45
45
|
|
|
46
46
|
<!-- ## [Unreleased] -->
|
|
47
47
|
|
|
48
|
+
## [5.15.1] - 2025-08-05
|
|
49
|
+
|
|
50
|
+
### Changed
|
|
51
|
+
|
|
52
|
+
- Updated dependencies. See [#1012](https://github.com/SuffolkLITLab/ALKiln/issues/1012).
|
|
53
|
+
|
|
54
|
+
### Fixed
|
|
55
|
+
|
|
56
|
+
- Fix pdfjs version mismatch with docassemble's most recent version of node. See ALKilnInThePlayground https://github.com/SuffolkLITLab/docassemble-ALKilnInThePlayground/issues/42.
|
|
57
|
+
|
|
48
58
|
## [5.15.0] - 2025-05-22
|
|
49
59
|
|
|
50
60
|
### Added
|
package/lib/utils/pdf_reader.js
CHANGED
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
// All functions dealing with getting information from PDFs
|
|
2
2
|
|
|
3
|
-
const pdfjs_lib = require("pdfjs-dist/legacy/build/pdf.js");
|
|
4
3
|
const diff_lib = require("diff");
|
|
5
4
|
|
|
5
|
+
async function importPdfLib() {
|
|
6
|
+
// pdfjs only supports nodejs in its legacy build
|
|
7
|
+
// https://github.com/mozilla/pdf.js/wiki/Frequently-Asked-Questions/c47467dd05966b686af96f55ce061dab2f96c306
|
|
8
|
+
const pdfjsLib = await import("pdfjs-dist/legacy/build/pdf.mjs");
|
|
9
|
+
return pdfjsLib;
|
|
10
|
+
}
|
|
11
|
+
|
|
6
12
|
let _load_pdf = async function(pdf_path) {
|
|
7
13
|
// Simple wrapper to get the document
|
|
14
|
+
let pdfjs_lib = await importPdfLib();
|
|
8
15
|
return await pdfjs_lib.getDocument({
|
|
9
16
|
url: pdf_path,
|
|
10
17
|
// https://github.com/mozilla/pdf.js/issues/4244#issuecomment-1479534301
|
|
@@ -110,4 +117,4 @@ pdf_reader.compare_pdfs = async function(existing_pdf_path, new_pdf_path) {
|
|
|
110
117
|
return null;
|
|
111
118
|
}; // End compare_pdfs
|
|
112
119
|
|
|
113
|
-
module.exports = pdf_reader;
|
|
120
|
+
module.exports = pdf_reader;
|