From 8511a39aebdf8c2873478d2b1f77a7ca093df357 Mon Sep 17 00:00:00 2001 From: panteliselef Date: Mon, 8 Jul 2024 20:21:07 +0300 Subject: [PATCH 01/15] feat(astro): Add Google One Tap Introduces Google One Tap to Astro, as an interactive Astro component and as a React component that can be used inside your custom JSX. --- .../interactive/GoogleOneTap.astro | 8 +++ .../InternalUIComponentRenderer.astro | 2 +- .../src/astro-components/interactive/index.ts | 2 + .../client/mount-clerk-astro-js-components.ts | 1 + .../astro/src/client/react/uiComponents.tsx | 52 ++++++++++++++++--- .../src/integration/create-integration.ts | 3 +- 6 files changed, 59 insertions(+), 9 deletions(-) create mode 100644 packages/astro/src/astro-components/interactive/GoogleOneTap.astro diff --git a/packages/astro/src/astro-components/interactive/GoogleOneTap.astro b/packages/astro/src/astro-components/interactive/GoogleOneTap.astro new file mode 100644 index 00000000000..e161a232ca5 --- /dev/null +++ b/packages/astro/src/astro-components/interactive/GoogleOneTap.astro @@ -0,0 +1,8 @@ +--- +import type { GoogleOneTapProps } from "@clerk/types"; +type Props = GoogleOneTapProps + +import InternalUIComponentRenderer from './InternalUIComponentRenderer.astro' +--- + + diff --git a/packages/astro/src/astro-components/interactive/InternalUIComponentRenderer.astro b/packages/astro/src/astro-components/interactive/InternalUIComponentRenderer.astro index d0e89ccc541..0f217aa156e 100644 --- a/packages/astro/src/astro-components/interactive/InternalUIComponentRenderer.astro +++ b/packages/astro/src/astro-components/interactive/InternalUIComponentRenderer.astro @@ -1,7 +1,7 @@ --- interface Props { [key: string]: unknown - component: 'sign-in' | 'sign-up' | 'organization-list' | 'organization-profile' | 'organization-switcher' | 'user-button' | 'user-profile' + component: 'sign-in' | 'sign-up' | 'organization-list' | 'organization-profile' | 'organization-switcher' | 'user-button' | 'user-profile' | 'google-one-tap' } import { customAlphabet, urlAlphabet } from "nanoid"; diff --git a/packages/astro/src/astro-components/interactive/index.ts b/packages/astro/src/astro-components/interactive/index.ts index 09f98a26afc..d73a17d01a7 100644 --- a/packages/astro/src/astro-components/interactive/index.ts +++ b/packages/astro/src/astro-components/interactive/index.ts @@ -14,3 +14,5 @@ export { default as OrganizationProfile } from './OrganizationProfile.astro'; export { default as OrganizationSwitcher } from './OrganizationSwitcher.astro'; // @ts-ignore export { default as OrganizationList } from './OrganizationList.astro'; +// @ts-ignore +export { default as GoogleOneTap } from './GoogleOneTap.astro'; diff --git a/packages/astro/src/client/mount-clerk-astro-js-components.ts b/packages/astro/src/client/mount-clerk-astro-js-components.ts index ba050907734..af8fb87ea78 100644 --- a/packages/astro/src/client/mount-clerk-astro-js-components.ts +++ b/packages/astro/src/client/mount-clerk-astro-js-components.ts @@ -12,6 +12,7 @@ const mountAllClerkAstroJSComponents = () => { 'user-profile': 'mountUserProfile', 'sign-in': 'mountSignIn', 'sign-up': 'mountSignUp', + 'google-one-tap': 'openGoogleOneTap', } as const; Object.entries(mountFns).forEach(([category, mountFn]) => { diff --git a/packages/astro/src/client/react/uiComponents.tsx b/packages/astro/src/client/react/uiComponents.tsx index 9f58a8dcfb1..a634357386f 100644 --- a/packages/astro/src/client/react/uiComponents.tsx +++ b/packages/astro/src/client/react/uiComponents.tsx @@ -1,4 +1,5 @@ import type { + GoogleOneTapProps, OrganizationListProps, OrganizationProfileProps, OrganizationSwitcherProps, @@ -11,18 +12,35 @@ import React, { createElement } from 'react'; import { withClerk, type WithClerkProp } from './utils'; +export interface OpenProps { + open: ((props: any) => void) | undefined; + close: (() => void) | undefined; + props?: any; +} + export interface MountProps { - mount?: (node: HTMLDivElement, props: any) => void; - unmount?: (node: HTMLDivElement) => void; + mount: ((node: HTMLDivElement, props: any) => void) | undefined; + unmount: ((node: HTMLDivElement) => void) | undefined; updateProps?: (props: any) => void; props?: any; customPagesPortals?: any[]; } -class Portal extends React.PureComponent { +const isMountProps = (props: any): props is MountProps => { + return 'mount' in props; +}; + +const isOpenProps = (props: any): props is OpenProps => { + return 'open' in props; +}; + +class Portal extends React.PureComponent { private portalRef = React.createRef(); componentDidUpdate(prevProps: Readonly) { + if (!isMountProps(prevProps) || !isMountProps(this.props)) { + return; + } if ( prevProps.props.appearance !== this.props.props.appearance || prevProps.props?.customPages?.length !== this.props.props?.customPages?.length @@ -36,13 +54,24 @@ class Portal extends React.PureComponent { componentDidMount() { if (this.portalRef.current) { - this.props.mount?.(this.portalRef.current, this.props.props); + if (isMountProps(this.props)) { + this.props.mount?.(this.portalRef.current, this.props.props); + } + + if (isOpenProps(this.props)) { + this.props.open?.(this.props.props); + } } } componentWillUnmount() { if (this.portalRef.current) { - this.props.unmount?.(this.portalRef.current); + if (isMountProps(this.props)) { + this.props.unmount?.(this.portalRef.current); + } + if (isOpenProps(this.props)) { + this.props.close?.(); + } } } @@ -50,7 +79,8 @@ class Portal extends React.PureComponent { return ( <>
- {this.props?.customPagesPortals?.map((portal, index) => createElement(portal, { key: index }))} + {isMountProps(this.props) && + this.props?.customPagesPortals?.map((portal, index) => createElement(portal, { key: index }))} ); } @@ -132,3 +162,13 @@ export const OrganizationList = withClerk(({ clerk, ...props }: WithClerkProp ); }, 'OrganizationList'); + +export const GoogleOneTap = withClerk(({ clerk, ...props }: WithClerkProp) => { + return ( + + ); +}, 'GoogleOneTap'); diff --git a/packages/astro/src/integration/create-integration.ts b/packages/astro/src/integration/create-integration.ts index 365fddd6a12..1ffc25584fe 100644 --- a/packages/astro/src/integration/create-integration.ts +++ b/packages/astro/src/integration/create-integration.ts @@ -30,8 +30,7 @@ function createIntegration

