From dbf84eee55e10cab80f658dca5f68f2ebf7bb54e Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Wed, 2 Mar 2022 12:26:49 +0100 Subject: [PATCH] core-app-api: removed deprecated GithubAuth.normalizeScopes Signed-off-by: Patrik Oldsberg --- .changeset/tame-lions-know.md | 5 +++++ packages/core-app-api/api-report.md | 2 -- .../implementations/auth/github/GithubAuth.ts | 15 --------------- 3 files changed, 5 insertions(+), 17 deletions(-) create mode 100644 .changeset/tame-lions-know.md diff --git a/.changeset/tame-lions-know.md b/.changeset/tame-lions-know.md new file mode 100644 index 0000000000..7f304b22ef --- /dev/null +++ b/.changeset/tame-lions-know.md @@ -0,0 +1,5 @@ +--- +'@backstage/core-app-api': minor +--- + +**BREAKING**: Removed the deprecated `GithubAuth.normalizeScopes` method. diff --git a/packages/core-app-api/api-report.md b/packages/core-app-api/api-report.md index c52b953465..116b33c598 100644 --- a/packages/core-app-api/api-report.md +++ b/packages/core-app-api/api-report.md @@ -376,8 +376,6 @@ export type FlatRoutesProps = { export class GithubAuth { // (undocumented) static create(options: OAuthApiCreateOptions): typeof githubAuthApiRef.T; - // @deprecated (undocumented) - static normalizeScope(scope?: string): Set; } // @public diff --git a/packages/core-app-api/src/apis/implementations/auth/github/GithubAuth.ts b/packages/core-app-api/src/apis/implementations/auth/github/GithubAuth.ts index b0af4c7ade..7efe4e95c6 100644 --- a/packages/core-app-api/src/apis/implementations/auth/github/GithubAuth.ts +++ b/packages/core-app-api/src/apis/implementations/auth/github/GithubAuth.ts @@ -47,19 +47,4 @@ export default class GithubAuth { defaultScopes, }); } - - /** - * @deprecated This method is deprecated and will be removed in a future release. - */ - static normalizeScope(scope?: string): Set { - if (!scope) { - return new Set(); - } - - const scopeList = Array.isArray(scope) - ? scope - : scope.split(/[\s|,]/).filter(Boolean); - - return new Set(scopeList); - } }