From 928efbc54a253d1814c248117051ac27c486daaf Mon Sep 17 00:00:00 2001 From: Andre Wanlin Date: Fri, 22 Dec 2023 13:15:34 -0600 Subject: [PATCH 1/3] Updated auth module default export Signed-off-by: Andre Wanlin --- .changeset/brave-ghosts-pay.md | 5 +++++ .changeset/heavy-moose-reflect.md | 5 +++++ plugins/auth-backend-module-microsoft-provider/src/index.ts | 2 +- plugins/auth-backend-module-pinniped-provider/src/index.ts | 2 +- 4 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 .changeset/brave-ghosts-pay.md create mode 100644 .changeset/heavy-moose-reflect.md diff --git a/.changeset/brave-ghosts-pay.md b/.changeset/brave-ghosts-pay.md new file mode 100644 index 0000000000..84d255ea0d --- /dev/null +++ b/.changeset/brave-ghosts-pay.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-auth-backend-module-pinniped-provider': minor +--- + +**BREAKING** The `authModulePinnipedProvider` is now the default export and should be used like this in your backend: `backend.add(import('@backstage/plugin-auth-backend-module-pinniped-provider'));` diff --git a/.changeset/heavy-moose-reflect.md b/.changeset/heavy-moose-reflect.md new file mode 100644 index 0000000000..639e3c8bf4 --- /dev/null +++ b/.changeset/heavy-moose-reflect.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-auth-backend-module-microsoft-provider': minor +--- + +**BREAKING** The `authModuleMicrosoftProvider` is now the default export and should be used like this in your backend: `backend.add(import('@backstage/plugin-auth-backend-module-microsoft-provider'));` diff --git a/plugins/auth-backend-module-microsoft-provider/src/index.ts b/plugins/auth-backend-module-microsoft-provider/src/index.ts index ae4fbf5926..735b6716c5 100644 --- a/plugins/auth-backend-module-microsoft-provider/src/index.ts +++ b/plugins/auth-backend-module-microsoft-provider/src/index.ts @@ -21,5 +21,5 @@ */ export { microsoftAuthenticator } from './authenticator'; -export { authModuleMicrosoftProvider } from './module'; +export { authModuleMicrosoftProvider as default } from './module'; export { microsoftSignInResolvers } from './resolvers'; diff --git a/plugins/auth-backend-module-pinniped-provider/src/index.ts b/plugins/auth-backend-module-pinniped-provider/src/index.ts index df4cd58603..bc2bea4c7e 100644 --- a/plugins/auth-backend-module-pinniped-provider/src/index.ts +++ b/plugins/auth-backend-module-pinniped-provider/src/index.ts @@ -21,4 +21,4 @@ */ export { pinnipedAuthenticator, PinnipedStrategyCache } from './authenticator'; -export { authModulePinnipedProvider } from './module'; +export { authModulePinnipedProvider as default } from './module'; From 25b2d7223813ee23f66528037b4fc1c56c0ff31d Mon Sep 17 00:00:00 2001 From: Andre Wanlin Date: Fri, 22 Dec 2023 14:17:09 -0600 Subject: [PATCH 2/3] Updated so a breaking change is not needed Signed-off-by: Andre Wanlin --- .changeset/brave-ghosts-pay.md | 4 ++-- .changeset/heavy-moose-reflect.md | 4 ++-- .../api-report.md | 4 +++- .../src/deprecated.ts | 23 +++++++++++++++++++ .../src/index.ts | 1 + .../api-report.md | 4 +++- .../src/deprecated.ts | 23 +++++++++++++++++++ .../src/index.ts | 1 + 8 files changed, 58 insertions(+), 6 deletions(-) create mode 100644 plugins/auth-backend-module-microsoft-provider/src/deprecated.ts create mode 100644 plugins/auth-backend-module-pinniped-provider/src/deprecated.ts diff --git a/.changeset/brave-ghosts-pay.md b/.changeset/brave-ghosts-pay.md index 84d255ea0d..d8981fa53b 100644 --- a/.changeset/brave-ghosts-pay.md +++ b/.changeset/brave-ghosts-pay.md @@ -1,5 +1,5 @@ --- -'@backstage/plugin-auth-backend-module-pinniped-provider': minor +'@backstage/plugin-auth-backend-module-pinniped-provider': patch --- -**BREAKING** The `authModulePinnipedProvider` is now the default export and should be used like this in your backend: `backend.add(import('@backstage/plugin-auth-backend-module-pinniped-provider'));` +Deprecated the `authModulePinnipedProvider` export. A default export is now available and should be used like this in your backend: `backend.add(import('@backstage/plugin-auth-backend-module-pinniped-provider'));` diff --git a/.changeset/heavy-moose-reflect.md b/.changeset/heavy-moose-reflect.md index 639e3c8bf4..011d3fc023 100644 --- a/.changeset/heavy-moose-reflect.md +++ b/.changeset/heavy-moose-reflect.md @@ -1,5 +1,5 @@ --- -'@backstage/plugin-auth-backend-module-microsoft-provider': minor +'@backstage/plugin-auth-backend-module-microsoft-provider': patch --- -**BREAKING** The `authModuleMicrosoftProvider` is now the default export and should be used like this in your backend: `backend.add(import('@backstage/plugin-auth-backend-module-microsoft-provider'));` +Deprecated the `authModuleMicrosoftProvider` export. A default export is now available and should be used like this in your backend: `backend.add(import('@backstage/plugin-auth-backend-module-microsoft-provider'));` diff --git a/plugins/auth-backend-module-microsoft-provider/api-report.md b/plugins/auth-backend-module-microsoft-provider/api-report.md index 21bf77d545..c54b986864 100644 --- a/plugins/auth-backend-module-microsoft-provider/api-report.md +++ b/plugins/auth-backend-module-microsoft-provider/api-report.md @@ -11,7 +11,9 @@ import { PassportProfile } from '@backstage/plugin-auth-node'; import { SignInResolverFactory } from '@backstage/plugin-auth-node'; // @public (undocumented) -export const authModuleMicrosoftProvider: () => BackendFeature; +const authModuleMicrosoftProvider: () => BackendFeature; +export { authModuleMicrosoftProvider }; +export default authModuleMicrosoftProvider; // @public (undocumented) export const microsoftAuthenticator: OAuthAuthenticator< diff --git a/plugins/auth-backend-module-microsoft-provider/src/deprecated.ts b/plugins/auth-backend-module-microsoft-provider/src/deprecated.ts new file mode 100644 index 0000000000..c961e1c942 --- /dev/null +++ b/plugins/auth-backend-module-microsoft-provider/src/deprecated.ts @@ -0,0 +1,23 @@ +/* + * Copyright 2023 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { authModuleMicrosoftProvider as deprecatedAuthModuleMicrosoftProvider } from './module'; + +/** + * @public + * @deprecated Use default import instead + */ +export { deprecatedAuthModuleMicrosoftProvider as authModuleMicrosoftProvider }; diff --git a/plugins/auth-backend-module-microsoft-provider/src/index.ts b/plugins/auth-backend-module-microsoft-provider/src/index.ts index 735b6716c5..45b7b719cd 100644 --- a/plugins/auth-backend-module-microsoft-provider/src/index.ts +++ b/plugins/auth-backend-module-microsoft-provider/src/index.ts @@ -23,3 +23,4 @@ export { microsoftAuthenticator } from './authenticator'; export { authModuleMicrosoftProvider as default } from './module'; export { microsoftSignInResolvers } from './resolvers'; +export * from './deprecated'; diff --git a/plugins/auth-backend-module-pinniped-provider/api-report.md b/plugins/auth-backend-module-pinniped-provider/api-report.md index 430099713e..3a8b6b5bf6 100644 --- a/plugins/auth-backend-module-pinniped-provider/api-report.md +++ b/plugins/auth-backend-module-pinniped-provider/api-report.md @@ -11,7 +11,9 @@ import { Strategy } from 'openid-client'; import { TokenSet } from 'openid-client'; // @public (undocumented) -export const authModulePinnipedProvider: () => BackendFeature; +const authModulePinnipedProvider: () => BackendFeature; +export { authModulePinnipedProvider }; +export default authModulePinnipedProvider; // @public (undocumented) export const pinnipedAuthenticator: OAuthAuthenticator< diff --git a/plugins/auth-backend-module-pinniped-provider/src/deprecated.ts b/plugins/auth-backend-module-pinniped-provider/src/deprecated.ts new file mode 100644 index 0000000000..f11cdc13e6 --- /dev/null +++ b/plugins/auth-backend-module-pinniped-provider/src/deprecated.ts @@ -0,0 +1,23 @@ +/* + * Copyright 2023 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { authModulePinnipedProvider as deprecatedAuthModulePinnipedProvider } from './module'; + +/** + * @public + * @deprecated Use default import instead + */ +export { deprecatedAuthModulePinnipedProvider as authModulePinnipedProvider }; diff --git a/plugins/auth-backend-module-pinniped-provider/src/index.ts b/plugins/auth-backend-module-pinniped-provider/src/index.ts index bc2bea4c7e..f4b789644d 100644 --- a/plugins/auth-backend-module-pinniped-provider/src/index.ts +++ b/plugins/auth-backend-module-pinniped-provider/src/index.ts @@ -22,3 +22,4 @@ export { pinnipedAuthenticator, PinnipedStrategyCache } from './authenticator'; export { authModulePinnipedProvider as default } from './module'; +export * from './deprecated'; From e508999a639d7f10d6919e33941e84037f7c15ab Mon Sep 17 00:00:00 2001 From: Andre Wanlin Date: Wed, 10 Jan 2024 16:22:33 -0600 Subject: [PATCH 3/3] Adjustment based on feedback Signed-off-by: Andre Wanlin --- .../auth-backend-module-microsoft-provider/api-report.md | 8 +++++--- .../src/deprecated.ts | 3 ++- .../auth-backend-module-pinniped-provider/api-report.md | 8 +++++--- .../src/deprecated.ts | 2 +- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/plugins/auth-backend-module-microsoft-provider/api-report.md b/plugins/auth-backend-module-microsoft-provider/api-report.md index c54b986864..33600c10d8 100644 --- a/plugins/auth-backend-module-microsoft-provider/api-report.md +++ b/plugins/auth-backend-module-microsoft-provider/api-report.md @@ -10,10 +10,12 @@ import { PassportOAuthAuthenticatorHelper } from '@backstage/plugin-auth-node'; import { PassportProfile } from '@backstage/plugin-auth-node'; import { SignInResolverFactory } from '@backstage/plugin-auth-node'; +// @public @deprecated (undocumented) +export const authModuleMicrosoftProvider: () => BackendFeature; + // @public (undocumented) -const authModuleMicrosoftProvider: () => BackendFeature; -export { authModuleMicrosoftProvider }; -export default authModuleMicrosoftProvider; +const authModuleMicrosoftProvider_2: () => BackendFeature; +export default authModuleMicrosoftProvider_2; // @public (undocumented) export const microsoftAuthenticator: OAuthAuthenticator< diff --git a/plugins/auth-backend-module-microsoft-provider/src/deprecated.ts b/plugins/auth-backend-module-microsoft-provider/src/deprecated.ts index c961e1c942..3c671b6c25 100644 --- a/plugins/auth-backend-module-microsoft-provider/src/deprecated.ts +++ b/plugins/auth-backend-module-microsoft-provider/src/deprecated.ts @@ -20,4 +20,5 @@ import { authModuleMicrosoftProvider as deprecatedAuthModuleMicrosoftProvider } * @public * @deprecated Use default import instead */ -export { deprecatedAuthModuleMicrosoftProvider as authModuleMicrosoftProvider }; +export const authModuleMicrosoftProvider = + deprecatedAuthModuleMicrosoftProvider; diff --git a/plugins/auth-backend-module-pinniped-provider/api-report.md b/plugins/auth-backend-module-pinniped-provider/api-report.md index 3a8b6b5bf6..182ea8ba21 100644 --- a/plugins/auth-backend-module-pinniped-provider/api-report.md +++ b/plugins/auth-backend-module-pinniped-provider/api-report.md @@ -10,10 +10,12 @@ import { OAuthAuthenticator } from '@backstage/plugin-auth-node'; import { Strategy } from 'openid-client'; import { TokenSet } from 'openid-client'; +// @public @deprecated (undocumented) +export const authModulePinnipedProvider: () => BackendFeature; + // @public (undocumented) -const authModulePinnipedProvider: () => BackendFeature; -export { authModulePinnipedProvider }; -export default authModulePinnipedProvider; +const authModulePinnipedProvider_2: () => BackendFeature; +export default authModulePinnipedProvider_2; // @public (undocumented) export const pinnipedAuthenticator: OAuthAuthenticator< diff --git a/plugins/auth-backend-module-pinniped-provider/src/deprecated.ts b/plugins/auth-backend-module-pinniped-provider/src/deprecated.ts index f11cdc13e6..0dd2ed36bd 100644 --- a/plugins/auth-backend-module-pinniped-provider/src/deprecated.ts +++ b/plugins/auth-backend-module-pinniped-provider/src/deprecated.ts @@ -20,4 +20,4 @@ import { authModulePinnipedProvider as deprecatedAuthModulePinnipedProvider } fr * @public * @deprecated Use default import instead */ -export { deprecatedAuthModulePinnipedProvider as authModulePinnipedProvider }; +export const authModulePinnipedProvider = deprecatedAuthModulePinnipedProvider;