({ mode }: sdkMetadata: { version: packageVersion, name: packageName, - // eslint-disable-next-line turbo/no-undeclared-env-vars - environment: import.meta.env.MODE, + // environment: import.meta.env.MODE, }, }; From 630aef7778750f7418758f01561f4e9ca30c3543 Mon Sep 17 00:00:00 2001 From: panteliselef Date: Mon, 8 Jul 2024 20:22:46 +0300 Subject: [PATCH 02/15] feat(astro): Add changeset --- .changeset/cool-chairs-swim.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/cool-chairs-swim.md diff --git a/.changeset/cool-chairs-swim.md b/.changeset/cool-chairs-swim.md new file mode 100644 index 00000000000..3911caced4c --- /dev/null +++ b/.changeset/cool-chairs-swim.md @@ -0,0 +1,5 @@ +--- +"@clerk/astro": patch +--- + +Add support for Google One Tap as an Astro or React UI Component. From e538d4e552c8771fc45fd09ae833e6b677d57c82 Mon Sep 17 00:00:00 2001 From: panteliselef Date: Tue, 9 Jul 2024 12:02:23 +0300 Subject: [PATCH 03/15] update changeset --- .changeset/cool-chairs-swim.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/cool-chairs-swim.md b/.changeset/cool-chairs-swim.md index 3911caced4c..73d3feb4c42 100644 --- a/.changeset/cool-chairs-swim.md +++ b/.changeset/cool-chairs-swim.md @@ -2,4 +2,4 @@ "@clerk/astro": patch --- -Add support for Google One Tap as an Astro or React UI Component. +Add an Astro component and a React UI Component for Google One Tap. From 31cc8f8f267b3fbe2f98f52187c825af706d8237 Mon Sep 17 00:00:00 2001 From: panteliselef Date: Tue, 9 Jul 2024 12:31:24 +0300 Subject: [PATCH 04/15] Add todos in order to properly support custom pages --- packages/astro/src/client/react/uiComponents.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/astro/src/client/react/uiComponents.tsx b/packages/astro/src/client/react/uiComponents.tsx index a634357386f..3bedd626e42 100644 --- a/packages/astro/src/client/react/uiComponents.tsx +++ b/packages/astro/src/client/react/uiComponents.tsx @@ -8,7 +8,7 @@ import type { UserButtonProps, UserProfileProps, } from '@clerk/types'; -import React, { createElement } from 'react'; +import React from 'react'; import { withClerk, type WithClerkProp } from './utils'; @@ -23,7 +23,8 @@ export interface MountProps { unmount: ((node: HTMLDivElement) => void) | undefined; updateProps?: (props: any) => void; props?: any; - customPagesPortals?: any[]; + // TODO: Support custom pages + // customPagesPortals?: any[]; } const isMountProps = (props: any): props is MountProps => { @@ -79,8 +80,9 @@ class Portal extends React.PureComponent { return ( <>

- {isMountProps(this.props) && - this.props?.customPagesPortals?.map((portal, index) => createElement(portal, { key: index }))} + {/*TODO: Support custom pages*/} + {/*{isMountProps(this.props) &&*/} + {/* this.props?.customPagesPortals?.map((portal, index) => createElement(portal, { key: index }))}*/} ); } From 33677a6a27a686c09aeb379eff3ded68c4ec8c4d Mon Sep 17 00:00:00 2001 From: panteliselef Date: Tue, 9 Jul 2024 12:42:53 +0300 Subject: [PATCH 05/15] push a breaking change --- .../astro/src/client/react/uiComponents.tsx | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/packages/astro/src/client/react/uiComponents.tsx b/packages/astro/src/client/react/uiComponents.tsx index 3bedd626e42..2521b25d750 100644 --- a/packages/astro/src/client/react/uiComponents.tsx +++ b/packages/astro/src/client/react/uiComponents.tsx @@ -3,7 +3,6 @@ import type { OrganizationListProps, OrganizationProfileProps, OrganizationSwitcherProps, - SignInProps, SignUpProps, UserButtonProps, UserProfileProps, @@ -88,16 +87,16 @@ class Portal extends React.PureComponent { } } -export const SignIn = withClerk(({ clerk, ...props }: WithClerkProp) => { - return ( - - ); -}, 'SignIn'); +// export const SignIn = withClerk(({ clerk, ...props }: WithClerkProp) => { +// return ( +// +// ); +// }, 'SignIn'); export const SignUp = withClerk(({ clerk, ...props }: WithClerkProp) => { return ( From 6ad50c2e18cb39d1f307c25c54069694b8609298 Mon Sep 17 00:00:00 2001 From: panteliselef Date: Tue, 9 Jul 2024 13:00:13 +0300 Subject: [PATCH 06/15] push another breaking change --- packages/astro/src/astro-components/interactive/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/astro/src/astro-components/interactive/index.ts b/packages/astro/src/astro-components/interactive/index.ts index d73a17d01a7..d24aa0edbbe 100644 --- a/packages/astro/src/astro-components/interactive/index.ts +++ b/packages/astro/src/astro-components/interactive/index.ts @@ -1,7 +1,7 @@ // The `ts-ignore` comments here are necessary because we're importing this file inside the `astro:components` // virtual module's types, which means that `tsc` will try to resolve these imports. Don't mind the editor errors. // @ts-ignore -export { default as SignIn } from './SignIn.astro'; +// export { default as SignIn } from './SignIn.astro'; // @ts-ignore export { default as SignUp } from './SignUp.astro'; // @ts-ignore From c85d903ec8ba0ad80a945c6f4ef8daf36fb1b491 Mon Sep 17 00:00:00 2001 From: panteliselef Date: Tue, 9 Jul 2024 13:00:50 +0300 Subject: [PATCH 07/15] add turbo.json to astro package --- packages/astro/turbo.json | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 packages/astro/turbo.json diff --git a/packages/astro/turbo.json b/packages/astro/turbo.json new file mode 100644 index 00000000000..0ff70b39651 --- /dev/null +++ b/packages/astro/turbo.json @@ -0,0 +1,20 @@ +{ + "extends": ["//"], + "tasks": { + "build": { + "inputs": [ + "*.d.ts", + "**/package.json", + "src/**", + "tsconfig.json", + "tsup.config.ts", + "!**/__snapshots__/**", + "!coverage/**", + "!examples/**", + "!CHANGELOG.md", + "!dist/**", + "!node_modules/**" + ] + } + } +} From 0f36e606577ea381fb32b33a9a22a62ba07fb98f Mon Sep 17 00:00:00 2001 From: panteliselef Date: Tue, 9 Jul 2024 13:15:39 +0300 Subject: [PATCH 08/15] breaking change to nextjs --- .../nextjs/src/client-boundary/uiComponents.tsx | 15 ++++----------- packages/nextjs/src/index.ts | 2 +- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/packages/nextjs/src/client-boundary/uiComponents.tsx b/packages/nextjs/src/client-boundary/uiComponents.tsx index 50599e5df8b..2771c9ec827 100644 --- a/packages/nextjs/src/client-boundary/uiComponents.tsx +++ b/packages/nextjs/src/client-boundary/uiComponents.tsx @@ -3,17 +3,10 @@ import { CreateOrganization as BaseCreateOrganization, OrganizationProfile as BaseOrganizationProfile, - SignIn as BaseSignIn, SignUp as BaseSignUp, UserProfile as BaseUserProfile, } from '@clerk/clerk-react'; -import type { - CreateOrganizationProps, - OrganizationProfileProps, - SignInProps, - SignUpProps, - UserProfileProps, -} from '@clerk/types'; +import type { CreateOrganizationProps, OrganizationProfileProps, SignUpProps, UserProfileProps } from '@clerk/types'; import React from 'react'; import { useEnforceCorrectRoutingProps } from './hooks/useEnforceRoutingProps'; @@ -55,9 +48,9 @@ export const OrganizationProfile: typeof BaseOrganizationProfile = Object.assign { ...BaseOrganizationProfile }, ); -export const SignIn = (props: SignInProps) => { - return ; -}; +// export const SignIn = (props: SignInProps) => { +// return ; +// }; export const SignUp = (props: SignUpProps) => { return ; diff --git a/packages/nextjs/src/index.ts b/packages/nextjs/src/index.ts index 8a7e7513feb..354e8fa2695 100644 --- a/packages/nextjs/src/index.ts +++ b/packages/nextjs/src/index.ts @@ -22,7 +22,7 @@ export { OrganizationList, OrganizationProfile, OrganizationSwitcher, - SignIn, + // SignIn, SignInButton, SignInWithMetamaskButton, SignOutButton, From 17faf5f03b23399be87edc2455ffb7878cce2e77 Mon Sep 17 00:00:00 2001 From: panteliselef Date: Tue, 9 Jul 2024 18:09:49 +0300 Subject: [PATCH 09/15] fix(astro): Config deps to tests from turbo --- .../src/astro-components/interactive/index.ts | 2 +- .../astro/src/client/react/uiComponents.tsx | 21 ++++++++++--------- packages/astro/turbo.json | 3 ++- turbo.json | 2 +- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/packages/astro/src/astro-components/interactive/index.ts b/packages/astro/src/astro-components/interactive/index.ts index d24aa0edbbe..d73a17d01a7 100644 --- a/packages/astro/src/astro-components/interactive/index.ts +++ b/packages/astro/src/astro-components/interactive/index.ts @@ -1,7 +1,7 @@ // The `ts-ignore` comments here are necessary because we're importing this file inside the `astro:components` // virtual module's types, which means that `tsc` will try to resolve these imports. Don't mind the editor errors. // @ts-ignore -// export { default as SignIn } from './SignIn.astro'; +export { default as SignIn } from './SignIn.astro'; // @ts-ignore export { default as SignUp } from './SignUp.astro'; // @ts-ignore diff --git a/packages/astro/src/client/react/uiComponents.tsx b/packages/astro/src/client/react/uiComponents.tsx index 2521b25d750..3bedd626e42 100644 --- a/packages/astro/src/client/react/uiComponents.tsx +++ b/packages/astro/src/client/react/uiComponents.tsx @@ -3,6 +3,7 @@ import type { OrganizationListProps, OrganizationProfileProps, OrganizationSwitcherProps, + SignInProps, SignUpProps, UserButtonProps, UserProfileProps, @@ -87,16 +88,16 @@ class Portal extends React.PureComponent { } } -// export const SignIn = withClerk(({ clerk, ...props }: WithClerkProp) => { -// return ( -// -// ); -// }, 'SignIn'); +export const SignIn = withClerk(({ clerk, ...props }: WithClerkProp) => { + return ( + + ); +}, 'SignIn'); export const SignUp = withClerk(({ clerk, ...props }: WithClerkProp) => { return ( diff --git a/packages/astro/turbo.json b/packages/astro/turbo.json index 0ff70b39651..4fceaab0745 100644 --- a/packages/astro/turbo.json +++ b/packages/astro/turbo.json @@ -14,7 +14,8 @@ "!CHANGELOG.md", "!dist/**", "!node_modules/**" - ] + ], + "outputs": ["dist/**", "components/**"] } } } diff --git a/turbo.json b/turbo.json index 0ae0a803a53..cc7a88d2b97 100644 --- a/turbo.json +++ b/turbo.json @@ -179,7 +179,7 @@ "//#test:integration:astro": { "dependsOn": ["^@clerk/clerk-js#build", "^@clerk/backend#build", "^@clerk/astro#build"], "env": ["CLEANUP", "DEBUG", "E2E_*", "INTEGRATION_INSTANCE_KEYS"], - "inputs": ["integration/**"], + "inputs": ["integration/**", "packages/astro/dist/**", "packages/astro/components/**"], "outputLogs": "new-only" }, "//#test:integration:elements": { From 9f3ee8852d4d4c2a268dab42958bf6a8212d7a99 Mon Sep 17 00:00:00 2001 From: panteliselef Date: Tue, 9 Jul 2024 18:43:42 +0300 Subject: [PATCH 10/15] drop nextjs changes --- .../nextjs/src/client-boundary/uiComponents.tsx | 15 +++++++++++---- packages/nextjs/src/index.ts | 2 +- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/packages/nextjs/src/client-boundary/uiComponents.tsx b/packages/nextjs/src/client-boundary/uiComponents.tsx index 2771c9ec827..50599e5df8b 100644 --- a/packages/nextjs/src/client-boundary/uiComponents.tsx +++ b/packages/nextjs/src/client-boundary/uiComponents.tsx @@ -3,10 +3,17 @@ import { CreateOrganization as BaseCreateOrganization, OrganizationProfile as BaseOrganizationProfile, + SignIn as BaseSignIn, SignUp as BaseSignUp, UserProfile as BaseUserProfile, } from '@clerk/clerk-react'; -import type { CreateOrganizationProps, OrganizationProfileProps, SignUpProps, UserProfileProps } from '@clerk/types'; +import type { + CreateOrganizationProps, + OrganizationProfileProps, + SignInProps, + SignUpProps, + UserProfileProps, +} from '@clerk/types'; import React from 'react'; import { useEnforceCorrectRoutingProps } from './hooks/useEnforceRoutingProps'; @@ -48,9 +55,9 @@ export const OrganizationProfile: typeof BaseOrganizationProfile = Object.assign { ...BaseOrganizationProfile }, ); -// export const SignIn = (props: SignInProps) => { -// return ; -// }; +export const SignIn = (props: SignInProps) => { + return ; +}; export const SignUp = (props: SignUpProps) => { return ; diff --git a/packages/nextjs/src/index.ts b/packages/nextjs/src/index.ts index 354e8fa2695..8a7e7513feb 100644 --- a/packages/nextjs/src/index.ts +++ b/packages/nextjs/src/index.ts @@ -22,7 +22,7 @@ export { OrganizationList, OrganizationProfile, OrganizationSwitcher, - // SignIn, + SignIn, SignInButton, SignInWithMetamaskButton, SignOutButton, From 929e09acef0c4c97970870f4e002002cf49672bf Mon Sep 17 00:00:00 2001 From: panteliselef Date: Tue, 9 Jul 2024 18:44:43 +0300 Subject: [PATCH 11/15] drop turbo changes --- packages/astro/turbo.json | 21 --------------------- turbo.json | 2 +- 2 files changed, 1 insertion(+), 22 deletions(-) delete mode 100644 packages/astro/turbo.json diff --git a/packages/astro/turbo.json b/packages/astro/turbo.json deleted file mode 100644 index 4fceaab0745..00000000000 --- a/packages/astro/turbo.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "extends": ["//"], - "tasks": { - "build": { - "inputs": [ - "*.d.ts", - "**/package.json", - "src/**", - "tsconfig.json", - "tsup.config.ts", - "!**/__snapshots__/**", - "!coverage/**", - "!examples/**", - "!CHANGELOG.md", - "!dist/**", - "!node_modules/**" - ], - "outputs": ["dist/**", "components/**"] - } - } -} diff --git a/turbo.json b/turbo.json index cc7a88d2b97..0ae0a803a53 100644 --- a/turbo.json +++ b/turbo.json @@ -179,7 +179,7 @@ "//#test:integration:astro": { "dependsOn": ["^@clerk/clerk-js#build", "^@clerk/backend#build", "^@clerk/astro#build"], "env": ["CLEANUP", "DEBUG", "E2E_*", "INTEGRATION_INSTANCE_KEYS"], - "inputs": ["integration/**", "packages/astro/dist/**", "packages/astro/components/**"], + "inputs": ["integration/**"], "outputLogs": "new-only" }, "//#test:integration:elements": { From 35898a1cc7108d14c485b07099203f2ffe04294a Mon Sep 17 00:00:00 2001 From: panteliselef Date: Tue, 9 Jul 2024 18:55:40 +0300 Subject: [PATCH 12/15] add breaking change --- packages/astro/src/astro-components/interactive/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/astro/src/astro-components/interactive/index.ts b/packages/astro/src/astro-components/interactive/index.ts index d73a17d01a7..d24aa0edbbe 100644 --- a/packages/astro/src/astro-components/interactive/index.ts +++ b/packages/astro/src/astro-components/interactive/index.ts @@ -1,7 +1,7 @@ // The `ts-ignore` comments here are necessary because we're importing this file inside the `astro:components` // virtual module's types, which means that `tsc` will try to resolve these imports. Don't mind the editor errors. // @ts-ignore -export { default as SignIn } from './SignIn.astro'; +// export { default as SignIn } from './SignIn.astro'; // @ts-ignore export { default as SignUp } from './SignUp.astro'; // @ts-ignore From 0104929135b446d8c20ed03095bd347488b4b930 Mon Sep 17 00:00:00 2001 From: panteliselef Date: Tue, 9 Jul 2024 19:07:43 +0300 Subject: [PATCH 13/15] Revert "drop turbo changes" This reverts commit 929e09acef0c4c97970870f4e002002cf49672bf. --- packages/astro/turbo.json | 21 +++++++++++++++++++++ turbo.json | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 packages/astro/turbo.json diff --git a/packages/astro/turbo.json b/packages/astro/turbo.json new file mode 100644 index 00000000000..4fceaab0745 --- /dev/null +++ b/packages/astro/turbo.json @@ -0,0 +1,21 @@ +{ + "extends": ["//"], + "tasks": { + "build": { + "inputs": [ + "*.d.ts", + "**/package.json", + "src/**", + "tsconfig.json", + "tsup.config.ts", + "!**/__snapshots__/**", + "!coverage/**", + "!examples/**", + "!CHANGELOG.md", + "!dist/**", + "!node_modules/**" + ], + "outputs": ["dist/**", "components/**"] + } + } +} diff --git a/turbo.json b/turbo.json index 0ae0a803a53..cc7a88d2b97 100644 --- a/turbo.json +++ b/turbo.json @@ -179,7 +179,7 @@ "//#test:integration:astro": { "dependsOn": ["^@clerk/clerk-js#build", "^@clerk/backend#build", "^@clerk/astro#build"], "env": ["CLEANUP", "DEBUG", "E2E_*", "INTEGRATION_INSTANCE_KEYS"], - "inputs": ["integration/**"], + "inputs": ["integration/**", "packages/astro/dist/**", "packages/astro/components/**"], "outputLogs": "new-only" }, "//#test:integration:elements": { From bdd81c89f7ec1bcf55e4b6153abf636499bd6f9e Mon Sep 17 00:00:00 2001 From: panteliselef Date: Tue, 9 Jul 2024 22:16:19 +0300 Subject: [PATCH 14/15] Revert "Revert "drop turbo changes"" This reverts commit 0104929135b446d8c20ed03095bd347488b4b930. --- packages/astro/turbo.json | 21 --------------------- turbo.json | 2 +- 2 files changed, 1 insertion(+), 22 deletions(-) delete mode 100644 packages/astro/turbo.json diff --git a/packages/astro/turbo.json b/packages/astro/turbo.json deleted file mode 100644 index 4fceaab0745..00000000000 --- a/packages/astro/turbo.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "extends": ["//"], - "tasks": { - "build": { - "inputs": [ - "*.d.ts", - "**/package.json", - "src/**", - "tsconfig.json", - "tsup.config.ts", - "!**/__snapshots__/**", - "!coverage/**", - "!examples/**", - "!CHANGELOG.md", - "!dist/**", - "!node_modules/**" - ], - "outputs": ["dist/**", "components/**"] - } - } -} diff --git a/turbo.json b/turbo.json index cc7a88d2b97..0ae0a803a53 100644 --- a/turbo.json +++ b/turbo.json @@ -179,7 +179,7 @@ "//#test:integration:astro": { "dependsOn": ["^@clerk/clerk-js#build", "^@clerk/backend#build", "^@clerk/astro#build"], "env": ["CLEANUP", "DEBUG", "E2E_*", "INTEGRATION_INSTANCE_KEYS"], - "inputs": ["integration/**", "packages/astro/dist/**", "packages/astro/components/**"], + "inputs": ["integration/**"], "outputLogs": "new-only" }, "//#test:integration:elements": { From 343d444c9966aa0c6f9095da0ed7f8c258c41d66 Mon Sep 17 00:00:00 2001 From: panteliselef Date: Tue, 9 Jul 2024 22:16:24 +0300 Subject: [PATCH 15/15] Revert "add breaking change" This reverts commit 35898a1cc7108d14c485b07099203f2ffe04294a. --- packages/astro/src/astro-components/interactive/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/astro/src/astro-components/interactive/index.ts b/packages/astro/src/astro-components/interactive/index.ts index d24aa0edbbe..d73a17d01a7 100644 --- a/packages/astro/src/astro-components/interactive/index.ts +++ b/packages/astro/src/astro-components/interactive/index.ts @@ -1,7 +1,7 @@ // The `ts-ignore` comments here are necessary because we're importing this file inside the `astro:components` // virtual module's types, which means that `tsc` will try to resolve these imports. Don't mind the editor errors. // @ts-ignore -// export { default as SignIn } from './SignIn.astro'; +export { default as SignIn } from './SignIn.astro'; // @ts-ignore export { default as SignUp } from './SignUp.astro'; // @ts-ignore