From 25b2d7223813ee23f66528037b4fc1c56c0ff31d Mon Sep 17 00:00:00 2001 From: Andre Wanlin Date: Fri, 22 Dec 2023 14:17:09 -0600 Subject: [PATCH] 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';