From 8f4ab172b7f46381e08d3c709e576197396c5331 Mon Sep 17 00:00:00 2001 From: Alex Potsides Date: Wed, 28 Jun 2023 10:39:49 +0200 Subject: [PATCH] fix: when generating api doc link, check typedoc entry point (#1318) If a package is in a monorepo and it has no typedoc entry point no API doc link should be generated. --- src/check-project/readme/api-docs.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/check-project/readme/api-docs.js b/src/check-project/readme/api-docs.js index 1f928508b..fd18376e4 100644 --- a/src/check-project/readme/api-docs.js +++ b/src/check-project/readme/api-docs.js @@ -3,6 +3,12 @@ * @param {*} [parentManifest] */ export const APIDOCS = (pkg, parentManifest) => { + // monorepo project - test for typedoc entry point + if (parentManifest != null && pkg.typedoc?.entryPoint == null) { + return '' + } + + // test for docs script in monorepo root or package const scripts = parentManifest?.scripts ?? pkg.scripts ?? {} if (scripts.docs == null) {