Skip to content

Commit ae477dc

Browse files
feat!: bump engines requirement to Node 22 (#145)
Co-authored-by: Erick Zhao <erick@hotmail.ca>
1 parent 85ac42e commit ae477dc

File tree

10 files changed

+44
-44
lines changed

10 files changed

+44
-44
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ jobs:
1717
strategy:
1818
matrix:
1919
node-version:
20-
- '22.9'
21-
- '20.11'
20+
- '22.12.x'
2221
os:
2322
- macos-latest
2423
- ubuntu-latest

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
22.12

package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22
"name": "@electron/docs-parser",
33
"version": "0.0.0-development",
44
"description": "Parse Electron documentation into a machine readable JSON file",
5-
"main": "dist/index.js",
5+
"exports": "./dist/index.js",
6+
"typings": "dist/index.d.ts",
67
"type": "module",
78
"author": "Samuel Attard",
89
"license": "MIT",
910
"engines": {
10-
"node": "^20.11.0 || >= 21.2.0"
11+
"node": ">=22.12.0"
1112
},
1213
"publishConfig": {
1314
"provenance": true
@@ -28,14 +29,15 @@
2829
"dist"
2930
],
3031
"devDependencies": {
32+
"@tsconfig/node22": "^22.0.2",
3133
"@types/chai": "^4.3.19",
3234
"@types/lodash.camelcase": "^4.3.9",
33-
"@types/node": "^22.5.5",
35+
"@types/node": "^22.10.7",
3436
"@types/pretty-ms": "^5.0.1",
3537
"husky": "^9.1.6",
3638
"lint-staged": "^15.2.10",
3739
"prettier": "^3.3.3",
38-
"typescript": "^5.6.2",
40+
"typescript": "^5.8.3",
3941
"vitest": "^3.0.4"
4042
},
4143
"dependencies": {

src/DocsParser.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { expect } from 'chai';
22
import fs from 'node:fs';
33
import MarkdownIt from 'markdown-it';
4-
import { Token } from 'markdown-it';
5-
import * as path from 'path';
4+
import type Token from 'markdown-it/lib/token.mjs';
5+
import * as path from 'node:path';
66
import toCamelCase from 'lodash.camelcase';
77

88
import {

src/bin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import chalk from 'chalk';
44
import fs from 'node:fs';
55
import { parseArgs } from 'node:util';
66
import ora from 'ora';
7-
import * as path from 'path';
7+
import * as path from 'node:path';
88
import pretty from 'pretty-ms';
99

1010
import { parseDocs } from './index.js';

src/block-parsers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { expect } from 'chai';
2-
import { Token } from 'markdown-it';
2+
import type Token from 'markdown-it/lib/token.mjs';
33

44
import {
55
parseHeadingTags,

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import fs from 'node:fs';
2-
import * as path from 'path';
2+
import * as path from 'node:path';
33
import { DocsParser } from './DocsParser.js';
44

55
type ParseOptions = {

src/markdown-helpers.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { expect } from 'chai';
2-
import { Token } from 'markdown-it';
2+
import type Token from 'markdown-it/lib/token.mjs';
33
import {
44
TypeInformation,
55
PropertyDocumentationBlock,
@@ -875,10 +875,10 @@ const unconsumedTypedKeyList = <T extends TypedKey[] | null>(
875875
keys: T,
876876
): T extends null ? null : TypedKeyList => {
877877
return keys
878-
? {
878+
? ({
879879
consumed: false,
880880
keys,
881-
}
881+
} as any)
882882
: (null as any);
883883
};
884884

tsconfig.json

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,10 @@
11
{
2+
"extends": "@tsconfig/node22/tsconfig.json",
23
"compilerOptions": {
3-
"module": "es2022",
4-
"target": "es2022",
5-
"moduleResolution": "Node",
64
"outDir": "dist",
7-
"lib": [
8-
"es6",
9-
"es7"
10-
],
11-
"types": [
12-
"node"
13-
],
145
"declaration": true,
156
"sourceMap": true,
167
"rootDir": "src",
17-
"experimentalDecorators": true,
188
"strict": true,
199
"esModuleInterop": true,
2010
"incremental": true

yarn.lock

Lines changed: 27 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@ __metadata:
99
version: 0.0.0-use.local
1010
resolution: "@electron/docs-parser@workspace:."
1111
dependencies:
12+
"@tsconfig/node22": "npm:^22.0.2"
1213
"@types/chai": "npm:^4.3.19"
1314
"@types/lodash.camelcase": "npm:^4.3.9"
1415
"@types/markdown-it": "npm:^14.1.2"
15-
"@types/node": "npm:^22.5.5"
16+
"@types/node": "npm:^22.10.7"
1617
"@types/pretty-ms": "npm:^5.0.1"
1718
chai: "npm:^5.1.1"
1819
chalk: "npm:^5.3.0"
@@ -23,7 +24,7 @@ __metadata:
2324
ora: "npm:^8.1.0"
2425
prettier: "npm:^3.3.3"
2526
pretty-ms: "npm:^9.1.0"
26-
typescript: "npm:^5.6.2"
27+
typescript: "npm:^5.8.3"
2728
vitest: "npm:^3.0.4"
2829
bin:
2930
electron-docs-linter: ./dist/bin.js
@@ -405,6 +406,13 @@ __metadata:
405406
languageName: node
406407
linkType: hard
407408

409+
"@tsconfig/node22@npm:^22.0.2":
410+
version: 22.0.2
411+
resolution: "@tsconfig/node22@npm:22.0.2"
412+
checksum: 10c0/c75e6b9ea86ec2a384adefac0e2f16a6c08202ae5cf6c8c745944396a6931ffb38e742809491c1882d1868c2af1c33744193701779674bfb1e05f6a130045a18
413+
languageName: node
414+
linkType: hard
415+
408416
"@types/chai@npm:^4.3.19":
409417
version: 4.3.19
410418
resolution: "@types/chai@npm:4.3.19"
@@ -466,12 +474,12 @@ __metadata:
466474
languageName: node
467475
linkType: hard
468476

469-
"@types/node@npm:^22.5.5":
470-
version: 22.5.5
471-
resolution: "@types/node@npm:22.5.5"
477+
"@types/node@npm:^22.10.7":
478+
version: 22.19.0
479+
resolution: "@types/node@npm:22.19.0"
472480
dependencies:
473-
undici-types: "npm:~6.19.2"
474-
checksum: 10c0/ead9495cfc6b1da5e7025856dcce2591e9bae635357410c0d2dd619fce797d2a1d402887580ca4b336cb78168b195224869967de370a23f61663cf1e4836121c
481+
undici-types: "npm:~6.21.0"
482+
checksum: 10c0/66b98fcd38efb4ae58c628d61fed2b8f17c830eb665d8bceabc4174cae1dd81b8e4caac4c70d7dc929f9f76a3dc46cb21f480e904d0b898297bd12c0a2d1571a
475483
languageName: node
476484
linkType: hard
477485

@@ -2220,23 +2228,23 @@ __metadata:
22202228
languageName: node
22212229
linkType: hard
22222230

2223-
"typescript@npm:^5.6.2":
2224-
version: 5.6.2
2225-
resolution: "typescript@npm:5.6.2"
2231+
"typescript@npm:^5.8.3":
2232+
version: 5.9.3
2233+
resolution: "typescript@npm:5.9.3"
22262234
bin:
22272235
tsc: bin/tsc
22282236
tsserver: bin/tsserver
2229-
checksum: 10c0/3ed8297a8c7c56b7fec282532503d1ac795239d06e7c4966b42d4330c6cf433a170b53bcf93a130a7f14ccc5235de5560df4f1045eb7f3550b46ebed16d3c5e5
2237+
checksum: 10c0/6bd7552ce39f97e711db5aa048f6f9995b53f1c52f7d8667c1abdc1700c68a76a308f579cd309ce6b53646deb4e9a1be7c813a93baaf0a28ccd536a30270e1c5
22302238
languageName: node
22312239
linkType: hard
22322240

2233-
"typescript@patch:typescript@npm%3A^5.6.2#optional!builtin<compat/typescript>":
2234-
version: 5.6.2
2235-
resolution: "typescript@patch:typescript@npm%3A5.6.2#optional!builtin<compat/typescript>::version=5.6.2&hash=8c6c40"
2241+
"typescript@patch:typescript@npm%3A^5.8.3#optional!builtin<compat/typescript>":
2242+
version: 5.9.3
2243+
resolution: "typescript@patch:typescript@npm%3A5.9.3#optional!builtin<compat/typescript>::version=5.9.3&hash=5786d5"
22362244
bin:
22372245
tsc: bin/tsc
22382246
tsserver: bin/tsserver
2239-
checksum: 10c0/94eb47e130d3edd964b76da85975601dcb3604b0c848a36f63ac448d0104e93819d94c8bdf6b07c00120f2ce9c05256b8b6092d23cf5cf1c6fa911159e4d572f
2247+
checksum: 10c0/ad09fdf7a756814dce65bc60c1657b40d44451346858eea230e10f2e95a289d9183b6e32e5c11e95acc0ccc214b4f36289dcad4bf1886b0adb84d711d336a430
22402248
languageName: node
22412249
linkType: hard
22422250

@@ -2247,10 +2255,10 @@ __metadata:
22472255
languageName: node
22482256
linkType: hard
22492257

2250-
"undici-types@npm:~6.19.2":
2251-
version: 6.19.8
2252-
resolution: "undici-types@npm:6.19.8"
2253-
checksum: 10c0/078afa5990fba110f6824823ace86073b4638f1d5112ee26e790155f481f2a868cc3e0615505b6f4282bdf74a3d8caad715fd809e870c2bb0704e3ea6082f344
2258+
"undici-types@npm:~6.21.0":
2259+
version: 6.21.0
2260+
resolution: "undici-types@npm:6.21.0"
2261+
checksum: 10c0/c01ed51829b10aa72fc3ce64b747f8e74ae9b60eafa19a7b46ef624403508a54c526ffab06a14a26b3120d055e1104d7abe7c9017e83ced038ea5cf52f8d5e04
22542262
languageName: node
22552263
linkType: hard
22562264

0 commit comments

Comments
 (0)