From 583715dbbe375fe54d9feb8fee3153e5876ecd33 Mon Sep 17 00:00:00 2001 From: Adam Harvey <33203301+adamdmharvey@users.noreply.github.com> Date: Fri, 5 Jul 2024 23:33:03 -0400 Subject: [PATCH 1/5] chore: Fix comment typo Signed-off-by: Adam Harvey <33203301+adamdmharvey@users.noreply.github.com> --- packages/repo-tools/src/commands/api-reports/api-extractor.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/repo-tools/src/commands/api-reports/api-extractor.ts b/packages/repo-tools/src/commands/api-reports/api-extractor.ts index 6a523af6a9..c3054dffe9 100644 --- a/packages/repo-tools/src/commands/api-reports/api-extractor.ts +++ b/packages/repo-tools/src/commands/api-reports/api-extractor.ts @@ -145,7 +145,7 @@ ApiReportGenerator.generateReviewFileContent = if (!localName) { // Sometimes the symbol name is suffixed with a number to disambiguate, // e.g. "Props_14" instead of "Props" if there are multiple Props interfaces - // so we tyry to strip that suffix and look up the symbol again. + // so we try to strip that suffix and look up the symbol again. const [, trimmedSymbolName] = symbolName.match(/(.*)_\d+/) || []; localName = (sourceFile as any).identifiers?.get(trimmedSymbolName); } @@ -1101,6 +1101,7 @@ export async function buildDocs({ switch (hierarchyItem.kind) { case ApiItemKind.Model: case ApiItemKind.EntryPoint: + case ApiItemKind.None: // We don't show the model as part of the breadcrumb because it is the root-level container. // We don't show the entry point because today API Extractor doesn't support multiple entry points; // this may change in the future. From c3837fb3fca523d296b9024c5dd8c80a5f207e1f Mon Sep 17 00:00:00 2001 From: Adam Harvey <33203301+adamdmharvey@users.noreply.github.com> Date: Fri, 5 Jul 2024 23:34:33 -0400 Subject: [PATCH 2/5] chore: Fix invalid API docs cross-reference Signed-off-by: Adam Harvey <33203301+adamdmharvey@users.noreply.github.com> --- plugins/permission-node/src/types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/permission-node/src/types.ts b/plugins/permission-node/src/types.ts index 36e30714f6..0a7e06ed91 100644 --- a/plugins/permission-node/src/types.ts +++ b/plugins/permission-node/src/types.ts @@ -23,7 +23,7 @@ import { NoInfer } from './integration/util'; /** * A conditional rule that can be provided in an - * {@link @backstage/permission-common#AuthorizeDecision} response to an authorization request. + * {@link @backstage/plugin-permission-common#AuthorizeDecision} response to an authorization request. * * @remarks * From 09086e8d0ae82ca18f1e2a476bff60278af872f6 Mon Sep 17 00:00:00 2001 From: Adam Harvey <33203301+adamdmharvey@users.noreply.github.com> Date: Fri, 5 Jul 2024 23:34:53 -0400 Subject: [PATCH 3/5] chore: Add packageDocumentation for API Docs Index Signed-off-by: Adam Harvey <33203301+adamdmharvey@users.noreply.github.com> --- plugins/permission-react/api-report.md | 2 -- plugins/permission-react/src/index.ts | 5 +++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/permission-react/api-report.md b/plugins/permission-react/api-report.md index 3c1961c92c..4c51d16b80 100644 --- a/plugins/permission-react/api-report.md +++ b/plugins/permission-react/api-report.md @@ -100,6 +100,4 @@ export function usePermission( resourceRef: string | undefined; }, ): AsyncPermissionResult; - -// (No @packageDocumentation comment for this package) ``` diff --git a/plugins/permission-react/src/index.ts b/plugins/permission-react/src/index.ts index 57352c5cdd..de6958b3e5 100644 --- a/plugins/permission-react/src/index.ts +++ b/plugins/permission-react/src/index.ts @@ -14,6 +14,11 @@ * limitations under the License. */ +/** + * Components and hooks to help implement permissions in Backstage frontend plugins. + * + * @packageDocumentation + */ export * from './components'; export * from './hooks'; export * from './apis'; From 28b2cfb08cf1bc88107ef61d344b687febfd2bed Mon Sep 17 00:00:00 2001 From: Adam Harvey <33203301+adamdmharvey@users.noreply.github.com> Date: Fri, 5 Jul 2024 23:37:30 -0400 Subject: [PATCH 4/5] chore: Add changesets Signed-off-by: Adam Harvey <33203301+adamdmharvey@users.noreply.github.com> --- .changeset/famous-clocks-visit.md | 5 +++++ .changeset/tender-turkeys-begin.md | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 .changeset/famous-clocks-visit.md create mode 100644 .changeset/tender-turkeys-begin.md diff --git a/.changeset/famous-clocks-visit.md b/.changeset/famous-clocks-visit.md new file mode 100644 index 0000000000..66c2048872 --- /dev/null +++ b/.changeset/famous-clocks-visit.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-permission-node': patch +--- + +Fix invalid cross-reference in API Reference docs diff --git a/.changeset/tender-turkeys-begin.md b/.changeset/tender-turkeys-begin.md new file mode 100644 index 0000000000..26e376cecf --- /dev/null +++ b/.changeset/tender-turkeys-begin.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-permission-react': patch +--- + +Improve API Reference documentation From 518616d4c9f13eeaef816a9dfa8ce9b95a07e773 Mon Sep 17 00:00:00 2001 From: Adam Harvey <33203301+adamdmharvey@users.noreply.github.com> Date: Sat, 6 Jul 2024 00:14:44 -0400 Subject: [PATCH 5/5] chore: Remove testing Signed-off-by: Adam Harvey <33203301+adamdmharvey@users.noreply.github.com> --- packages/repo-tools/src/commands/api-reports/api-extractor.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/repo-tools/src/commands/api-reports/api-extractor.ts b/packages/repo-tools/src/commands/api-reports/api-extractor.ts index c3054dffe9..122f04cc7e 100644 --- a/packages/repo-tools/src/commands/api-reports/api-extractor.ts +++ b/packages/repo-tools/src/commands/api-reports/api-extractor.ts @@ -1101,7 +1101,6 @@ export async function buildDocs({ switch (hierarchyItem.kind) { case ApiItemKind.Model: case ApiItemKind.EntryPoint: - case ApiItemKind.None: // We don't show the model as part of the breadcrumb because it is the root-level container. // We don't show the entry point because today API Extractor doesn't support multiple entry points; // this may change in the future.