From e26fd1c7abb95a86dafd4b3957478d51c70bd2df Mon Sep 17 00:00:00 2001 From: Johan Haals Date: Fri, 25 Feb 2022 15:41:53 +0100 Subject: [PATCH 1/3] catalog-react: mark useEntityPermission as alpha Signed-off-by: Johan Haals --- .changeset/polite-poems-nail.md | 5 +++++ plugins/catalog-react/api-report.md | 2 +- plugins/catalog-react/src/hooks/useEntityPermission.ts | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/polite-poems-nail.md diff --git a/.changeset/polite-poems-nail.md b/.changeset/polite-poems-nail.md new file mode 100644 index 0000000000..c3eb97fce0 --- /dev/null +++ b/.changeset/polite-poems-nail.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-react': minor +--- + +Marked `useEntityPermission` as alpha since the underlying permission framework is under active development. diff --git a/plugins/catalog-react/api-report.md b/plugins/catalog-react/api-report.md index f117e8cd5c..dfd5f7d02b 100644 --- a/plugins/catalog-react/api-report.md +++ b/plugins/catalog-react/api-report.md @@ -564,7 +564,7 @@ export function useEntityOwnership(): { isOwnedEntity: (entity: Entity | EntityName) => boolean; }; -// @public +// @alpha export function useEntityPermission(permission: Permission): { loading: boolean; allowed: boolean; diff --git a/plugins/catalog-react/src/hooks/useEntityPermission.ts b/plugins/catalog-react/src/hooks/useEntityPermission.ts index c1f62cfc39..092114936a 100644 --- a/plugins/catalog-react/src/hooks/useEntityPermission.ts +++ b/plugins/catalog-react/src/hooks/useEntityPermission.ts @@ -28,7 +28,7 @@ import { useEntity } from './useEntity'; * Note: this hook blocks the permission request until the entity has loaded in * context. If you have the entityRef and need concurrent requests, use the * `usePermission` hook directly. - * @public + * @alpha */ export function useEntityPermission(permission: Permission): { loading: boolean; From 4ed5ce50610812779c33f233eab63e7b19f5c5c3 Mon Sep 17 00:00:00 2001 From: Johan Haals Date: Fri, 25 Feb 2022 15:54:28 +0100 Subject: [PATCH 2/3] publish alpha types Signed-off-by: Johan Haals --- plugins/catalog-react/package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/catalog-react/package.json b/plugins/catalog-react/package.json index c7e255f973..b80d1f5789 100644 --- a/plugins/catalog-react/package.json +++ b/plugins/catalog-react/package.json @@ -9,7 +9,8 @@ "publishConfig": { "access": "public", "main": "dist/index.esm.js", - "types": "dist/index.d.ts" + "types": "dist/index.d.ts", + "alphaTypes": "dist/index.alpha.d.ts" }, "backstage": { "role": "web-library" From 2d858b5c2a2dc4f6e3e74ebb6e99f34ab40937e8 Mon Sep 17 00:00:00 2001 From: Johan Haals Date: Mon, 28 Feb 2022 10:48:09 +0100 Subject: [PATCH 3/3] use experimental type build, include alpha types Signed-off-by: Johan Haals --- plugins/catalog-react/package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/catalog-react/package.json b/plugins/catalog-react/package.json index b80d1f5789..119c3f19a4 100644 --- a/plugins/catalog-react/package.json +++ b/plugins/catalog-react/package.json @@ -25,7 +25,7 @@ "backstage" ], "scripts": { - "build": "backstage-cli package build", + "build": "backstage-cli package build --experimental-type-build", "lint": "backstage-cli package lint", "test": "backstage-cli package test", "prepack": "backstage-cli package prepack", @@ -77,6 +77,7 @@ "react-test-renderer": "^16.13.1" }, "files": [ - "dist" + "dist", + "alpha" ] }