Skip to content

feat!: bump engines requirement to Node 22 #145

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ jobs:
strategy:
matrix:
node-version:
- '22.9'
- '20.11'
- '22.12.x'
os:
- macos-latest
- ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
22.12
12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
"name": "@electron/docs-parser",
"version": "0.0.0-development",
"description": "Parse Electron documentation into a machine readable JSON file",
"main": "dist/index.js",
"exports": "./dist/index.js",
"typings": "dist/index.d.ts",
"type": "module",
"author": "Samuel Attard",
"license": "MIT",
"engines": {
"node": "^20.11.0 || >= 21.2.0"
"node": ">=22.12.0"
},
"publishConfig": {
"provenance": true
Expand All @@ -28,14 +29,15 @@
"dist"
],
"devDependencies": {
"@tsconfig/node22": "^22.0.2",
"@types/chai": "^4.3.19",
"@types/lodash.camelcase": "^4.3.9",
"@types/node": "^22.5.5",
"@types/node": "^22.10.7",
"@types/pretty-ms": "^5.0.1",
"husky": "^9.1.6",
"lint-staged": "^15.2.10",
"prettier": "^3.3.3",
"typescript": "^5.6.2",
"typescript": "^5.8.3",
"vitest": "^3.0.4"
},
"dependencies": {
Expand Down Expand Up @@ -67,4 +69,4 @@
"url": "https://github.com/electron/docs-parser/issues"
},
"homepage": "https://github.com/electron/docs-parser#readme"
}
}
4 changes: 2 additions & 2 deletions src/DocsParser.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { expect } from 'chai';
import fs from 'node:fs';
import MarkdownIt from 'markdown-it';
import { Token } from 'markdown-it';
import * as path from 'path';
import type Token from 'markdown-it/lib/token.mjs';
import * as path from 'node:path';
import toCamelCase from 'lodash.camelcase';

import {
Expand Down
2 changes: 1 addition & 1 deletion src/bin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import chalk from 'chalk';
import fs from 'node:fs';
import { parseArgs } from 'node:util';
import ora from 'ora';
import * as path from 'path';
import * as path from 'node:path';
import pretty from 'pretty-ms';

import { parseDocs } from './index.js';
Expand Down
2 changes: 1 addition & 1 deletion src/block-parsers.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { expect } from 'chai';
import { Token } from 'markdown-it';
import type Token from 'markdown-it/lib/token.mjs';

import {
parseHeadingTags,
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import fs from 'node:fs';
import * as path from 'path';
import * as path from 'node:path';
import { DocsParser } from './DocsParser.js';

type ParseOptions = {
Expand Down
6 changes: 3 additions & 3 deletions src/markdown-helpers.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { expect } from 'chai';
import { Token } from 'markdown-it';
import type Token from 'markdown-it/lib/token.mjs';
import {
TypeInformation,
PropertyDocumentationBlock,
Expand Down Expand Up @@ -875,10 +875,10 @@ const unconsumedTypedKeyList = <T extends TypedKey[] | null>(
keys: T,
): T extends null ? null : TypedKeyList => {
return keys
? {
? ({
consumed: false,
keys,
}
} as any)
: (null as any);
};

Expand Down
12 changes: 1 addition & 11 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,10 @@
{
"extends": "@tsconfig/node22/tsconfig.json",
"compilerOptions": {
"module": "es2022",
"target": "es2022",
"moduleResolution": "Node",
"outDir": "dist",
"lib": [
"es6",
"es7"
],
"types": [
"node"
],
"declaration": true,
"sourceMap": true,
"rootDir": "src",
"experimentalDecorators": true,
"strict": true,
"esModuleInterop": true,
"incremental": true
Expand Down
31 changes: 18 additions & 13 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,11 @@
resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.40.1.tgz#8078b71fe0d5825dcbf83d52a7dc858b39da165c"
integrity sha512-ECyOuDeH3C1I8jH2MK1RtBJW+YPMvSfT0a5NN0nHfQYnDSJ6tUiZH3gzwVP5/Kfh/+Tt7tpWVF9LXNTnhTJ3kA==

"@tsconfig/node22@^22.0.2":
version "22.0.2"
resolved "https://registry.yarnpkg.com/@tsconfig/node22/-/node22-22.0.2.tgz#1e04e2c5cc946dac787d69bb502462a851ae51b6"
integrity sha512-Kmwj4u8sDRDrMYRoN9FDEcXD8UpBSaPQQ24Gz+Gamqfm7xxn+GBR7ge/Z7pK8OXNGyUzbSwJj+TH6B+DS/epyA==

"@types/chai@^4.3.19":
version "4.3.19"
resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.19.tgz#14519f437361d41e84102ed3fbc922ddace3e228"
Expand Down Expand Up @@ -277,12 +282,12 @@
resolved "https://registry.yarnpkg.com/@types/mdurl/-/mdurl-2.0.0.tgz#d43878b5b20222682163ae6f897b20447233bdfd"
integrity sha512-RGdgjQUZba5p6QEFAVx2OGb8rQDL/cPRG7GiedRzMcJ1tYnUANBncjbSB1NRGwbvjcPeikRABz2nshyPk1bhWg==

"@types/node@^22.5.5":
version "22.5.5"
resolved "https://registry.yarnpkg.com/@types/node/-/node-22.5.5.tgz#52f939dd0f65fc552a4ad0b392f3c466cc5d7a44"
integrity sha512-Xjs4y5UPO/CLdzpgR6GirZJx36yScjh73+2NlLlkFRSoQN8B0DpfXPdZGnvVmLRLOsqDpOfTNv7D9trgGhmOIA==
"@types/node@^22.10.7":
version "22.15.34"
resolved "https://registry.yarnpkg.com/@types/node/-/node-22.15.34.tgz#3995a6461d2cfc51c81907da0065fc328f6a459e"
integrity sha512-8Y6E5WUupYy1Dd0II32BsWAx5MWdcnRd8L84Oys3veg1YrYtNtzgO4CFhiBg6MDSjk7Ay36HYOnU7/tuOzIzcw==
dependencies:
undici-types "~6.19.2"
undici-types "~6.21.0"

"@types/pretty-ms@^5.0.1":
version "5.0.1"
Expand Down Expand Up @@ -1053,20 +1058,20 @@ to-regex-range@^5.0.1:
dependencies:
is-number "^7.0.0"

typescript@^5.6.2:
version "5.6.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.6.2.tgz#d1de67b6bef77c41823f822df8f0b3bcff60a5a0"
integrity sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==
typescript@^5.8.3:
version "5.8.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.8.3.tgz#92f8a3e5e3cf497356f4178c34cd65a7f5e8440e"
integrity sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==

uc.micro@^2.0.0, uc.micro@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-2.1.0.tgz#f8d3f7d0ec4c3dea35a7e3c8efa4cb8b45c9e7ee"
integrity sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==

undici-types@~6.19.2:
version "6.19.8"
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02"
integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==
undici-types@~6.21.0:
version "6.21.0"
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.21.0.tgz#691d00af3909be93a7faa13be61b3a5b50ef12cb"
integrity sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==

[email protected]:
version "3.0.5"
Expand Down