From 8575ce8f400faf5207499816776209de8f6faa46 Mon Sep 17 00:00:00 2001 From: tgreyuk Date: Sat, 22 Jun 2024 01:45:01 +0100 Subject: [PATCH] chore(core): updated packages --- .../events/classes/MarkdownPageEvent.md | 2 +- .../events/classes/MarkdownRendererEvent.md | 2 +- .../api-docs/Class.MarkdownPageEvent.mdx | 2 +- .../api-docs/Class.MarkdownRendererEvent.mdx | 2 +- docs/pages/docs/changelog/v4.1.mdx | 2 +- docs/pages/docs/versioning.mdx | 2 +- package-lock.json | 145 +++++++++--------- package.json | 16 +- packages/typedoc-plugin-markdown/package.json | 2 +- .../src/events/markdown-page-event.ts | 2 +- .../src/events/markdown-renderer-event.ts | 2 +- .../src/renderer/overrides.ts | 66 ++++---- .../context/partials/comments.comment.ts | 9 +- .../custom-plugins/normalize-sources.mjs | 25 +-- .../fixtures/src/packages/package-1/index.ts | 2 +- .../fixtures/src/packages/package-1b/index.ts | 2 +- 16 files changed, 135 insertions(+), 148 deletions(-) diff --git a/devguide/typedoc-plugin-markdown/events/classes/MarkdownPageEvent.md b/devguide/typedoc-plugin-markdown/events/classes/MarkdownPageEvent.md index 9a38032d9..02c0c423f 100644 --- a/devguide/typedoc-plugin-markdown/events/classes/MarkdownPageEvent.md +++ b/devguide/typedoc-plugin-markdown/events/classes/MarkdownPageEvent.md @@ -21,7 +21,7 @@ An event emitted before and after the markdown of a page is rendered. ## Extends -* [`Event`](https://typedoc.org/api/classes/Event.html) +* `Event` ## Type Parameters diff --git a/devguide/typedoc-plugin-markdown/events/classes/MarkdownRendererEvent.md b/devguide/typedoc-plugin-markdown/events/classes/MarkdownRendererEvent.md index cf115dc0b..38ff8974f 100644 --- a/devguide/typedoc-plugin-markdown/events/classes/MarkdownRendererEvent.md +++ b/devguide/typedoc-plugin-markdown/events/classes/MarkdownRendererEvent.md @@ -18,7 +18,7 @@ An event emitted at the beginning and end of the rendering process. ## Extends -* [`Event`](https://typedoc.org/api/classes/Event.html) +* `Event` ## Properties diff --git a/docs/pages/api-docs/Class.MarkdownPageEvent.mdx b/docs/pages/api-docs/Class.MarkdownPageEvent.mdx index 8d974a85f..5209e6303 100644 --- a/docs/pages/api-docs/Class.MarkdownPageEvent.mdx +++ b/docs/pages/api-docs/Class.MarkdownPageEvent.mdx @@ -4,7 +4,7 @@ An event emitted before and after the markdown of a page is rendered. ## Extends -- [`Event`](https://typedoc.org/api/classes/Event.html) +- `Event` ## Events diff --git a/docs/pages/api-docs/Class.MarkdownRendererEvent.mdx b/docs/pages/api-docs/Class.MarkdownRendererEvent.mdx index 50afa066c..3ce0817b0 100644 --- a/docs/pages/api-docs/Class.MarkdownRendererEvent.mdx +++ b/docs/pages/api-docs/Class.MarkdownRendererEvent.mdx @@ -4,7 +4,7 @@ An event emitted at the beginning and end of the rendering process. ## Extends -- [`Event`](https://typedoc.org/api/classes/Event.html) +- `Event` ## Events diff --git a/docs/pages/docs/changelog/v4.1.mdx b/docs/pages/docs/changelog/v4.1.mdx index 25943f4e6..f56a6bae2 100644 --- a/docs/pages/docs/changelog/v4.1.mdx +++ b/docs/pages/docs/changelog/v4.1.mdx @@ -3,7 +3,7 @@ import { Callout } from 'nextra/components'; # v4.1 (June 2024) -v4.1 introduces [TypeDoc v0.26]() feature support and API compatibility updates. +v4.1 introduces [TypeDoc v0.26](https://typedoc.org/guides/changelog/#v0.26.0-(2024-06-22)) feature support and API compatibility updates. diff --git a/docs/pages/docs/versioning.mdx b/docs/pages/docs/versioning.mdx index 03c3a1c75..05f3dcf38 100644 --- a/docs/pages/docs/versioning.mdx +++ b/docs/pages/docs/versioning.mdx @@ -17,7 +17,7 @@ For this reason we follow a slightly amended version of semver: | typedoc-plugin-markdown | TypeDoc | Release Date | | ----------------------- | ------- | ------------ | -| 4.1.x | 0.26.x | 2024-06-21 | +| 4.1.x | 0.26.x | 2024-06-22 | | 4.0.x | 0.25.x | 2024-05-03 | ## Specifying Version Ranges diff --git a/package-lock.json b/package-lock.json index eb0de1ac5..d56dfb60a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,19 +20,19 @@ "@commitlint/config-conventional": "^19.2.2", "@types/fs-extra": "^11.0.4", "@types/jest": "^29.5.12", - "@types/node": "^20.14.2", - "@typescript-eslint/eslint-plugin": "^7.12.0", - "@typescript-eslint/parser": "^7.12.0", + "@types/node": "^20.14.7", + "@typescript-eslint/eslint-plugin": "^7.13.1", + "@typescript-eslint/parser": "^7.13.1", "barrelsby": "^2.8.1", "consola": "^3.2.3", "copyfiles": "^2.4.1", "eslint": "^8.57.0", "fs-extra": "^11.2.0", - "glob": "^10.4.1", + "glob": "^10.4.2", "husky": "^9.0.11", "jest": "^29.7.0", "markdownlint": "^0.34.0", - "prettier": "^3.3.1", + "prettier": "^3.3.2", "prettier-plugin-organize-imports": "^3.2.4", "remark": "^15.0.1", "remark-gfm": "^4.0.0", @@ -40,13 +40,13 @@ "remark-mdx": "^3.0.1", "remark-toc": "^9.0.0", "to-vfile": "^8.0.0", - "ts-jest": "^29.1.4", + "ts-jest": "^29.1.5", "ts-json-schema-generator": "^2.3.0", "ts-morph": "^22.0.0", "ts-node": "^10.9.2", "tsc-alias": "^1.8.10", - "typedoc": "^0.26.0-beta.5", - "typescript": "^5.4.5", + "typedoc": "^0.26.0", + "typescript": "^5.5.2", "unified-prettier": "^2.0.1" } }, @@ -5851,9 +5851,9 @@ "integrity": "sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==" }, "node_modules/@types/node": { - "version": "20.14.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.2.tgz", - "integrity": "sha512-xyu6WAMVwv6AKFLB+e/7ySZVr/0zLCzOa7rSpq6jNwpqOrUbcACDWC+53d4n2QHOnDou0fbIsg8wZu/sxrnI4Q==", + "version": "20.14.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.7.tgz", + "integrity": "sha512-uTr2m2IbJJucF3KUxgnGOZvYbN0QgkGyWxG6973HCpMYFy2KfcgYuIwkJQMQkt1VbBMlvWRbpshFTLxnxCZjKQ==", "dev": true, "dependencies": { "undici-types": "~5.26.4" @@ -6001,16 +6001,16 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "7.12.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.12.0.tgz", - "integrity": "sha512-7F91fcbuDf/d3S8o21+r3ZncGIke/+eWk0EpO21LXhDfLahriZF9CGj4fbAetEjlaBdjdSm9a6VeXbpbT6Z40Q==", + "version": "7.13.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.13.1.tgz", + "integrity": "sha512-kZqi+WZQaZfPKnsflLJQCz6Ze9FFSMfXrrIOcyargekQxG37ES7DJNpJUE9Q/X5n3yTIP/WPutVNzgknQ7biLg==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "7.12.0", - "@typescript-eslint/type-utils": "7.12.0", - "@typescript-eslint/utils": "7.12.0", - "@typescript-eslint/visitor-keys": "7.12.0", + "@typescript-eslint/scope-manager": "7.13.1", + "@typescript-eslint/type-utils": "7.13.1", + "@typescript-eslint/utils": "7.13.1", + "@typescript-eslint/visitor-keys": "7.13.1", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", @@ -6034,15 +6034,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "7.12.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.12.0.tgz", - "integrity": "sha512-dm/J2UDY3oV3TKius2OUZIFHsomQmpHtsV0FTh1WO8EKgHLQ1QCADUqscPgTpU+ih1e21FQSRjXckHn3txn6kQ==", + "version": "7.13.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.13.1.tgz", + "integrity": "sha512-1ELDPlnLvDQ5ybTSrMhRTFDfOQEOXNM+eP+3HT/Yq7ruWpciQw+Avi73pdEbA4SooCawEWo3dtYbF68gN7Ed1A==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "7.12.0", - "@typescript-eslint/types": "7.12.0", - "@typescript-eslint/typescript-estree": "7.12.0", - "@typescript-eslint/visitor-keys": "7.12.0", + "@typescript-eslint/scope-manager": "7.13.1", + "@typescript-eslint/types": "7.13.1", + "@typescript-eslint/typescript-estree": "7.13.1", + "@typescript-eslint/visitor-keys": "7.13.1", "debug": "^4.3.4" }, "engines": { @@ -6062,13 +6062,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "7.12.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.12.0.tgz", - "integrity": "sha512-itF1pTnN6F3unPak+kutH9raIkL3lhH1YRPGgt7QQOh43DQKVJXmWkpb+vpc/TiDHs6RSd9CTbDsc/Y+Ygq7kg==", + "version": "7.13.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.13.1.tgz", + "integrity": "sha512-adbXNVEs6GmbzaCpymHQ0MB6E4TqoiVbC0iqG3uijR8ZYfpAXMGttouQzF4Oat3P2GxDVIrg7bMI/P65LiQZdg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.12.0", - "@typescript-eslint/visitor-keys": "7.12.0" + "@typescript-eslint/types": "7.13.1", + "@typescript-eslint/visitor-keys": "7.13.1" }, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -6079,13 +6079,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "7.12.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.12.0.tgz", - "integrity": "sha512-lib96tyRtMhLxwauDWUp/uW3FMhLA6D0rJ8T7HmH7x23Gk1Gwwu8UZ94NMXBvOELn6flSPiBrCKlehkiXyaqwA==", + "version": "7.13.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.13.1.tgz", + "integrity": "sha512-aWDbLu1s9bmgPGXSzNCxELu+0+HQOapV/y+60gPXafR8e2g1Bifxzevaa+4L2ytCWm+CHqpELq4CSoN9ELiwCg==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "7.12.0", - "@typescript-eslint/utils": "7.12.0", + "@typescript-eslint/typescript-estree": "7.13.1", + "@typescript-eslint/utils": "7.13.1", "debug": "^4.3.4", "ts-api-utils": "^1.3.0" }, @@ -6106,9 +6106,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "7.12.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.12.0.tgz", - "integrity": "sha512-o+0Te6eWp2ppKY3mLCU+YA9pVJxhUJE15FV7kxuD9jgwIAa+w/ycGJBMrYDTpVGUM/tgpa9SeMOugSabWFq7bg==", + "version": "7.13.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.13.1.tgz", + "integrity": "sha512-7K7HMcSQIAND6RBL4kDl24sG/xKM13cA85dc7JnmQXw2cBDngg7c19B++JzvJHRG3zG36n9j1i451GBzRuHchw==", "dev": true, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -6119,13 +6119,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "7.12.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.12.0.tgz", - "integrity": "sha512-5bwqLsWBULv1h6pn7cMW5dXX/Y2amRqLaKqsASVwbBHMZSnHqE/HN4vT4fE0aFsiwxYvr98kqOWh1a8ZKXalCQ==", + "version": "7.13.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.13.1.tgz", + "integrity": "sha512-uxNr51CMV7npU1BxZzYjoVz9iyjckBduFBP0S5sLlh1tXYzHzgZ3BR9SVsNed+LmwKrmnqN3Kdl5t7eZ5TS1Yw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.12.0", - "@typescript-eslint/visitor-keys": "7.12.0", + "@typescript-eslint/types": "7.13.1", + "@typescript-eslint/visitor-keys": "7.13.1", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -6147,15 +6147,15 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "7.12.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.12.0.tgz", - "integrity": "sha512-Y6hhwxwDx41HNpjuYswYp6gDbkiZ8Hin9Bf5aJQn1bpTs3afYY4GX+MPYxma8jtoIV2GRwTM/UJm/2uGCVv+DQ==", + "version": "7.13.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.13.1.tgz", + "integrity": "sha512-h5MzFBD5a/Gh/fvNdp9pTfqJAbuQC4sCN2WzuXme71lqFJsZtLbjxfSk4r3p02WIArOF9N94pdsLiGutpDbrXQ==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "7.12.0", - "@typescript-eslint/types": "7.12.0", - "@typescript-eslint/typescript-estree": "7.12.0" + "@typescript-eslint/scope-manager": "7.13.1", + "@typescript-eslint/types": "7.13.1", + "@typescript-eslint/typescript-estree": "7.13.1" }, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -6169,12 +6169,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "7.12.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.12.0.tgz", - "integrity": "sha512-uZk7DevrQLL3vSnfFl5bj4sL75qC9D6EdjemIdbtkuUmIheWpuiiylSY01JxJE7+zGrOWDZrp1WxOuDntvKrHQ==", + "version": "7.13.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.13.1.tgz", + "integrity": "sha512-k/Bfne7lrP7hcb7m9zSsgcBmo+8eicqqfNAJ7uUY+jkTFpKeH2FSkWpFRtimBxgkyvqfu9jTPRbYOvud6isdXA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.12.0", + "@typescript-eslint/types": "7.13.1", "eslint-visitor-keys": "^3.4.3" }, "engines": { @@ -11437,15 +11437,16 @@ "dev": true }, "node_modules/glob": { - "version": "10.4.1", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.1.tgz", - "integrity": "sha512-2jelhlq3E4ho74ZyVLN03oKdAZVUa6UDZzFLVH1H7dnoax+y9qyaq8zBkfDIggjniU19z0wU18y16jMB2eyVIw==", + "version": "10.4.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.2.tgz", + "integrity": "sha512-GwMlUF6PkPo3Gk21UxkCohOv0PLcIXVtKyLlpEI28R/cO/4eNOdmLk3CMW1wROV/WR/EsZOWAfBbBOqYvs88/w==", "dev": true, "dependencies": { "foreground-child": "^3.1.0", "jackspeak": "^3.1.2", "minimatch": "^9.0.4", "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", "path-scurry": "^1.11.1" }, "bin": { @@ -17361,6 +17362,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/package-json-from-dist": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz", + "integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==", + "dev": true + }, "node_modules/param-case": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.4.tgz", @@ -18498,9 +18505,9 @@ } }, "node_modules/prettier": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.1.tgz", - "integrity": "sha512-7CAwy5dRsxs8PHXT3twixW9/OEll8MLE0VRPCJyl7CkS6VHGPSlsVaWTiASPTyGyYRyApxlaWTzwUxVNrhcwDg==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.2.tgz", + "integrity": "sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA==", "dev": true, "bin": { "prettier": "bin/prettier.cjs" @@ -21662,9 +21669,9 @@ } }, "node_modules/ts-jest": { - "version": "29.1.4", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.4.tgz", - "integrity": "sha512-YiHwDhSvCiItoAgsKtoLFCuakDzDsJ1DLDnSouTaTmdOcOwIkSzbLXduaQ6M5DRVhuZC/NYaaZ/mtHbWMv/S6Q==", + "version": "29.1.5", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.5.tgz", + "integrity": "sha512-UuClSYxM7byvvYfyWdFI+/2UxMmwNyJb0NPkZPQE2hew3RurV7l7zURgOHAd/1I1ZdPpe3GUsXNXAcN8TFKSIg==", "dev": true, "dependencies": { "bs-logger": "0.x", @@ -22152,9 +22159,9 @@ } }, "node_modules/typedoc": { - "version": "0.26.0-beta.5", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.26.0-beta.5.tgz", - "integrity": "sha512-6o0IPy3LneliWAJxAbRj3kmh3kFYTafp8dE2pnjWgyTrMMyBvNRsfTopV0KP7CMZNWIg2hGbR+20OQqmpPdb3Q==", + "version": "0.26.0", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.26.0.tgz", + "integrity": "sha512-OcYevjHsMN8DfpaL0dSBGAEBhOxuBB5Au8QVs9oz9iB0kRStPZwXLFWqh9gwbMUxNjW3yQuIM5GrVVauMJ2Akw==", "dependencies": { "lunr": "^2.3.9", "markdown-it": "^14.1.0", @@ -22197,9 +22204,9 @@ "link": true }, "node_modules/typescript": { - "version": "5.4.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", - "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.2.tgz", + "integrity": "sha512-NcRtPEOsPFFWjobJEtfihkLCZCXZt/os3zf8nTxjVH3RvTSxjrCamJpbExGvYOF+tFHc3pA65qpdwPbzjohhew==", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -23707,7 +23714,7 @@ "node": ">= 18" }, "peerDependencies": { - "typedoc": "beta.x" + "typedoc": "0.26.x" } }, "packages/typedoc-plugin-remark": { diff --git a/package.json b/package.json index ee1b19f3d..765d28361 100644 --- a/package.json +++ b/package.json @@ -25,19 +25,19 @@ "@commitlint/config-conventional": "^19.2.2", "@types/fs-extra": "^11.0.4", "@types/jest": "^29.5.12", - "@types/node": "^20.14.2", - "@typescript-eslint/eslint-plugin": "^7.12.0", - "@typescript-eslint/parser": "^7.12.0", + "@types/node": "^20.14.7", + "@typescript-eslint/eslint-plugin": "^7.13.1", + "@typescript-eslint/parser": "^7.13.1", "barrelsby": "^2.8.1", "consola": "^3.2.3", "copyfiles": "^2.4.1", "eslint": "^8.57.0", "fs-extra": "^11.2.0", - "glob": "^10.4.1", + "glob": "^10.4.2", "husky": "^9.0.11", "jest": "^29.7.0", "markdownlint": "^0.34.0", - "prettier": "^3.3.1", + "prettier": "^3.3.2", "prettier-plugin-organize-imports": "^3.2.4", "remark": "^15.0.1", "remark-gfm": "^4.0.0", @@ -45,13 +45,13 @@ "remark-mdx": "^3.0.1", "remark-toc": "^9.0.0", "to-vfile": "^8.0.0", - "ts-jest": "^29.1.4", + "ts-jest": "^29.1.5", "ts-json-schema-generator": "^2.3.0", "ts-morph": "^22.0.0", "ts-node": "^10.9.2", "tsc-alias": "^1.8.10", - "typedoc": "^0.26.0-beta.5", - "typescript": "^5.4.5", + "typedoc": "^0.26.0", + "typescript": "^5.5.2", "unified-prettier": "^2.0.1" } } diff --git a/packages/typedoc-plugin-markdown/package.json b/packages/typedoc-plugin-markdown/package.json index 01bcec083..f8d2c7578 100644 --- a/packages/typedoc-plugin-markdown/package.json +++ b/packages/typedoc-plugin-markdown/package.json @@ -32,7 +32,7 @@ }, "homepage": "https://typedoc-plugin-markdown.org", "peerDependencies": { - "typedoc": "beta.x" + "typedoc": "0.26.x" }, "engines": { "node": ">= 18" diff --git a/packages/typedoc-plugin-markdown/src/events/markdown-page-event.ts b/packages/typedoc-plugin-markdown/src/events/markdown-page-event.ts index af22f6269..83856d5e9 100644 --- a/packages/typedoc-plugin-markdown/src/events/markdown-page-event.ts +++ b/packages/typedoc-plugin-markdown/src/events/markdown-page-event.ts @@ -1,4 +1,4 @@ -import { Event, ProjectReflection, Reflection } from 'typedoc'; +import { ProjectReflection, Reflection } from 'typedoc'; /** * An event emitted before and after the markdown of a page is rendered. diff --git a/packages/typedoc-plugin-markdown/src/events/markdown-renderer-event.ts b/packages/typedoc-plugin-markdown/src/events/markdown-renderer-event.ts index 32a3c804e..5be8fd90c 100644 --- a/packages/typedoc-plugin-markdown/src/events/markdown-renderer-event.ts +++ b/packages/typedoc-plugin-markdown/src/events/markdown-renderer-event.ts @@ -1,7 +1,7 @@ import { MarkdownPageEvent } from '@plugin/events'; import { NavigationItem, RenderTemplate, UrlMapping } from '@plugin/types'; import * as path from 'path'; -import { Event, ProjectReflection, Reflection } from 'typedoc'; +import { ProjectReflection, Reflection } from 'typedoc'; /** * An event emitted at the beginning and end of the rendering process. diff --git a/packages/typedoc-plugin-markdown/src/renderer/overrides.ts b/packages/typedoc-plugin-markdown/src/renderer/overrides.ts index f2872f196..1ec2eea78 100644 --- a/packages/typedoc-plugin-markdown/src/renderer/overrides.ts +++ b/packages/typedoc-plugin-markdown/src/renderer/overrides.ts @@ -76,52 +76,42 @@ export async function render( this.preRenderAsyncJobs = []; - if (!output.isDefaultPrevented()) { - this.application.logger.verbose( - `There are ${output.urls?.length} pages to write.`, - ); - - output.urls - ?.filter( - (urlMapping) => - urlMapping.model instanceof ProjectReflection || - urlMapping.model instanceof DeclarationReflection || - urlMapping.model instanceof DocumentReflection, - ) - .forEach(async (urlMapping) => { - const [template, page] = output.createPageEvent(urlMapping); - - this.trigger(MarkdownPageEvent.BEGIN, page); + this.application.logger.verbose( + `There are ${output.urls?.length} pages to write.`, + ); - if (page.isDefaultPrevented()) { - return false; - } + output.urls + ?.filter( + (urlMapping) => + urlMapping.model instanceof ProjectReflection || + urlMapping.model instanceof DeclarationReflection || + urlMapping.model instanceof DocumentReflection, + ) + .forEach(async (urlMapping) => { + const [template, page] = output.createPageEvent(urlMapping); - if (page.model instanceof Reflection) { - page.contents = this.theme!.render(page, template); - } else { - throw new Error('Should be unreachable'); - } + this.trigger(MarkdownPageEvent.BEGIN, page); - this.trigger(MarkdownPageEvent.END, page); + if (page.model instanceof Reflection) { + page.contents = this.theme!.render(page, template); + } else { + throw new Error('Should be unreachable'); + } - if (page.isDefaultPrevented()) { - return false; - } + this.trigger(MarkdownPageEvent.END, page); - try { - writeFileSync(page.filename, page.contents as string); - } catch (error) { - this.application.logger.error(`Could not write ${page.filename}`); - } - }); + try { + writeFileSync(page.filename, page.contents as string); + } catch (error) { + this.application.logger.error(`Could not write ${page.filename}`); + } + }); - await Promise.all(this.postRenderAsyncJobs.map((job) => job(output))); + await Promise.all(this.postRenderAsyncJobs.map((job) => job(output))); - this.postRenderAsyncJobs = []; + this.postRenderAsyncJobs = []; - this.trigger(MarkdownRendererEvent.END, output); - } + this.trigger(MarkdownRendererEvent.END, output); this.theme = void 0; } diff --git a/packages/typedoc-plugin-markdown/src/theme/context/partials/comments.comment.ts b/packages/typedoc-plugin-markdown/src/theme/context/partials/comments.comment.ts index 6996eee58..9292e35f0 100644 --- a/packages/typedoc-plugin-markdown/src/theme/context/partials/comments.comment.ts +++ b/packages/typedoc-plugin-markdown/src/theme/context/partials/comments.comment.ts @@ -76,16 +76,19 @@ export function comment( [], ); + const filteredBlockTags = ['@returns', '@module']; + const tags = blockTags - .filter((tag) => tag.tag !== '@returns') + .filter((tag) => !filteredBlockTags.includes(tag.tag)) .filter( (tag) => !opts.isTableColumn || (opts.isTableColumn && tag.tag !== '@defaultValue'), ) .map((tag) => { - const tagName = tag.tag.substring(1); - const tagText = camelToTitleCase(tagName); + const tagText = this.internationalization.translateTagName( + tag.tag as `@${string}`, + ); const tagMd = [ opts.headingLevel ? heading(opts.headingLevel, tagText) + '\n' diff --git a/packages/typedoc-plugin-markdown/test/fixtures/custom-plugins/normalize-sources.mjs b/packages/typedoc-plugin-markdown/test/fixtures/custom-plugins/normalize-sources.mjs index 1de98d390..7f43dbc23 100644 --- a/packages/typedoc-plugin-markdown/test/fixtures/custom-plugins/normalize-sources.mjs +++ b/packages/typedoc-plugin-markdown/test/fixtures/custom-plugins/normalize-sources.mjs @@ -1,27 +1,14 @@ // @ts-check -import { Converter } from 'typedoc'; +import { MarkdownPageEvent } from 'typedoc-plugin-markdown'; /** * @param {import('typedoc-plugin-markdown').MarkdownApplication} app */ export function load(app) { - app.converter.on( - Converter.EVENT_CREATE_DECLARATION, - (context, reflection) => { - if (reflection.sources) { - reflection.sources = reflection.sources?.map((source) => ({ - ...source, - line: '1', - })); - } - }, - ); - app.converter.on(Converter.EVENT_CREATE_SIGNATURE, (context, reflection) => { - if (reflection.sources) { - reflection.sources = reflection.sources?.map((source) => ({ - ...source, - line: '1', - })); - } + app.renderer.on(MarkdownPageEvent.END, (page) => { + page.contents = page.contents.replace( + /\[([a-zA-Z0-9_]+\.ts):\d+\]/g, + '[$1:1]', + ); }); } diff --git a/packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-1/index.ts b/packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-1/index.ts index dde2d35e4..7314a8036 100644 --- a/packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-1/index.ts +++ b/packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-1/index.ts @@ -3,7 +3,7 @@ * * Some more comments for package-1 * - * @packageDocumentation + * @module */ export interface PackageInterface { diff --git a/packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-1b/index.ts b/packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-1b/index.ts index c8fc04d2d..c39a6392a 100644 --- a/packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-1b/index.ts +++ b/packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-1b/index.ts @@ -1,7 +1,7 @@ /** * Comments for package-1b * - * @packageDocumentation + * @module */ export interface PackageInterface {