pdfkit 0.20.0 → 0.20.2
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 +12 -0
- package/js/pdfkit.browser.js +10 -4
- package/js/pdfkit.browser.js.map +1 -1
- package/js/pdfkit.browser.mjs +10 -4
- package/js/pdfkit.browser.mjs.map +1 -1
- package/js/pdfkit.js +26 -18
- package/js/pdfkit.js.map +1 -1
- package/js/pdfkit.node.mjs +7283 -0
- package/js/pdfkit.node.mjs.map +1 -0
- package/package.json +4 -6
- package/rollup.config.mjs +19 -11
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"document",
|
|
10
10
|
"vector"
|
|
11
11
|
],
|
|
12
|
-
"version": "0.20.
|
|
12
|
+
"version": "0.20.2",
|
|
13
13
|
"homepage": "http://pdfkit.org/",
|
|
14
14
|
"author": {
|
|
15
15
|
"name": "Devon Govett",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"prettier": "prettier --check lib tests docs tools",
|
|
68
68
|
"format": "prettier --write lib tests docs tools",
|
|
69
69
|
"test": "vitest --testTimeout 8000 run --exclude \"tests/tools/**\"",
|
|
70
|
-
"test:package": "node tests/package-resolution.cjs",
|
|
70
|
+
"test:package": "node tests/package-resolution.cjs && node tests/package-resolution.mjs",
|
|
71
71
|
"test:tools": "vitest --testTimeout 8000 run tests/tools",
|
|
72
72
|
"test:visual": "vitest --testTimeout 8000 run tests/visual",
|
|
73
73
|
"test:unit": "vitest run tests/unit"
|
|
@@ -75,6 +75,7 @@
|
|
|
75
75
|
"exports": {
|
|
76
76
|
".": {
|
|
77
77
|
"node": {
|
|
78
|
+
"import": "./js/pdfkit.node.mjs",
|
|
78
79
|
"require": "./js/pdfkit.js"
|
|
79
80
|
},
|
|
80
81
|
"default": "./js/pdfkit.browser.mjs"
|
|
@@ -153,10 +154,7 @@
|
|
|
153
154
|
"node": "./lib/stream/node.js",
|
|
154
155
|
"default": "./lib/stream/browser.js"
|
|
155
156
|
},
|
|
156
|
-
"#standard-fonts/*":
|
|
157
|
-
"require": "./js/standard-fonts/*.cjs",
|
|
158
|
-
"default": "./js/standard-fonts/*.mjs"
|
|
159
|
-
}
|
|
157
|
+
"#standard-fonts/*": "./js/standard-fonts/*.cjs"
|
|
160
158
|
},
|
|
161
159
|
"engine": [
|
|
162
160
|
"node >= v20.0.0"
|
package/rollup.config.mjs
CHANGED
|
@@ -6,6 +6,7 @@ import binary from './tools/binary-plugin.mjs';
|
|
|
6
6
|
const iccProfilePath = 'lib/mixins/data/sRGB_IEC61966_2_1.icc';
|
|
7
7
|
|
|
8
8
|
const external = [
|
|
9
|
+
'module',
|
|
9
10
|
'stream',
|
|
10
11
|
'fs',
|
|
11
12
|
'zlib',
|
|
@@ -72,20 +73,27 @@ const browserPlugins = () => [
|
|
|
72
73
|
];
|
|
73
74
|
|
|
74
75
|
export default [
|
|
75
|
-
// CommonJS
|
|
76
|
+
// CommonJS and ES builds for Node
|
|
76
77
|
{
|
|
77
78
|
input: 'lib/document.node.js',
|
|
78
79
|
external,
|
|
79
|
-
output:
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
80
|
+
output: [
|
|
81
|
+
{
|
|
82
|
+
name: 'pdfkit',
|
|
83
|
+
file: 'js/pdfkit.js',
|
|
84
|
+
format: 'cjs',
|
|
85
|
+
sourcemap: true,
|
|
86
|
+
interop: 'default',
|
|
87
|
+
exports: 'named',
|
|
88
|
+
footer:
|
|
89
|
+
'module.exports = exports.default;\nmodule.exports.PDFDocument = exports.PDFDocument;\nmodule.exports.LineWrapper = exports.LineWrapper;\nmodule.exports.registerFile = exports.registerFile;',
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
file: 'js/pdfkit.node.mjs',
|
|
93
|
+
format: 'es',
|
|
94
|
+
sourcemap: true,
|
|
95
|
+
},
|
|
96
|
+
],
|
|
89
97
|
plugins: [
|
|
90
98
|
asset(iccProfilePath, 'data/sRGB_IEC61966_2_1.icc'),
|
|
91
99
|
nodeResolve({
|