From ab206103a6eb42489c7cc4013ea721a576d3d302 Mon Sep 17 00:00:00 2001 From: Asaf Shen Date: Sun, 29 Sep 2024 17:05:20 +0300 Subject: [PATCH 1/7] fix: logger typing improvements (#813) RELEASE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Related Issues related to https://github.com/descope/etc/issues/7827 fixes https://github.com/descope/descope-js/issues/811 fixes https://github.com/descope/descope-js/issues/810 fixes https://github.com/descope/descope-js/issues/812 ## Description - change logger interface to be more loose ➰ - fix vue sdk readme based on a feedback 👍 - add style id to vue sdk ![image](https://github.com/user-attachments/assets/78165245-8be4-4117-8a07-b4b3ce7f1220) ![image](https://github.com/user-attachments/assets/58ab1026-6795-4e80-8682-ae3e59348832) --- .gitignore | 1 + packages/sdks/vue-sdk/README.md | 7 ++++--- packages/sdks/vue-sdk/src/Descope.vue | 4 ++++ packages/sdks/vue-sdk/tests/Descope.test.ts | 2 ++ packages/sdks/web-component/src/lib/descope-wc/index.ts | 3 ++- packages/sdks/web-component/src/lib/types.ts | 7 ------- 6 files changed, 13 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 4691b9f85..4eb3774c6 100644 --- a/.gitignore +++ b/.gitignore @@ -45,6 +45,7 @@ Thumbs.db *.pem .env +.env.local .nx/* .next diff --git a/packages/sdks/vue-sdk/README.md b/packages/sdks/vue-sdk/README.md index c9551b930..7c3af8a6f 100644 --- a/packages/sdks/vue-sdk/README.md +++ b/packages/sdks/vue-sdk/README.md @@ -53,6 +53,7 @@ app.mount('#app'); + ``` diff --git a/packages/sdks/vue-sdk/src/Descope.vue b/packages/sdks/vue-sdk/src/Descope.vue index 6b4fa4bc4..508992dff 100644 --- a/packages/sdks/vue-sdk/src/Descope.vue +++ b/packages/sdks/vue-sdk/src/Descope.vue @@ -13,6 +13,7 @@ :telemetryKey.attr="telemetryKey" :redirect-url="redirectUrl" :auto-focus="autoFocus" + :style-id="styleId" :validate-on-blur="validateOnBlur" :store-last-authenticated-user="storeLastAuthenticatedUser" :errorTransformer.prop="errorTransformer" @@ -93,6 +94,9 @@ const props = defineProps({ client: { type: Object, }, + styleId: { + type: String, + }, }); // const emit = defineEmits(['success', 'error', 'ready']); const emit = defineEmits<{ diff --git a/packages/sdks/vue-sdk/tests/Descope.test.ts b/packages/sdks/vue-sdk/tests/Descope.test.ts index 5cc5e20dc..153824011 100644 --- a/packages/sdks/vue-sdk/tests/Descope.test.ts +++ b/packages/sdks/vue-sdk/tests/Descope.test.ts @@ -36,6 +36,7 @@ describe('Descope.vue', () => { errorTransformer, form: { test: 'a' }, client: { test: 'b' }, + styleId: 'test-style-id', }, }); @@ -54,6 +55,7 @@ describe('Descope.vue', () => { expect(wrapper.vm.errorTransformer).toBe(errorTransformer); expect(descopeWc.attributes('form')).toBe('{"test":"a"}'); expect(wrapper.vm.client).toStrictEqual({ test: 'b' }); + expect(descopeWc.attributes('style-id')).toBe('test-style-id'); }); it('renders a DescopeWc component with empty props', () => { diff --git a/packages/sdks/web-component/src/lib/descope-wc/index.ts b/packages/sdks/web-component/src/lib/descope-wc/index.ts index d69931302..e20dc3905 100644 --- a/packages/sdks/web-component/src/lib/descope-wc/index.ts +++ b/packages/sdks/web-component/src/lib/descope-wc/index.ts @@ -8,4 +8,5 @@ if (!customElements.get('descope-wc')) { } export default DescopeWc; -export type { AutoFocusOptions, ThemeOptions, ILogger } from '../types'; +export type ILogger = Partial; +export type { AutoFocusOptions, ThemeOptions } from '../types'; diff --git a/packages/sdks/web-component/src/lib/types.ts b/packages/sdks/web-component/src/lib/types.ts index dd4b3d9b9..23baa4a8b 100644 --- a/packages/sdks/web-component/src/lib/types.ts +++ b/packages/sdks/web-component/src/lib/types.ts @@ -157,13 +157,6 @@ export interface Context { abTestingKey?: number; } -export interface ILogger { - info(title: string, description: string, state: any): void; - warn(title: string, description?: string): void; - debug(title: string, description?: string): void; - error(title: string, description?: string, ...optionalParams: any[]): void; -} - export type DescopeUI = Record Promise> & { componentsThemeManager: Record; }; From 863be03791f43b734a439b31ac72ab6c4a686e76 Mon Sep 17 00:00:00 2001 From: github-actions Date: Sun, 29 Sep 2024 14:06:04 +0000 Subject: [PATCH 2/7] chore(web-component): release version 3.25.3 --- packages/sdks/web-component/CHANGELOG.md | 7 +++++++ packages/sdks/web-component/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/sdks/web-component/CHANGELOG.md b/packages/sdks/web-component/CHANGELOG.md index 70e5babea..921b5c084 100644 --- a/packages/sdks/web-component/CHANGELOG.md +++ b/packages/sdks/web-component/CHANGELOG.md @@ -2,6 +2,13 @@ This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver). +## [3.25.3](https://github.com/descope/descope-js/compare/web-component-3.25.2...web-component-3.25.3) (2024-09-29) + + +### Bug Fixes + +* logger typing improvements ([#813](https://github.com/descope/descope-js/issues/813)) RELEASE ([ab20610](https://github.com/descope/descope-js/commit/ab206103a6eb42489c7cc4013ea721a576d3d302)) + ## [3.25.2](https://github.com/descope/descope-js/compare/web-component-3.25.1...web-component-3.25.2) (2024-09-29) ### Dependency Updates diff --git a/packages/sdks/web-component/package.json b/packages/sdks/web-component/package.json index f8fb97074..88d71418c 100644 --- a/packages/sdks/web-component/package.json +++ b/packages/sdks/web-component/package.json @@ -1,6 +1,6 @@ { "name": "@descope/web-component", - "version": "3.25.2", + "version": "3.25.3", "author": "Descope Team ", "homepage": "https://github.com/descope/descope-js", "bugs": { From e49822ec39ea45f52df94ad876cf46af33311cbf Mon Sep 17 00:00:00 2001 From: github-actions Date: Sun, 29 Sep 2024 14:06:06 +0000 Subject: [PATCH 3/7] chore(user-profile-widget): release version 0.0.107 --- packages/widgets/user-profile-widget/CHANGELOG.md | 5 +++++ packages/widgets/user-profile-widget/package.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/widgets/user-profile-widget/CHANGELOG.md b/packages/widgets/user-profile-widget/CHANGELOG.md index a56260d8c..719c3c3d7 100644 --- a/packages/widgets/user-profile-widget/CHANGELOG.md +++ b/packages/widgets/user-profile-widget/CHANGELOG.md @@ -2,6 +2,11 @@ This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver). +## [0.0.107](https://github.com/descope/descope-js/compare/user-profile-widget-0.0.106...user-profile-widget-0.0.107) (2024-09-29) + +### Dependency Updates + +* `web-component` updated to version `3.25.3` ## [0.0.106](https://github.com/descope/descope-js/compare/user-profile-widget-0.0.105...user-profile-widget-0.0.106) (2024-09-29) ### Dependency Updates diff --git a/packages/widgets/user-profile-widget/package.json b/packages/widgets/user-profile-widget/package.json index 9ed0100f9..63d4f70a6 100644 --- a/packages/widgets/user-profile-widget/package.json +++ b/packages/widgets/user-profile-widget/package.json @@ -1,6 +1,6 @@ { "name": "@descope/user-profile-widget", - "version": "0.0.106", + "version": "0.0.107", "author": "Descope Team ", "homepage": "https://github.com/descope/descope-js", "bugs": { From bade259994de4ead78f2bc1a05231478fd24b6fb Mon Sep 17 00:00:00 2001 From: github-actions Date: Sun, 29 Sep 2024 14:06:08 +0000 Subject: [PATCH 4/7] chore(react-sdk): release version 2.0.78 --- packages/sdks/react-sdk/CHANGELOG.md | 6 ++++++ packages/sdks/react-sdk/package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/sdks/react-sdk/CHANGELOG.md b/packages/sdks/react-sdk/CHANGELOG.md index a873fd171..57d999475 100644 --- a/packages/sdks/react-sdk/CHANGELOG.md +++ b/packages/sdks/react-sdk/CHANGELOG.md @@ -2,6 +2,12 @@ This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver). +## [2.0.78](https://github.com/descope/descope-js/compare/react-sdk-2.0.77...react-sdk-2.0.78) (2024-09-29) + +### Dependency Updates + +* `user-profile-widget` updated to version `0.0.107` +* `web-component` updated to version `3.25.3` ## [2.0.77](https://github.com/descope/descope-js/compare/react-sdk-2.0.76...react-sdk-2.0.77) (2024-09-29) ### Dependency Updates diff --git a/packages/sdks/react-sdk/package.json b/packages/sdks/react-sdk/package.json index 215ddf16d..6ee932684 100644 --- a/packages/sdks/react-sdk/package.json +++ b/packages/sdks/react-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@descope/react-sdk", - "version": "2.0.77", + "version": "2.0.78", "description": "Descope React SDK", "author": "Descope Team ", "homepage": "https://github.com/descope/descope-js", From 729d04abcd59f2a3b6bdb187066dbb8cd7b0eead Mon Sep 17 00:00:00 2001 From: github-actions Date: Sun, 29 Sep 2024 14:06:10 +0000 Subject: [PATCH 5/7] chore(nextjs-sdk): release version 0.2.12 --- packages/sdks/nextjs-sdk/CHANGELOG.md | 6 ++++++ packages/sdks/nextjs-sdk/package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/sdks/nextjs-sdk/CHANGELOG.md b/packages/sdks/nextjs-sdk/CHANGELOG.md index ceb82553e..bb7643c67 100644 --- a/packages/sdks/nextjs-sdk/CHANGELOG.md +++ b/packages/sdks/nextjs-sdk/CHANGELOG.md @@ -2,6 +2,12 @@ This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver). +## [0.2.12](https://github.com/descope/descope-js/compare/nextjs-sdk-0.2.11...nextjs-sdk-0.2.12) (2024-09-29) + +### Dependency Updates + +* `react-sdk` updated to version `2.0.78` +* `web-component` updated to version `3.25.3` ## [0.2.11](https://github.com/descope/descope-js/compare/nextjs-sdk-0.2.10...nextjs-sdk-0.2.11) (2024-09-29) ### Dependency Updates diff --git a/packages/sdks/nextjs-sdk/package.json b/packages/sdks/nextjs-sdk/package.json index 5c6fde92e..1e6b07b0f 100644 --- a/packages/sdks/nextjs-sdk/package.json +++ b/packages/sdks/nextjs-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@descope/nextjs-sdk", - "version": "0.2.11", + "version": "0.2.12", "description": "Descope NextJS SDK", "author": "Descope Team ", "homepage": "https://github.com/descope/descope-js", From 9e645f58f4076cb4b294858b2e644e1948d04b84 Mon Sep 17 00:00:00 2001 From: github-actions Date: Sun, 29 Sep 2024 14:06:13 +0000 Subject: [PATCH 6/7] chore(vue-sdk): release version 2.0.37 --- packages/sdks/vue-sdk/CHANGELOG.md | 11 +++++++++++ packages/sdks/vue-sdk/package.json | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/packages/sdks/vue-sdk/CHANGELOG.md b/packages/sdks/vue-sdk/CHANGELOG.md index 190232a42..6674dc0c4 100644 --- a/packages/sdks/vue-sdk/CHANGELOG.md +++ b/packages/sdks/vue-sdk/CHANGELOG.md @@ -2,6 +2,17 @@ This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver). +## [2.0.37](https://github.com/descope/descope-js/compare/vue-sdk-2.0.36...vue-sdk-2.0.37) (2024-09-29) + +### Dependency Updates + +* `user-profile-widget` updated to version `0.0.107` +* `web-component` updated to version `3.25.3` + +### Bug Fixes + +* logger typing improvements ([#813](https://github.com/descope/descope-js/issues/813)) RELEASE ([ab20610](https://github.com/descope/descope-js/commit/ab206103a6eb42489c7cc4013ea721a576d3d302)) + ## [2.0.36](https://github.com/descope/descope-js/compare/vue-sdk-2.0.35...vue-sdk-2.0.36) (2024-09-29) ### Dependency Updates diff --git a/packages/sdks/vue-sdk/package.json b/packages/sdks/vue-sdk/package.json index facfe498a..1d589c96c 100644 --- a/packages/sdks/vue-sdk/package.json +++ b/packages/sdks/vue-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@descope/vue-sdk", - "version": "2.0.36", + "version": "2.0.37", "main": "dist/index.cjs", "module": "dist/index.mjs", "type": "module", From 88cc3c795dd610681a4afb538d0072248897a9fe Mon Sep 17 00:00:00 2001 From: github-actions Date: Sun, 29 Sep 2024 14:06:15 +0000 Subject: [PATCH 7/7] chore(angular-sdk): release version 0.5.25 --- packages/sdks/angular-sdk/CHANGELOG.md | 6 ++++++ packages/sdks/angular-sdk/package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/sdks/angular-sdk/CHANGELOG.md b/packages/sdks/angular-sdk/CHANGELOG.md index 2d6df3d61..ac6993f7a 100644 --- a/packages/sdks/angular-sdk/CHANGELOG.md +++ b/packages/sdks/angular-sdk/CHANGELOG.md @@ -2,6 +2,12 @@ This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver). +## [0.5.25](https://github.com/descope/descope-js/compare/angular-sdk-0.5.24...angular-sdk-0.5.25) (2024-09-29) + +### Dependency Updates + +* `user-profile-widget` updated to version `0.0.107` +* `web-component` updated to version `3.25.3` ## [0.5.24](https://github.com/descope/descope-js/compare/angular-sdk-0.5.23...angular-sdk-0.5.24) (2024-09-29) ### Dependency Updates diff --git a/packages/sdks/angular-sdk/package.json b/packages/sdks/angular-sdk/package.json index 68fe2b39b..9892eac09 100644 --- a/packages/sdks/angular-sdk/package.json +++ b/packages/sdks/angular-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@descope/angular-sdk", - "version": "0.5.24", + "version": "0.5.25", "peerDependencies": { "@angular/common": ">=16.0.0", "@angular/core": ">=16.0.0"