Skip to content

Commit 3030970

Browse files
feat: api history (#73)
* feat(api-history): basic parsing * feat(api-history): try to detect basic user error * feat(api-history): zod validation * feat(api-history): switch to json schema and ajv instead of zod * refactor(api-history): remove namespace in schema title * feat(api-history): optimize imports, more async * feat(api-history): remove `removed` schema property * fix(api-history): add missing param to usage * feat(api-history): basic tests * feat(api-history): cli schema option * fix(api-history): delete links from fixtures * feat(api-history): use mockup schema * style(api-history): remove old comments * feat(api-history): add format test * test(api-history): remove snapshot, destructure regex matches Co-authored-by: David Sanders <[email protected]> * feat(api-history): use `hast-util-from-markdown` instead of regex Signed-off-by: Piotr Płaczek <[email protected]> * style(api-history): slightly nicer formatting * feat(api-history): remove redundant `validate-with-schema` flag * feat(api-history): check breaking changes header exists * feat(api-history): check placement * feat(api-history): check strings (previously check descriptions) * fix(api-history): change check descriptions to check strings in help * style(api-history): catch-up on linting * feat(api-history): check pull request links * test(api-history): explicitly specify default flags * feat(api-history): warnings, nicer errors * test(api-history): check all numbers in each test * test(api-history): large amount of api history * refactor(api-history): remove `--check-pull-request-links` * style(api-history): catch up on lint * fix(api-history): unnecessary lowercase electron/website#594 (comment) * fix(api-history): match api history block more consistently * feat(api-history): skip documents without html comments * fix(api-history): remove debug `console.log` * Apply suggestions from code review Co-authored-by: David Sanders <[email protected]> * style(api-history): lint fix * style(api-history): reorder imports #73 (comment) * docs(api-history): comments for script options #73 (comment) * fix(api-history): remove `fs.access()` before `fs.readFile()` #73 (comment) * test(api-history): use `fs.mkdtemp()` instead of fixtures folder #73 (comment) * test(api-history): use newest schema #73 (comment) * test(api-history): use newest `breaking-changes.md` #73 (comment) * test(api-history): rename fixture to avoid conflict with other `.spec.ts` * chore: retain .md extension Signed-off-by: David Sanders <[email protected]> * chore: maintainer committed yarn.lock Signed-off-by: David Sanders <[email protected]> * test: ignore API history files in links spec Signed-off-by: David Sanders <[email protected]> --------- Signed-off-by: Piotr Płaczek <[email protected]> Signed-off-by: David Sanders <[email protected]> Co-authored-by: David Sanders <[email protected]>
1 parent dffb75b commit 3030970

15 files changed

+3520
-3
lines changed

Diff for: bin/lint-markdown-api-history.ts

+427
Large diffs are not rendered by default.

Diff for: package.json

+6-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
"electron-markdownlint": "./dist/bin/markdownlint-cli-wrapper.js",
1010
"lint-roller-markdown-links": "./dist/bin/lint-markdown-links.js",
1111
"lint-roller-markdown-standard": "./dist/bin/lint-markdown-standard.js",
12-
"lint-roller-markdown-ts-check": "./dist/bin/lint-markdown-ts-check.js"
12+
"lint-roller-markdown-ts-check": "./dist/bin/lint-markdown-ts-check.js",
13+
"lint-roller-markdown-api-history": "./dist/bin/lint-markdown-api-history.js"
1314
},
1415
"files": [
1516
"configs",
@@ -61,8 +62,10 @@
6162
},
6263
"dependencies": {
6364
"@dsanders11/vscode-markdown-languageservice": "^0.3.0",
65+
"ajv": "^8.16.0",
6466
"balanced-match": "^2.0.0",
6567
"glob": "^8.1.0",
68+
"hast-util-from-html": "^2.0.1",
6669
"markdown-it": "^13.0.1",
6770
"markdownlint-cli": "^0.40.0",
6871
"mdast-util-from-markdown": "^1.3.0",
@@ -72,7 +75,8 @@
7275
"unist-util-visit": "^4.1.2",
7376
"vscode-languageserver": "^8.1.0",
7477
"vscode-languageserver-textdocument": "^1.0.8",
75-
"vscode-uri": "^3.0.7"
78+
"vscode-uri": "^3.0.7",
79+
"yaml": "^2.4.5"
7680
},
7781
"peerDependencies": {
7882
"typescript": ">= 4.7.0"

0 commit comments

Comments
 (0)