From 83a41d193a2610c91947f94c0d33c9e459a33676 Mon Sep 17 00:00:00 2001 From: skjnldsv Date: Wed, 16 Sep 2026 17:30:10 +0200 Subject: [PATCH] fix(docs): generate the API documentation from the built declarations Since e1bdc29 dropped the blanket `*.vue` module declaration, typedoc cannot resolve the `.vue` imports in `lib/` and the docs workflow fails on every push to main. typedoc runs plain tsc, which knows nothing about Vue single file components. The declarations `npm run build` rolls up into `dist/index.d.ts` already have those components typed, along with the doc comments, so typedoc now reads that file instead, through a tsconfig that includes it. `build:doc` runs the build first so the file is there. Assisted-by: ClaudeCode:claude-opus-5 Signed-off-by: skjnldsv --- REUSE.toml | 2 +- package.json | 2 +- tsconfig.typedoc.json | 14 ++++++++++++++ typedoc.json | 3 ++- 4 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 tsconfig.typedoc.json diff --git a/REUSE.toml b/REUSE.toml index 85b2ef6..9ddde91 100644 --- a/REUSE.toml +++ b/REUSE.toml @@ -12,7 +12,7 @@ SPDX-FileCopyrightText = "2026 Nextcloud translators" SPDX-License-Identifier = "AGPL-3.0-or-later" [[annotations]] -path = ["build/check-bundle-size.mjs", "package-lock.json", "package.json", "tsconfig.json", "tsconfig.check.json", "typedoc.json", ".gitignore", "AUTHORS.md", "CHANGELOG.md"] +path = ["build/check-bundle-size.mjs", "package-lock.json", "package.json", "tsconfig.json", "tsconfig.check.json", "tsconfig.typedoc.json", "typedoc.json", ".gitignore", "AUTHORS.md", "CHANGELOG.md"] precedence = "aggregate" SPDX-FileCopyrightText = "2026 Nextcloud GmbH and Nextcloud contributors" SPDX-License-Identifier = "AGPL-3.0-or-later" diff --git a/package.json b/package.json index 0cffe6d..03dad1f 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "scripts": { "build": "vite --mode production build", "build:demo": "vite build --config playground/vite.config.ts", - "build:doc": "typedoc && touch dist/doc/.nojekyll", + "build:doc": "npm run build && typedoc && touch dist/doc/.nojekyll", "check:size": "node build/check-bundle-size.mjs", "dev": "vite --mode development build", "l10n:extract": "node build/extract-l10n.js", diff --git a/tsconfig.typedoc.json b/tsconfig.typedoc.json new file mode 100644 index 0000000..c09894f --- /dev/null +++ b/tsconfig.typedoc.json @@ -0,0 +1,14 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "extends": "./tsconfig.json", + "compilerOptions": { + "noEmit": true, + "rootDir": "." + }, + "include": [ + "dist/index.d.ts" + ], + "exclude": [ + "node_modules" + ] +} diff --git a/typedoc.json b/typedoc.json index 85f3992..dd0baf1 100644 --- a/typedoc.json +++ b/typedoc.json @@ -1,6 +1,7 @@ { "$schema": "https://typedoc.org/schema.json", - "entryPoints": ["./lib/index.ts"], + "entryPoints": ["./dist/index.d.ts"], + "tsconfig": "./tsconfig.typedoc.json", "out": "dist/doc", "excludePrivate": true, "navigationLinks": {