Skip to content

Commit 7527b7a

Browse files
committed
Upgrade dev dependencies + added nodejs 22 LTS
1 parent 93c6af7 commit 7527b7a

File tree

6 files changed

+1047
-2113
lines changed

6 files changed

+1047
-2113
lines changed

.github/workflows/lint-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
node-version: [18.x, 20.x]
15+
node-version: [18.x, 20.x, 22.x]
1616

1717
steps:
1818
- uses: actions/checkout@v2

.prettierrc

Lines changed: 0 additions & 3 deletions
This file was deleted.

eslint.config.mjs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import globals from "globals";
2+
import js from "@eslint/js";
3+
4+
export default [
5+
js.configs.recommended,
6+
{
7+
languageOptions: {
8+
globals: globals.node,
9+
sourceType: "module",
10+
},
11+
},
12+
{
13+
files: ["tests/**/*.js"],
14+
languageOptions: {
15+
globals: {
16+
...globals.jest,
17+
},
18+
}
19+
},
20+
];

package.json

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -23,28 +23,30 @@
2323
},
2424
"bugs": "https://github.com/foliojs/pdfkit/issues",
2525
"devDependencies": {
26-
"@babel/core": "^7.11.6",
27-
"@babel/plugin-external-helpers": "^7.10.4",
28-
"@babel/preset-env": "^7.11.5",
29-
"babel-jest": "^26.3.0",
30-
"blob-stream": "^0.1.2",
26+
"@babel/core": "^7.26.0",
27+
"@babel/plugin-external-helpers": "^7.25.9",
28+
"@babel/preset-env": "^7.26.0",
29+
"@eslint/js": "^9.17.0",
30+
"@rollup/plugin-babel": "^6.0.4",
31+
"babel-jest": "^29.7.0",
32+
"blob-stream": "^0.1.3",
3133
"brace": "^0.11.1",
3234
"brfs": "~2.0.2",
33-
"browserify": "^16.5.0",
34-
"canvas": "^2.11.2",
35-
"codemirror": "~5.49.2",
36-
"eslint": "^7.8.1",
37-
"gh-pages": "^3.1.0",
38-
"jest": "^29.4.3",
39-
"jest-environment-jsdom": "^29.4.3",
40-
"jest-image-snapshot": "^6.1.0",
35+
"browserify": "^17.0.1",
36+
"canvas": "^3.0.0",
37+
"codemirror": "~5.65.18",
38+
"eslint": "^9.17.0",
39+
"gh-pages": "^6.2.0",
40+
"globals": "^15.14.0",
41+
"jest": "^29.7.0",
42+
"jest-environment-jsdom": "^29.7.0",
43+
"jest-image-snapshot": "^6.4.0",
4144
"markdown": "~0.5.0",
4245
"pdfjs-dist": "^2.14.305",
43-
"prettier": "1.19.1",
44-
"pug": "^2.0.4",
45-
"rollup": "^1.27.0",
46-
"rollup-plugin-babel": "^4.3.3",
47-
"rollup-plugin-cpy": "^2.0.1"
46+
"prettier": "3.4.2",
47+
"pug": "^3.0.3",
48+
"rollup": "^2.79.2",
49+
"rollup-plugin-copy": "^3.5.0"
4850
},
4951
"dependencies": {
5052
"crypto-js": "^4.2.0",
@@ -88,4 +90,4 @@
8890
"<rootDir>/tests/unit/setupTests.js"
8991
]
9092
}
91-
}
93+
}

rollup.config.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import pkg from './package.json';
2-
import babel from 'rollup-plugin-babel';
3-
import copy from 'rollup-plugin-cpy';
2+
import { babel } from '@rollup/plugin-babel';
3+
import copy from 'rollup-plugin-copy';
44

55
const external = [
66
'stream',
@@ -35,6 +35,7 @@ export default [
3535
},
3636
plugins: [
3737
babel({
38+
babelHelpers: 'bundled',
3839
babelrc: false,
3940
presets: [
4041
[
@@ -49,8 +50,9 @@ export default [
4950
]
5051
}),
5152
copy({
52-
files: ['lib/font/data/*.afm', 'lib/mixins/data/*.icc'],
53-
dest: 'js/data'
53+
targets: [
54+
{ src: ['lib/font/data/*.afm', 'lib/mixins/data/*.icc'], dest: 'js/data' },
55+
]
5456
})
5557
]
5658
},
@@ -66,6 +68,7 @@ export default [
6668
},
6769
plugins: [
6870
babel({
71+
babelHelpers: 'bundled',
6972
babelrc: false,
7073
presets: [
7174
[
@@ -92,6 +95,7 @@ export default [
9295
},
9396
plugins: [
9497
babel({
98+
babelHelpers: 'bundled',
9599
babelrc: false,
96100
presets: [
97101
[

0 commit comments

Comments
 (0)