Skip to content
Merged
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
10 changes: 6 additions & 4 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
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
46 changes: 27 additions & 19 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ __metadata:
version: 0.0.0-use.local
resolution: "@electron/docs-parser@workspace:."
dependencies:
"@tsconfig/node22": "npm:^22.0.2"
"@types/chai": "npm:^4.3.19"
"@types/lodash.camelcase": "npm:^4.3.9"
"@types/markdown-it": "npm:^14.1.2"
"@types/node": "npm:^22.5.5"
"@types/node": "npm:^22.10.7"
"@types/pretty-ms": "npm:^5.0.1"
chai: "npm:^5.1.1"
chalk: "npm:^5.3.0"
Expand All @@ -23,7 +24,7 @@ __metadata:
ora: "npm:^8.1.0"
prettier: "npm:^3.3.3"
pretty-ms: "npm:^9.1.0"
typescript: "npm:^5.6.2"
typescript: "npm:^5.8.3"
vitest: "npm:^3.0.4"
bin:
electron-docs-linter: ./dist/bin.js
Expand Down Expand Up @@ -405,6 +406,13 @@ __metadata:
languageName: node
linkType: hard

"@tsconfig/node22@npm:^22.0.2":
version: 22.0.2
resolution: "@tsconfig/node22@npm:22.0.2"
checksum: 10c0/c75e6b9ea86ec2a384adefac0e2f16a6c08202ae5cf6c8c745944396a6931ffb38e742809491c1882d1868c2af1c33744193701779674bfb1e05f6a130045a18
languageName: node
linkType: hard

"@types/chai@npm:^4.3.19":
version: 4.3.19
resolution: "@types/chai@npm:4.3.19"
Expand Down Expand Up @@ -466,12 +474,12 @@ __metadata:
languageName: node
linkType: hard

"@types/node@npm:^22.5.5":
version: 22.5.5
resolution: "@types/node@npm:22.5.5"
"@types/node@npm:^22.10.7":
version: 22.19.0
resolution: "@types/node@npm:22.19.0"
dependencies:
undici-types: "npm:~6.19.2"
checksum: 10c0/ead9495cfc6b1da5e7025856dcce2591e9bae635357410c0d2dd619fce797d2a1d402887580ca4b336cb78168b195224869967de370a23f61663cf1e4836121c
undici-types: "npm:~6.21.0"
checksum: 10c0/66b98fcd38efb4ae58c628d61fed2b8f17c830eb665d8bceabc4174cae1dd81b8e4caac4c70d7dc929f9f76a3dc46cb21f480e904d0b898297bd12c0a2d1571a
languageName: node
linkType: hard

Expand Down Expand Up @@ -2220,23 +2228,23 @@ __metadata:
languageName: node
linkType: hard

"typescript@npm:^5.6.2":
version: 5.6.2
resolution: "typescript@npm:5.6.2"
"typescript@npm:^5.8.3":
version: 5.9.3
resolution: "typescript@npm:5.9.3"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 10c0/3ed8297a8c7c56b7fec282532503d1ac795239d06e7c4966b42d4330c6cf433a170b53bcf93a130a7f14ccc5235de5560df4f1045eb7f3550b46ebed16d3c5e5
checksum: 10c0/6bd7552ce39f97e711db5aa048f6f9995b53f1c52f7d8667c1abdc1700c68a76a308f579cd309ce6b53646deb4e9a1be7c813a93baaf0a28ccd536a30270e1c5
languageName: node
linkType: hard

"typescript@patch:typescript@npm%3A^5.6.2#optional!builtin<compat/typescript>":
version: 5.6.2
resolution: "typescript@patch:typescript@npm%3A5.6.2#optional!builtin<compat/typescript>::version=5.6.2&hash=8c6c40"
"typescript@patch:typescript@npm%3A^5.8.3#optional!builtin<compat/typescript>":
version: 5.9.3
resolution: "typescript@patch:typescript@npm%3A5.9.3#optional!builtin<compat/typescript>::version=5.9.3&hash=5786d5"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 10c0/94eb47e130d3edd964b76da85975601dcb3604b0c848a36f63ac448d0104e93819d94c8bdf6b07c00120f2ce9c05256b8b6092d23cf5cf1c6fa911159e4d572f
checksum: 10c0/ad09fdf7a756814dce65bc60c1657b40d44451346858eea230e10f2e95a289d9183b6e32e5c11e95acc0ccc214b4f36289dcad4bf1886b0adb84d711d336a430
languageName: node
linkType: hard

Expand All @@ -2247,10 +2255,10 @@ __metadata:
languageName: node
linkType: hard

"undici-types@npm:~6.19.2":
version: 6.19.8
resolution: "undici-types@npm:6.19.8"
checksum: 10c0/078afa5990fba110f6824823ace86073b4638f1d5112ee26e790155f481f2a868cc3e0615505b6f4282bdf74a3d8caad715fd809e870c2bb0704e3ea6082f344
"undici-types@npm:~6.21.0":
version: 6.21.0
resolution: "undici-types@npm:6.21.0"
checksum: 10c0/c01ed51829b10aa72fc3ce64b747f8e74ae9b60eafa19a7b46ef624403508a54c526ffab06a14a26b3120d055e1104d7abe7c9017e83ced038ea5cf52f8d5e04
languageName: node
linkType: hard

Expand Down