From 75d9484822bb960a7f0a6f41106fb29d4adf3684 Mon Sep 17 00:00:00 2001 From: Tony Date: Sat, 20 Jun 2026 23:37:13 +0800 Subject: [PATCH 1/4] Update typedoc to 0.28 and bump its plugins --- packages/js-api-generator/build.ts | 24 ++- packages/js-api-generator/package.json | 6 +- pnpm-lock.yaml | 197 ++++++++++--------------- 3 files changed, 91 insertions(+), 136 deletions(-) diff --git a/packages/js-api-generator/build.ts b/packages/js-api-generator/build.ts index 4fa261e42f..ef1ceb6db3 100644 --- a/packages/js-api-generator/build.ts +++ b/packages/js-api-generator/build.ts @@ -1,18 +1,16 @@ import { Application, - DeclarationReflection, Options, PageEvent, Reflection, - SignatureReflection, TSConfigReader, + type RouterTarget, type TypeDocOptions, } from 'typedoc'; import { MarkdownPageEvent, MarkdownTheme, MarkdownThemeContext, - type MarkdownApplication, type PluginOptions, } from 'typedoc-plugin-markdown'; import { existsSync, readFileSync, writeFileSync } from 'node:fs'; @@ -47,7 +45,6 @@ async function generator() { entryPoints: ['../tauri/packages/api/src/index.ts'], tsconfig: '../tauri/packages/api/tsconfig.json', gitRevision: 'dev', - publicPath: '/reference/javascript/api/', basePath: '/reference/javascript/api/', ...typeDocConfigBaseOptions, }; @@ -101,11 +98,10 @@ async function generator() { ); plugins.forEach(async (plugin) => { - const pluginJsOptions: Partial = { + const pluginJsOptions: Partial = { entryPoints: [`../plugins-workspace/plugins/${plugin}/guest-js/index.ts`], tsconfig: `../plugins-workspace/plugins/${plugin}/tsconfig.json`, gitRevision: 'v2', - publicPath: `/reference/javascript/`, basePath: `/reference/javascript/`, ...typeDocConfigBaseOptions, // Must go after to override base @@ -125,7 +121,6 @@ async function generator() { entryPoints: ['../tauri/packages/api/src/index.ts'], tsconfig: '../tauri/packages/api/tsconfig.json', gitRevision: 'dev', - publicPath: '/reference/javascript/api/', basePath: '/reference/javascript/api/', ...typeDocConfigBaseOptions, }; @@ -139,15 +134,14 @@ async function generator() { } // Adapted from https://github.com/HiDeoo/starlight-typedoc -async function generateDocs(options: Partial) { - const outputDir = `../../src/content/docs${options.publicPath}`; +async function generateDocs(options: Partial) { + const outputDir = `../../src/content/docs${options.basePath}`; const app = await Application.bootstrapWithPlugins(options); app.options.addReader(new TSConfigReader()); - // @ts-ignore app.renderer.defineTheme('tauri-theme', TauriTheme); - app.renderer.on(PageEvent.END, (event: PageEvent) => { + app.renderer.on(PageEvent.END, (event: PageEvent) => { pageEventEnd(event); }); @@ -160,7 +154,7 @@ async function generateDocs(options: Partial) { // Adds frontmatter to the top of the file // Adapted from https://github.com/HiDeoo/starlight-typedoc -function pageEventEnd(event: PageEvent) { +function pageEventEnd(event: PageEvent) { if (!event.contents) { return; } @@ -186,7 +180,7 @@ class TauriThemeRenderContext extends MarkdownThemeContext { this.partials = { ...this.partials, // Formats `@source` to be a single line - sources: (model: DeclarationReflection | SignatureReflection, options: object) => { + sources: (model, options) => { if (!model.sources) { return ''; } @@ -229,13 +223,13 @@ class TauriThemeRenderContext extends MarkdownThemeContext { } // Adapted from https://github.com/HiDeoo/starlight-typedoc/blob/d95072e218004276942a5132ec8a4e3561425903/packages/starlight-typedoc/src/libs/theme.ts#L28 - override getRelativeUrl = (url: string) => { + override relativeURL = (url: string) => { if (/^(http|ftp)s?:\/\//.test(url)) { return url; } url = decodeURI( - super.getRelativeUrl(url).replaceAll('.md', '/').replaceAll('.', '').toLowerCase() + super.relativeURL(url).replaceAll('.md', '/').replaceAll('.', '').toLowerCase() ).replaceAll('\\', '/'); return url; }; diff --git a/packages/js-api-generator/package.json b/packages/js-api-generator/package.json index 30a33f8ffc..3b90ea68b9 100644 --- a/packages/js-api-generator/package.json +++ b/packages/js-api-generator/package.json @@ -12,9 +12,9 @@ "private": "true", "dependencies": { "github-slugger": "^2.0.0", - "typedoc": "0.26.6", - "typedoc-plugin-markdown": "4.2.6", - "typedoc-plugin-mdn-links": "3.2.11", + "typedoc": "0.28.19", + "typedoc-plugin-markdown": "4.12.0", + "typedoc-plugin-mdn-links": "5.1.1", "typescript": "5.9" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 52a69cdd4c..757de9bee2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -153,14 +153,14 @@ importers: specifier: ^2.0.0 version: 2.0.0 typedoc: - specifier: 0.26.6 - version: 0.26.6(typescript@5.9.3) + specifier: 0.28.19 + version: 0.28.19(typescript@5.9.3) typedoc-plugin-markdown: - specifier: 4.2.6 - version: 4.2.6(typedoc@0.26.6(typescript@5.9.3)) + specifier: 4.12.0 + version: 4.12.0(typedoc@0.28.19(typescript@5.9.3)) typedoc-plugin-mdn-links: - specifier: 3.2.11 - version: 3.2.11(typedoc@0.26.6(typescript@5.9.3)) + specifier: 5.1.1 + version: 5.1.1(typedoc@0.28.19(typescript@5.9.3)) typescript: specifier: '5.9' version: 5.9.3 @@ -1072,6 +1072,9 @@ packages: '@feelback/js@0.3.4': resolution: {integrity: sha512-xr7gTqSJcVUYQlELs1TntYovCBjMcYUr/hGKTnDoF64/lig5CbX4bOmqLoF50IImCy5q3oIwg9w+TSFvtBwsIA==} + '@gerrit0/mini-shiki@3.23.0': + resolution: {integrity: sha512-bEMORlG0cqdjVyCEuU0cDQbORWX+kYCeo0kV1lbxF5bt4r7SID2l9bqsxJEM0zndaxpOUT7riCyIVEuqq/Ynxg==} + '@iarna/toml@2.2.5': resolution: {integrity: sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg==} @@ -1652,29 +1655,23 @@ packages: cpu: [x64] os: [win32] - '@shikijs/core@1.29.2': - resolution: {integrity: sha512-vju0lY9r27jJfOY4Z7+Rt/nIOjzJpZ3y+nYpqtUZInVoXQ/TJZcfGnNOGnKjFdVZb8qexiCuSlZRKcGfhhTTZQ==} - '@shikijs/core@4.2.0': resolution: {integrity: sha512-Hc87Ab1Ld/vEbZRCbwx344I5v+4RU8CVToUTRkqXL1+TjbuOp9U5Xa0M23V4GEWHxVn+yO5otb+HkQVm3ptWQQ==} engines: {node: '>=20'} - '@shikijs/engine-javascript@1.29.2': - resolution: {integrity: sha512-iNEZv4IrLYPv64Q6k7EPpOCE/nuvGiKl7zxdq0WFuRPF5PAE9PRo2JGq/d8crLusM59BRemJ4eOqrFrC4wiQ+A==} - '@shikijs/engine-javascript@4.2.0': resolution: {integrity: sha512-fjETeq1k5ffyXqRgS6+3hpvqseLalp1kjNfRbXpUgWR8FpZ1CmQfiNHovc5lncYjt/Vg5JK/WJEmLahjwMa0og==} engines: {node: '>=20'} - '@shikijs/engine-oniguruma@1.29.2': - resolution: {integrity: sha512-7iiOx3SG8+g1MnlzZVDYiaeHe7Ez2Kf2HrJzdmGwkRisT7r4rak0e655AcM/tF9JG/kg5fMNYlLLKglbN7gBqA==} + '@shikijs/engine-oniguruma@3.23.0': + resolution: {integrity: sha512-1nWINwKXxKKLqPibT5f4pAFLej9oZzQTsby8942OTlsJzOBZ0MWKiwzMsd+jhzu8YPCHAswGnnN1YtQfirL35g==} '@shikijs/engine-oniguruma@4.2.0': resolution: {integrity: sha512-hTorK1dffPkpbMUk6Z+828PgRo7d07HbnizoP0hNPFjhxMHctj0Px/qoHeGMYafc6ju+u9iMldN4JbVzNQM++g==} engines: {node: '>=20'} - '@shikijs/langs@1.29.2': - resolution: {integrity: sha512-FIBA7N3LZ+223U7cJDUYd5shmciFQlYkFXlkKVaHsCPgfVLiO+e12FmQE6Tf9vuyEsFe3dIl8qGWKXgEHL9wmQ==} + '@shikijs/langs@3.23.0': + resolution: {integrity: sha512-2Ep4W3Re5aB1/62RSYQInK9mM3HsLeB91cHqznAJMuylqjzNVAVCMnNWRHFtcNHXsoNRayP9z1qj4Sq3nMqYXg==} '@shikijs/langs@4.2.0': resolution: {integrity: sha512-bwrVRlJ0wUhZxAbVdvBbv2TTC9yLsh4C/IO5Ofz0T8MQntgDvyVnkbjw9vi50r1kx7RCIJdnJnjZAwmAsXFLZQ==} @@ -1684,15 +1681,15 @@ packages: resolution: {integrity: sha512-NOq+DtUkVBJtZMVXL5A0vI0Xk8nvDYaXetFHSJFlOqjDZIVhIPRYFdGkSoElDqNuegikcc3A76SNUa8dTqtAYA==} engines: {node: '>=20'} - '@shikijs/themes@1.29.2': - resolution: {integrity: sha512-i9TNZlsq4uoyqSbluIcZkmPL9Bfi3djVxRnofUHwvx/h6SRW3cwgBC5SML7vsDcWyukY0eCzVN980rqP6qNl9g==} + '@shikijs/themes@3.23.0': + resolution: {integrity: sha512-5qySYa1ZgAT18HR/ypENL9cUSGOeI2x+4IvYJu4JgVJdizn6kG4ia5Q1jDEOi7gTbN4RbuYtmHh0W3eccOrjMA==} '@shikijs/themes@4.2.0': resolution: {integrity: sha512-RX8IHYeLv8Cu2W6ruc3RxUqWn0IYCqSrMBzi/uRGAmfyDNOnNO5BF/Px7o97n4XTpmFTo5GbRaazuOWj+2ak2w==} engines: {node: '>=20'} - '@shikijs/types@1.29.2': - resolution: {integrity: sha512-VJjK0eIijTZf0QSTODEXCqinjBn0joAHQ+aPSBzrv4O2d/QSbsMw+ZeSRx03kV34Hy7NzUvV/7NqfYGRLrASmw==} + '@shikijs/types@3.23.0': + resolution: {integrity: sha512-3JZ5HXOZfYjsYSk0yPwBrkupyYSLpAE26Qc0HLghhZNGTZg/SKxXIIgoxOpmmeQP0RRSDJTk1/vPfw9tbw+jSQ==} '@shikijs/types@4.2.0': resolution: {integrity: sha512-VT/MKtlpOhEPZloSH3Pb9WCZEBDoQVMa9jedp5UAwmJOar1DVc9DRODAxmYPW9M93IK4ryuqRejFfmlvlVDemw==} @@ -1978,6 +1975,10 @@ packages: balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + balanced-match@4.0.4: + resolution: {integrity: sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==} + engines: {node: 18 || 20 || >=22} + bcp-47-match@2.0.3: resolution: {integrity: sha512-JtTezzbAibu8G0R9op9zb3vcWZd9JF6M0xOYGPn0fNCd7wOpRB1mU2mH9T8gaBGbAAyIIVgB2G7xG0GP98zMAQ==} @@ -2002,6 +2003,10 @@ packages: brace-expansion@2.1.0: resolution: {integrity: sha512-TN1kCZAgdgweJhWWpgKYrQaMNHcDULHkWwQIspdtjV4Y5aurRdZpjAqn6yX3FPqTA9ngHCc4hJxMAMgGfve85w==} + brace-expansion@5.0.6: + resolution: {integrity: sha512-kLpxurY4Z4r9sgMsyG0Z9uzsBlgiU/EFKhj/h91/8yHu0edo7XuixOIH3VcJ8kkxs6/jPzoI6U9Vj3WqbMQ94g==} + engines: {node: 18 || 20 || >=22} + braces@3.0.3: resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} engines: {node: '>=8'} @@ -2234,9 +2239,6 @@ packages: electron-to-chromium@1.5.70: resolution: {integrity: sha512-P6FPqAWIZrC3sHDAwBitJBs7N7IF58m39XVny7DFseQXK2eiMn7nNQizFf63mWDDUnFvaqsM8FI0+ZZfLkdUGA==} - emoji-regex-xs@1.0.0: - resolution: {integrity: sha512-LRlerrMYoIDrT6jgpeZ2YYl/L8EulRTt5hQcYjy5AInh7HWXKimpqx68aknBFpGL2+/IcogTcaydJEgaTmOpDg==} - entities@4.5.0: resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} engines: {node: '>=0.12'} @@ -2885,8 +2887,8 @@ packages: resolution: {integrity: sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==} engines: {node: '>= 12.0.0'} - linkify-it@5.0.0: - resolution: {integrity: sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==} + linkify-it@5.0.1: + resolution: {integrity: sha512-wVoTjP4Q6R0NW5hiZkVJaFZPWgtXfoGF+6LucL3/FtiNjmcHhYjEr5f1Kqjirc1nBW07J/ZuRFumqr2oqccEWg==} lodash.debounce@4.0.8: resolution: {integrity: sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==} @@ -2923,8 +2925,8 @@ packages: resolution: {integrity: sha512-o5vL7aDWatOTX8LzaS1WMoaoxIiLRQJuIKKe2wAw6IeULDHaqbiqiggmx+pKvZDb1Sj+pE46Sn1T7lCqfFtg1Q==} engines: {node: '>=16'} - markdown-it@14.1.0: - resolution: {integrity: sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==} + markdown-it@14.2.0: + resolution: {integrity: sha512-1TGiQiJVRQ3NPmZH6sx5Cfnmg6GQm9jvC1ch4TK511NjSJvjzKLzn5pPfZRNZkRPZP0HqCioSndqH8v2nRaWVQ==} hasBin: true markdown-table@3.0.4: @@ -3137,6 +3139,10 @@ packages: resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} engines: {node: '>=8.6'} + minimatch@10.2.5: + resolution: {integrity: sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==} + engines: {node: 18 || 20 || >=22} + minimatch@3.1.5: resolution: {integrity: sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==} @@ -3144,10 +3150,6 @@ packages: resolution: {integrity: sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw==} engines: {node: '>=10'} - minimatch@9.0.9: - resolution: {integrity: sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==} - engines: {node: '>=16 || 14 >=14.17'} - mrmime@2.0.1: resolution: {integrity: sha512-Y3wQdFg2Va6etvQ5I82yUhGdsKrcYox6p7FfL1LbK2J4V01F9TGlepTIhnK24t7koZibmg82KGglhA1XK5IsLQ==} engines: {node: '>=10'} @@ -3213,9 +3215,6 @@ packages: oniguruma-parser@0.12.2: resolution: {integrity: sha512-6HVa5oIrgMC6aA6WF6XyyqbhRPJrKR02L20+2+zpDtO5QAzGHAUGw5TKQvwi5vctNnRHkJYmjAhRVQF2EKdTQw==} - oniguruma-to-es@2.3.0: - resolution: {integrity: sha512-bwALDxriqfKGfUufKGGepCzu9x7nJQuoRoAFp4AnwehhC2crqrDIAP/uN2qdlsAvSMpeRC3+Yzhqc7hLmle5+g==} - oniguruma-to-es@4.3.6: resolution: {integrity: sha512-csuQ9x3Yr0cEIs/Zgx/OEt9iBw9vqIunAPQkx19R/fiMq2oGVTgcMqO/V3Ybqefr1TBvosI6jU539ksaBULJyA==} @@ -3364,18 +3363,12 @@ packages: regenerator-transform@0.15.2: resolution: {integrity: sha512-hfMp2BoF0qOk3uc5V20ALGDS2ddjQaLrdl7xrGXvAIow7qeWRM2VA2HuCHkUKk9slq3VwEwLNK3DFBqDfPGYtg==} - regex-recursion@5.1.1: - resolution: {integrity: sha512-ae7SBCbzVNrIjgSbh7wMznPcQel1DNlDtzensnFxpiNpXt1U2ju/bHugH422r+4LAVS1FpW1YCwilmnNsjum9w==} - regex-recursion@6.0.2: resolution: {integrity: sha512-0YCaSCq2VRIebiaUviZNs0cBz1kg5kVS2UKUfNIx8YVs1cN3AV7NTctO5FOKBA+UT2BPJIWZauYHPqJODG50cg==} regex-utilities@2.3.0: resolution: {integrity: sha512-8VhliFJAWRaUiVvREIiW2NXXTmHs4vMNnSzuJVhscgmGav3g9VDxLrQndI3dZZVVdp0ZO/5v0xmX516/7M9cng==} - regex@5.1.1: - resolution: {integrity: sha512-dN5I359AVGPnwzJm2jN1k0W9LPZ+ePvoOeVMMfqIMFz53sSwXkxaJoxr50ptnsC771lK95BnTrVSZxq0b9yCGw==} - regex@6.1.0: resolution: {integrity: sha512-6VwtthbV4o/7+OaAF9I5L5V3llLEsoPyq9P1JVXkedTP33c7MfCG0/5NOPcSJn0TzXcG9YUrR0gQSWioew3LDg==} @@ -3537,9 +3530,6 @@ packages: resolution: {integrity: sha512-Ou9I5Ft9WNcCbXrU9cMgPBcCK8LiwLqcbywW3t4oDV37n1pzpuNLsYiAV8eODnjbtQlSDwZ2cUEeQz4E54Hltg==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - shiki@1.29.2: - resolution: {integrity: sha512-njXuliz/cP+67jU2hukkxCNuH1yUi4QfdZZY+sMr5PPrIyXSu5iTb/qYC4BiWWB0vZ+7TbdvYUCeL23zpwCfbg==} - shiki@4.2.0: resolution: {integrity: sha512-hjNax6o/ylDy9lefQEaSDtzaT3iVNtZ3WmpQnbuQNoG4xvnSKf2kSKbihZVO4JRG1TTMejs7CmNRYlWgAL66pQ==} engines: {node: '>=20'} @@ -3761,23 +3751,23 @@ packages: resolution: {integrity: sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==} engines: {node: '>= 0.4'} - typedoc-plugin-markdown@4.2.6: - resolution: {integrity: sha512-k33o2lZSGpL3GjH28eW+RsujzCYFP0L5GNqpK+wa4CBcMOxpj8WV7SydNRLS6eSa2UvaPvNVJTaAZ6Tm+8GXoA==} + typedoc-plugin-markdown@4.12.0: + resolution: {integrity: sha512-eJDEMAfxCmede22c/Jw7d0FA13ggAQv+KkwQYKYCdqI02cin6Rc9QRwbG/7XvvHWinuFejySnZVUWDtvGk3Vbg==} engines: {node: '>= 18'} peerDependencies: - typedoc: 0.26.x + typedoc: 0.28.x - typedoc-plugin-mdn-links@3.2.11: - resolution: {integrity: sha512-0VlF21O3S1L373UTkUFleoQDrgkh5quAqjCVusBaa3czLahK6LsUxQj6PRqbT5xN0emUVYnT7UTwe8haU2MFrw==} + typedoc-plugin-mdn-links@5.1.1: + resolution: {integrity: sha512-fLlYudnlGkE9uspOEm/SBXwr+G0RbxoDZiHAVsCg+5NwKe2aUxjZK1YyQfleNZydImanzkX2oUJF29xbEeOSWw==} peerDependencies: - typedoc: '>= 0.23.14 || 0.24.x || 0.25.x || 0.26.x' + typedoc: 0.27.x || 0.28.x - typedoc@0.26.6: - resolution: {integrity: sha512-SfEU3SH3wHNaxhFPjaZE2kNl/NFtLNW5c1oHsg7mti7GjmUj1Roq6osBQeMd+F4kL0BoRBBr8gQAuqBlfFu8LA==} - engines: {node: '>= 18'} + typedoc@0.28.19: + resolution: {integrity: sha512-wKh+lhdmMFivMlc6vRRcMGXeGEHGU2g8a2CkPTJjJlwRf1iXbimWIPcFolCqe4E0d/FRtGszpIrsp3WLpDB8Pw==} + engines: {node: '>= 18', pnpm: '>= 10'} hasBin: true peerDependencies: - typescript: 4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x + typescript: 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x || 5.8.x || 5.9.x || 6.0.x typescript@5.9.3: resolution: {integrity: sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==} @@ -5218,6 +5208,14 @@ snapshots: '@feelback/js@0.3.4': {} + '@gerrit0/mini-shiki@3.23.0': + dependencies: + '@shikijs/engine-oniguruma': 3.23.0 + '@shikijs/langs': 3.23.0 + '@shikijs/themes': 3.23.0 + '@shikijs/types': 3.23.0 + '@shikijs/vscode-textmate': 10.0.2 + '@iarna/toml@2.2.5': {} '@img/colour@1.0.0': {} @@ -5689,15 +5687,6 @@ snapshots: '@rollup/rollup-win32-x64-msvc@4.62.0': optional: true - '@shikijs/core@1.29.2': - dependencies: - '@shikijs/engine-javascript': 1.29.2 - '@shikijs/engine-oniguruma': 1.29.2 - '@shikijs/types': 1.29.2 - '@shikijs/vscode-textmate': 10.0.2 - '@types/hast': 3.0.4 - hast-util-to-html: 9.0.5 - '@shikijs/core@4.2.0': dependencies: '@shikijs/primitive': 4.2.0 @@ -5706,21 +5695,15 @@ snapshots: '@types/hast': 3.0.4 hast-util-to-html: 9.0.5 - '@shikijs/engine-javascript@1.29.2': - dependencies: - '@shikijs/types': 1.29.2 - '@shikijs/vscode-textmate': 10.0.2 - oniguruma-to-es: 2.3.0 - '@shikijs/engine-javascript@4.2.0': dependencies: '@shikijs/types': 4.2.0 '@shikijs/vscode-textmate': 10.0.2 oniguruma-to-es: 4.3.6 - '@shikijs/engine-oniguruma@1.29.2': + '@shikijs/engine-oniguruma@3.23.0': dependencies: - '@shikijs/types': 1.29.2 + '@shikijs/types': 3.23.0 '@shikijs/vscode-textmate': 10.0.2 '@shikijs/engine-oniguruma@4.2.0': @@ -5728,9 +5711,9 @@ snapshots: '@shikijs/types': 4.2.0 '@shikijs/vscode-textmate': 10.0.2 - '@shikijs/langs@1.29.2': + '@shikijs/langs@3.23.0': dependencies: - '@shikijs/types': 1.29.2 + '@shikijs/types': 3.23.0 '@shikijs/langs@4.2.0': dependencies: @@ -5742,15 +5725,15 @@ snapshots: '@shikijs/vscode-textmate': 10.0.2 '@types/hast': 3.0.4 - '@shikijs/themes@1.29.2': + '@shikijs/themes@3.23.0': dependencies: - '@shikijs/types': 1.29.2 + '@shikijs/types': 3.23.0 '@shikijs/themes@4.2.0': dependencies: '@shikijs/types': 4.2.0 - '@shikijs/types@1.29.2': + '@shikijs/types@3.23.0': dependencies: '@shikijs/vscode-textmate': 10.0.2 '@types/hast': 3.0.4 @@ -6129,6 +6112,8 @@ snapshots: balanced-match@1.0.2: {} + balanced-match@4.0.4: {} + bcp-47-match@2.0.3: {} bcp-47@2.1.0: @@ -6156,6 +6141,10 @@ snapshots: dependencies: balanced-match: 1.0.2 + brace-expansion@5.0.6: + dependencies: + balanced-match: 4.0.4 + braces@3.0.3: dependencies: fill-range: 7.1.1 @@ -6363,8 +6352,6 @@ snapshots: electron-to-chromium@1.5.70: {} - emoji-regex-xs@1.0.0: {} - entities@4.5.0: {} entities@6.0.1: {} @@ -7175,7 +7162,7 @@ snapshots: lightningcss-win32-x64-msvc: 1.32.0 optional: true - linkify-it@5.0.0: + linkify-it@5.0.1: dependencies: uc.micro: 2.1.0 @@ -7211,11 +7198,11 @@ snapshots: markdown-extensions@2.0.0: {} - markdown-it@14.1.0: + markdown-it@14.2.0: dependencies: argparse: 2.0.1 entities: 4.5.0 - linkify-it: 5.0.0 + linkify-it: 5.0.1 mdurl: 2.0.0 punycode.js: 2.3.1 uc.micro: 2.1.0 @@ -7711,6 +7698,10 @@ snapshots: braces: 3.0.3 picomatch: 2.3.2 + minimatch@10.2.5: + dependencies: + brace-expansion: 5.0.6 + minimatch@3.1.5: dependencies: brace-expansion: 1.1.14 @@ -7719,10 +7710,6 @@ snapshots: dependencies: brace-expansion: 2.1.0 - minimatch@9.0.9: - dependencies: - brace-expansion: 2.1.0 - mrmime@2.0.1: {} ms@2.1.3: {} @@ -7777,12 +7764,6 @@ snapshots: oniguruma-parser@0.12.2: {} - oniguruma-to-es@2.3.0: - dependencies: - emoji-regex-xs: 1.0.0 - regex: 5.1.1 - regex-recursion: 5.1.1 - oniguruma-to-es@4.3.6: dependencies: oniguruma-parser: 0.12.2 @@ -7942,21 +7923,12 @@ snapshots: dependencies: '@babel/runtime': 7.25.6 - regex-recursion@5.1.1: - dependencies: - regex: 5.1.1 - regex-utilities: 2.3.0 - regex-recursion@6.0.2: dependencies: regex-utilities: 2.3.0 regex-utilities@2.3.0: {} - regex@5.1.1: - dependencies: - regex-utilities: 2.3.0 - regex@6.1.0: dependencies: regex-utilities: 2.3.0 @@ -8263,17 +8235,6 @@ snapshots: '@img/sharp-win32-ia32': 0.34.5 '@img/sharp-win32-x64': 0.34.5 - shiki@1.29.2: - dependencies: - '@shikijs/core': 1.29.2 - '@shikijs/engine-javascript': 1.29.2 - '@shikijs/engine-oniguruma': 1.29.2 - '@shikijs/langs': 1.29.2 - '@shikijs/themes': 1.29.2 - '@shikijs/types': 1.29.2 - '@shikijs/vscode-textmate': 10.0.2 - '@types/hast': 3.0.4 - shiki@4.2.0: dependencies: '@shikijs/core': 4.2.0 @@ -8558,20 +8519,20 @@ snapshots: is-typed-array: 1.1.13 possible-typed-array-names: 1.0.0 - typedoc-plugin-markdown@4.2.6(typedoc@0.26.6(typescript@5.9.3)): + typedoc-plugin-markdown@4.12.0(typedoc@0.28.19(typescript@5.9.3)): dependencies: - typedoc: 0.26.6(typescript@5.9.3) + typedoc: 0.28.19(typescript@5.9.3) - typedoc-plugin-mdn-links@3.2.11(typedoc@0.26.6(typescript@5.9.3)): + typedoc-plugin-mdn-links@5.1.1(typedoc@0.28.19(typescript@5.9.3)): dependencies: - typedoc: 0.26.6(typescript@5.9.3) + typedoc: 0.28.19(typescript@5.9.3) - typedoc@0.26.6(typescript@5.9.3): + typedoc@0.28.19(typescript@5.9.3): dependencies: + '@gerrit0/mini-shiki': 3.23.0 lunr: 2.3.9 - markdown-it: 14.1.0 - minimatch: 9.0.9 - shiki: 1.29.2 + markdown-it: 14.2.0 + minimatch: 10.2.5 typescript: 5.9.3 yaml: 2.9.0 From 4a5af65168dcc8915051dbbce5da4c86611cf822 Mon Sep 17 00:00:00 2001 From: Tony Date: Sun, 21 Jun 2026 10:33:12 +0800 Subject: [PATCH 2/4] Fix type not data --- packages/js-api-generator/build.ts | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/packages/js-api-generator/build.ts b/packages/js-api-generator/build.ts index ef1ceb6db3..379f20d146 100644 --- a/packages/js-api-generator/build.ts +++ b/packages/js-api-generator/build.ts @@ -15,7 +15,9 @@ import { } from 'typedoc-plugin-markdown'; import { existsSync, readFileSync, writeFileSync } from 'node:fs'; -const typeDocConfigBaseOptions: Partial = { +type ConfigOptions = Partial; + +const typeDocConfigBaseOptions: ConfigOptions = { // TypeDoc options // https://typedoc.org/options/ githubPages: false, @@ -41,10 +43,11 @@ const typeDocConfigBaseOptions: Partial = { async function generator() { if (existsSync('../tauri/packages/api/node_modules')) { - const coreJsOptions: Partial = { + const coreJsOptions: ConfigOptions = { entryPoints: ['../tauri/packages/api/src/index.ts'], tsconfig: '../tauri/packages/api/tsconfig.json', gitRevision: 'dev', + publicPath: '/reference/javascript/api/', basePath: '/reference/javascript/api/', ...typeDocConfigBaseOptions, }; @@ -98,10 +101,11 @@ async function generator() { ); plugins.forEach(async (plugin) => { - const pluginJsOptions: Partial = { + const pluginJsOptions: ConfigOptions = { entryPoints: [`../plugins-workspace/plugins/${plugin}/guest-js/index.ts`], tsconfig: `../plugins-workspace/plugins/${plugin}/tsconfig.json`, gitRevision: 'v2', + publicPath: `/reference/javascript/`, basePath: `/reference/javascript/`, ...typeDocConfigBaseOptions, // Must go after to override base @@ -117,10 +121,11 @@ async function generator() { } if (existsSync('../tauri/packages/api/node_modules')) { - const coreJsOptions: Partial = { + const coreJsOptions: ConfigOptions = { entryPoints: ['../tauri/packages/api/src/index.ts'], tsconfig: '../tauri/packages/api/tsconfig.json', gitRevision: 'dev', + publicPath: '/reference/javascript/api/', basePath: '/reference/javascript/api/', ...typeDocConfigBaseOptions, }; @@ -134,8 +139,8 @@ async function generator() { } // Adapted from https://github.com/HiDeoo/starlight-typedoc -async function generateDocs(options: Partial) { - const outputDir = `../../src/content/docs${options.basePath}`; +async function generateDocs(options: ConfigOptions) { + const outputDir = `../../src/content/docs${options.publicPath}`; const app = await Application.bootstrapWithPlugins(options); app.options.addReader(new TSConfigReader()); From 24335980e5f434cb4ec4343ac5ab8137bab329d0 Mon Sep 17 00:00:00 2001 From: Tony Date: Sun, 21 Jun 2026 17:57:35 +0800 Subject: [PATCH 3/4] Migrate outputs --- packages/js-api-generator/build.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/js-api-generator/build.ts b/packages/js-api-generator/build.ts index 379f20d146..37f843806e 100644 --- a/packages/js-api-generator/build.ts +++ b/packages/js-api-generator/build.ts @@ -15,7 +15,7 @@ import { } from 'typedoc-plugin-markdown'; import { existsSync, readFileSync, writeFileSync } from 'node:fs'; -type ConfigOptions = Partial; +type ConfigOptions = Partial & PluginOptions>; const typeDocConfigBaseOptions: ConfigOptions = { // TypeDoc options @@ -142,7 +142,10 @@ async function generator() { async function generateDocs(options: ConfigOptions) { const outputDir = `../../src/content/docs${options.publicPath}`; - const app = await Application.bootstrapWithPlugins(options); + const app = await Application.bootstrapWithPlugins({ + ...options, + outputs: [{ name: 'markdown', path: outputDir }], + }); app.options.addReader(new TSConfigReader()); app.renderer.defineTheme('tauri-theme', TauriTheme); @@ -153,7 +156,7 @@ async function generateDocs(options: ConfigOptions) { const project = await app.convert(); if (project) { - await app.generateDocs(project, outputDir); + await app.generateOutputs(project); } } From f11b7f2f12e0080ffbd46c2e3d19d96efb40b4ea Mon Sep 17 00:00:00 2001 From: Tony Date: Sun, 21 Jun 2026 18:31:32 +0800 Subject: [PATCH 4/4] `relativeURL` is not used but `urlTo` is --- packages/js-api-generator/build.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/js-api-generator/build.ts b/packages/js-api-generator/build.ts index 37f843806e..72df3c76d0 100644 --- a/packages/js-api-generator/build.ts +++ b/packages/js-api-generator/build.ts @@ -231,16 +231,18 @@ class TauriThemeRenderContext extends MarkdownThemeContext { } // Adapted from https://github.com/HiDeoo/starlight-typedoc/blob/d95072e218004276942a5132ec8a4e3561425903/packages/starlight-typedoc/src/libs/theme.ts#L28 - override relativeURL = (url: string) => { + override urlTo(reflection: Reflection): string { + const url = super.urlTo(reflection); + if (/^(http|ftp)s?:\/\//.test(url)) { return url; } - url = decodeURI( - super.relativeURL(url).replaceAll('.md', '/').replaceAll('.', '').toLowerCase() - ).replaceAll('\\', '/'); - return url; - }; + return decodeURI(url.replaceAll('.md', '/').replaceAll('.', '').toLowerCase()).replaceAll( + '\\', + '/' + ); + } } // Overrides and extensions based on https://github.com/tgreyuk/typedoc-plugin-markdown/blob/next/packages/typedoc-plugin-markdown/docs/usage/customizing.md