Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BREAKING(shared): Revamp package to use subpaths #1898

Merged
merged 59 commits into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from 46 commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
234a01a
chore(shared): Smaller package.json maintenance
LekoArts Oct 12, 2023
6c209ea
chore(repo): Remove testUtils from shared pkg
LekoArts Oct 12, 2023
46c5b55
chore(shared): Update package.json more
LekoArts Oct 12, 2023
b5409e3
chore(shared): Jest cleanup
LekoArts Oct 12, 2023
ca49589
chore(shared): Move noop to root
LekoArts Oct 12, 2023
ccd4282
chore(shared): Move browser and remove duplicate inClientSide helper
LekoArts Oct 12, 2023
21ec0ef
chore(shared): Move method helpers into "underscore" file
LekoArts Oct 12, 2023
0357351
chore(shared): Move url to root
LekoArts Oct 12, 2023
707247a
chore(shared): Fix jest testRegex
LekoArts Oct 12, 2023
3e85daf
chore(shared): Tsup updates
LekoArts Oct 12, 2023
b6850a2
chore(shared): Move color into single file
LekoArts Oct 12, 2023
5d776fc
chore(shared): Move proxy to root
LekoArts Oct 12, 2023
abb5056
chore(shared): Move error stuff into error dir
LekoArts Oct 12, 2023
c53ad69
chore(shared): Move date to root
LekoArts Oct 12, 2023
6fdeaf5
chore(shared): Move keys to root
LekoArts Oct 12, 2023
30391c4
chore(shared): Move deprecated to root
LekoArts Oct 12, 2023
6477433
chore(shared): Move isomorphicAtob to root
LekoArts Oct 12, 2023
ea774b6
chore(shared): Move cookie to folder
LekoArts Oct 12, 2023
74ddfcb
chore(shared): Move workerTimers
LekoArts Oct 12, 2023
797c495
chore(shared): Move file and remove mimeTypeExtensions
LekoArts Oct 12, 2023
235e2e0
chore(shared): Move cookie and globs
LekoArts Oct 12, 2023
c678874
chore(shared): Tsup ignore test files
LekoArts Oct 12, 2023
e271a80
chore(shared): Move rest of files to root
LekoArts Oct 12, 2023
0aa5f68
chore(shared): Re-organize hooks folder
LekoArts Oct 12, 2023
54a52a6
chore(shared): Correct tsup output + exports map
LekoArts Oct 12, 2023
85489c0
chore(shared): Add minimal README
LekoArts Oct 12, 2023
5506ab8
fix(backend): Update imports
LekoArts Oct 12, 2023
7fd38a3
chore(shared): Put error into one file + add react & react/hooks subpath
LekoArts Oct 12, 2023
feb461d
fix(clerk-js): Update imports
LekoArts Oct 12, 2023
3a7b7af
fix(clerk-expo): Updat imports
LekoArts Oct 12, 2023
2ae0fa6
fix(fastify): Update imports
LekoArts Oct 12, 2023
d669ec9
fix(gatsby): Update imports
LekoArts Oct 12, 2023
1f653bd
fix(next): Update imports
LekoArts Oct 12, 2023
36fd977
fix(react): Update imports
LekoArts Oct 12, 2023
741e7c3
fix(remix): Update imports
LekoArts Oct 12, 2023
77f96e6
chore(shared): Rename and move multiDomain
LekoArts Oct 12, 2023
3e856cd
fix(sdk-node): Use new imports
LekoArts Oct 12, 2023
e7f7d4a
Merge main
LekoArts Oct 12, 2023
df79223
update lock file
LekoArts Oct 12, 2023
2fb2979
fix(clerk-js): Adjust webpack config
LekoArts Oct 13, 2023
83cfe18
chore(repo): Make TS compilation work with TS 5
LekoArts Oct 13, 2023
3f0fdf7
Merge main
LekoArts Oct 17, 2023
8734a60
fix(clerk-sdk-node): Remove incorrect type key in package.json
LekoArts Oct 17, 2023
d7d3a39
chore(backend): Fix tests
LekoArts Oct 17, 2023
e15af40
chore(shared): Provide better backwards comp
LekoArts Oct 17, 2023
bed6b72
Create wild-carrots-reply.md
LekoArts Oct 17, 2023
7855fdc
chore(clerk-js): Typo fix
LekoArts Oct 17, 2023
f6ba951
lol
LekoArts Oct 17, 2023
514b6f3
Merge branch 'main' into lekoarts/js-509-revamp-clerkshared-package
LekoArts Oct 17, 2023
552195d
chore(shared): Use "bundle: true"
LekoArts Oct 17, 2023
24538e5
Merge branch 'main' into lekoarts/js-509-revamp-clerkshared-package
LekoArts Oct 17, 2023
626b336
chore(repo): Update lock file
LekoArts Oct 17, 2023
0fbb88f
chore(shared): Move react/hooks into react
LekoArts Oct 17, 2023
7847fcd
Update wild-carrots-reply.md
LekoArts Oct 17, 2023
65d64d9
Merge branch 'main' into lekoarts/js-509-revamp-clerkshared-package
LekoArts Oct 18, 2023
f9232b3
fix(shared): Use correct entries for tsup
LekoArts Oct 18, 2023
e6bf6f8
chore(repo): Add changelog entry
LekoArts Oct 18, 2023
d093817
Merge branch 'main' into lekoarts/js-509-revamp-clerkshared-package
LekoArts Oct 18, 2023
6b4e081
chore(clerk-js): Add comment
LekoArts Oct 18, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/wild-carrots-reply.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@clerk/shared": minor
---

TODO
2 changes: 1 addition & 1 deletion packages/backend/src/api/endpoints/OrganizationApi.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { deprecated } from '@clerk/shared';
import { deprecated } from '@clerk/shared/deprecated';

import runtime from '../../runtime';
import { joinPaths } from '../../util/path';
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { deprecatedObjectProperty } from '@clerk/shared';
import { deprecatedObjectProperty } from '@clerk/shared/deprecated';

import type { CreateBackendApiOptions } from './api';
import { createBackendApiClient } from './api';
Expand Down
4 changes: 2 additions & 2 deletions packages/backend/src/runtime/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
* TODO: Support TS runtime modules
*/

// @ts-expect-error
// @ts-ignore - These are package subpaths
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When running the tests, this threw an error because for the tsconfig.test.json this didn't seem to fail. It's one of the quirks about our tsconfig setup so let's disregard it for this PR

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to update the tests in backend package to build with tsup instead of tsc and tsconfig.test.json. (that change is not part of the current PR)

import crypto from '#crypto';
// @ts-expect-error
// @ts-ignore - These are package subpaths
import * as fetchApisPolyfill from '#fetch';

const {
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/tokens/authObjects.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { deprecated } from '@clerk/shared';
import { deprecated } from '@clerk/shared/deprecated';
import type { ActClaim, JwtPayload, ServerGetToken, ServerGetTokenOptions } from '@clerk/types';

import type { Organization, Session, User } from '../api';
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/tokens/jwt/verifyJwt.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { deprecatedObjectProperty } from '@clerk/shared';
import { deprecatedObjectProperty } from '@clerk/shared/deprecated';
import type { Jwt, JwtPayload } from '@clerk/types';

// DO NOT CHANGE: Runtime needs to be imported as a default export so that we can stub its dependencies with Sinon.js
Expand Down
5 changes: 2 additions & 3 deletions packages/backend/src/util/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ export {
isDevelopmentFromApiKey,
isProductionFromApiKey,
parsePublishableKey,
deprecated,
deprecatedProperty,
} from '@clerk/shared';
export { deprecated, deprecatedProperty } from '@clerk/shared/deprecated';

import { buildErrorThrower } from '@clerk/shared';
import { buildErrorThrower } from '@clerk/shared/error';
// TODO: replace packageName with `${PACKAGE_NAME}@${PACKAGE_VERSION}` from tsup.config.ts
export const errorThrower = buildErrorThrower({ packageName: '@clerk/backend' });

Expand Down
4 changes: 3 additions & 1 deletion packages/backend/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"baseUrl": ".",
"rootDir": "src",
"declaration": true,
"declarationMap": false,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"importHelpers": true,
"moduleResolution": "node",
"moduleResolution": "NodeNext",
"module": "NodeNext",
"noImplicitReturns": true,
"noUnusedLocals": false,
"noUnusedParameters": true,
Expand Down
4 changes: 2 additions & 2 deletions packages/backend/tsconfig.test.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"emitDeclarationOnly": false,
"module": "ES2022",
"moduleResolution": "Node",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"noImplicitAny": false,
"outDir": "./tests/dist",
"target": "ES2020"
Expand Down
2 changes: 1 addition & 1 deletion packages/clerk-js/src/core/clerk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
addClerkPrefix,
deprecated,
handleValueOrFn,
inClientSide,
inBrowser as inClientSide,
is4xxError,
isHttpOrHttps,
isLegacyFrontendApiKey,
Expand Down
2 changes: 1 addition & 1 deletion packages/clerk-js/src/core/resources/Base.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { isValidBrowserOnline } from '@clerk/shared';
import { isValidBrowserOnline } from '@clerk/shared/browser';
import type { ClerkAPIErrorJSON, ClerkResourceJSON, ClerkResourceReloadParams, DeletedObjectJSON } from '@clerk/types';

import { clerkMissingFapiClientInResources } from '../errors';
Expand Down
2 changes: 1 addition & 1 deletion packages/clerk-js/src/core/resources/DisplayConfig.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { deprecatedProperty } from '@clerk/shared';
import { deprecatedProperty } from '@clerk/shared/deprecated';
import type { DisplayConfigJSON, DisplayConfigResource, DisplayThemeJSON, PreferredSignInStrategy } from '@clerk/types';

import { BaseResource } from './internal';
Expand Down
3 changes: 2 additions & 1 deletion packages/clerk-js/src/core/resources/EmailAddress.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { deprecated, Poller } from '@clerk/shared';
import { deprecated } from '@clerk/shared/deprecated';
import { Poller } from '@clerk/shared/poller';
import type {
AttemptEmailAddressVerificationParams,
CreateEmailLinkFlowReturn,
Expand Down
4 changes: 2 additions & 2 deletions packages/clerk-js/src/core/resources/Error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ export {
MagicLinkErrorCode,
parseError,
parseErrors,
} from '@clerk/shared';
export type { MetamaskError } from '@clerk/shared';
} from '@clerk/shared/error';
export type { MetamaskError } from '@clerk/shared/error';
2 changes: 1 addition & 1 deletion packages/clerk-js/src/core/resources/Organization.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { deprecated, deprecatedProperty } from '@clerk/shared';
import { deprecated, deprecatedProperty } from '@clerk/shared/deprecated';
import type {
AddMemberParams,
ClerkPaginatedResponse,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { deprecated } from '@clerk/shared';
import { deprecated } from '@clerk/shared/deprecated';
import type {
ClerkPaginatedResponse,
ClerkResourceReloadParams,
Expand Down
2 changes: 1 addition & 1 deletion packages/clerk-js/src/core/resources/PublicUserData.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { deprecatedProperty } from '@clerk/shared';
import { deprecatedProperty } from '@clerk/shared/deprecated';
import type { PublicUserData as IPublicUserData } from '@clerk/types';
import type { PublicUserDataJSON } from '@clerk/types';

Expand Down
4 changes: 3 additions & 1 deletion packages/clerk-js/src/core/resources/Session.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { is4xxError } from '@clerk/shared';
import { runWithExponentialBackOff } from '@clerk/shared';
import { is4xxError } from '@clerk/shared/error';
import type {
ActJWTClaim,
GetToken,
Expand Down Expand Up @@ -70,6 +70,8 @@ export class Session extends BaseResource implements SessionResource {
return SessionTokenCache.clear();
};

// TODO: Fix this eslint error
// eslint-disable-next-line @typescript-eslint/require-await
getToken: GetToken = async (options?: GetTokenOptions): Promise<string | null> => {
return runWithExponentialBackOff(() => this._getToken(options), {
shouldRetry: (error: unknown, currentIteration: number) => !is4xxError(error) && currentIteration < 4,
Expand Down
3 changes: 1 addition & 2 deletions packages/clerk-js/src/core/resources/User.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { deprecated } from '@clerk/shared';
import { deprecatedProperty } from '@clerk/shared';
import { deprecated, deprecatedProperty } from '@clerk/shared/deprecated';
import type {
BackupCodeJSON,
BackupCodeResource,
Expand Down
2 changes: 1 addition & 1 deletion packages/clerk-js/src/core/resources/UserData.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { deprecatedProperty } from '@clerk/shared';
import { deprecatedProperty } from '@clerk/shared/deprecated';
import type { UserData as IUserData } from '@clerk/types';
import type { UserDataJSON } from '@clerk/types';

Expand Down
2 changes: 1 addition & 1 deletion packages/clerk-js/src/core/resources/Web3Wallet.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { deprecated } from '@clerk/shared';
import { deprecated } from '@clerk/shared/deprecated';
import type {
AttemptWeb3WalletVerificationParams,
PrepareWeb3WalletVerificationParams,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import { isClerkAPIResponseError } from '@clerk/shared';
import { isNetworkError } from '@clerk/shared';
import { is4xxError } from '@clerk/shared';
import { is4xxError, isClerkAPIResponseError, isNetworkError } from '@clerk/shared/error';
import type { Clerk, EnvironmentResource, SessionResource, TokenResource } from '@clerk/types';

import type { CookieHandler } from '../../../utils';
Expand Down
3 changes: 2 additions & 1 deletion packages/clerk-js/src/ui/Components.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { createDeferredPromise, useSafeLayoutEffect } from '@clerk/shared';
import { createDeferredPromise } from '@clerk/shared';
import { useSafeLayoutEffect } from '@clerk/shared/react/hooks';
import type {
Appearance,
Clerk,
Expand Down
2 changes: 1 addition & 1 deletion packages/clerk-js/src/ui/common/EmailLinkVerify.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { EmailLinkErrorCode, isEmailLinkError } from '@clerk/shared';
import { EmailLinkErrorCode, isEmailLinkError } from '@clerk/shared/error';
import React from 'react';

import type { VerificationStatus } from '../../utils/getClerkQueryParam';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ClerkAPIResponseError } from '@clerk/shared';
import { ClerkAPIResponseError } from '@clerk/shared/error';

import { isVerificationExpiredError, VerificationErrorMessage, verificationErrorMessage } from '../verification';

Expand Down
2 changes: 1 addition & 1 deletion packages/clerk-js/src/ui/common/constants.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { deprecated } from '@clerk/shared';
import { deprecated } from '@clerk/shared/deprecated';
import type { Attribute, Web3Provider } from '@clerk/types';

import type { LocalizationKey } from '../localization/localizationKeys';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { isClerkAPIResponseError } from '@clerk/shared';
import { isClerkAPIResponseError } from '@clerk/shared/error';
import type { ClerkAPIError, MembershipRole, OrganizationResource } from '@clerk/types';
import React from 'react';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { deprecatedObjectProperty } from '@clerk/shared';
import { deprecatedObjectProperty } from '@clerk/shared/deprecated';
import type { ActiveSessionResource, UserButtonProps, UserResource } from '@clerk/types';

import { windowNavigate } from '../../../utils/windowNavigate';
Expand Down Expand Up @@ -64,6 +64,8 @@ export const useMultisessionActions = (opts: UseMultisessionActionsParams) => {
return signOut(opts.navigateAfterSignOut);
};

// TODO: Fix this eslint error
// eslint-disable-next-line @typescript-eslint/require-await
const handleSessionClicked = (session: ActiveSessionResource) => async () => {
card.setLoading();
return setActive({ session, beforeEmit: opts.navigateAfterSwitchSession }).finally(() => {
Expand Down
2 changes: 1 addition & 1 deletion packages/clerk-js/src/ui/contexts/CoreClerkContext.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { ClerkInstanceContext, useClerkInstanceContext } from '@clerk/shared';
import { ClerkInstanceContext, useClerkInstanceContext } from '@clerk/shared/react';

export const [CoreClerkContext, useCoreClerk] = [ClerkInstanceContext, useClerkInstanceContext];
3 changes: 2 additions & 1 deletion packages/clerk-js/src/ui/contexts/CoreClientContext.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { assertContextExists, ClientContext, useClientContext } from '@clerk/shared';
import { ClientContext, useClientContext } from '@clerk/shared/react';
import { assertContextExists } from '@clerk/shared/react/hooks';
import type { SessionResource, SignInResource, SignUpResource } from '@clerk/types';

export const CoreClientContext = ClientContext;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { OrganizationProvider, useOrganization, useOrganizationList, useOrganizations } from '@clerk/shared';
import { OrganizationProvider } from '@clerk/shared/react';
import { useOrganization, useOrganizationList, useOrganizations } from '@clerk/shared/react/hooks';

export const CoreOrganizationProvider = OrganizationProvider;
export const useCoreOrganization = useOrganization;
Expand Down
3 changes: 2 additions & 1 deletion packages/clerk-js/src/ui/contexts/CoreSessionContext.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { assertContextExists, SessionContext, useSessionContext } from '@clerk/shared';
import { SessionContext, useSessionContext } from '@clerk/shared/react';
import { assertContextExists } from '@clerk/shared/react/hooks';
import type { SessionResource } from '@clerk/types';
import React from 'react';

Expand Down
3 changes: 2 additions & 1 deletion packages/clerk-js/src/ui/contexts/CoreUserContext.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { assertContextExists, UserContext, useUserContext } from '@clerk/shared';
import { UserContext, useUserContext } from '@clerk/shared/react';
import { assertContextExists } from '@clerk/shared/react/hooks';
import React, { useContext } from 'react';

import { clerkCoreErrorUserIsNotDefined } from '../../core/errors';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createContextAndHook } from '@clerk/shared';
import { createContextAndHook } from '@clerk/shared/react/hooks';
import React from 'react';

import { useDeepEqualMemo } from '../hooks';
Expand Down
2 changes: 1 addition & 1 deletion packages/clerk-js/src/ui/elements/Form.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createContextAndHook } from '@clerk/shared';
import { createContextAndHook } from '@clerk/shared/react/hooks';
import type { FieldId } from '@clerk/types';
import React, { useState } from 'react';

Expand Down
2 changes: 1 addition & 1 deletion packages/clerk-js/src/ui/elements/Menu.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createContextAndHook } from '@clerk/shared';
import { createContextAndHook } from '@clerk/shared/react/hooks';
import type { MenuId } from '@clerk/types';
import type { PropsWithChildren } from 'react';
import React, { cloneElement, isValidElement, useLayoutEffect, useRef } from 'react';
Expand Down
2 changes: 1 addition & 1 deletion packages/clerk-js/src/ui/elements/Modal.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createContextAndHook, useSafeLayoutEffect } from '@clerk/shared';
import { createContextAndHook, useSafeLayoutEffect } from '@clerk/shared/react/hooks';
import React, { useRef } from 'react';

import { descriptors, Flex } from '../customizables';
Expand Down
2 changes: 1 addition & 1 deletion packages/clerk-js/src/ui/elements/Navbar.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createContextAndHook, useSafeLayoutEffect } from '@clerk/shared';
import { createContextAndHook, useSafeLayoutEffect } from '@clerk/shared/react/hooks';
import type { NavbarItemId } from '@clerk/types';
import React, { useEffect } from 'react';

Expand Down
2 changes: 1 addition & 1 deletion packages/clerk-js/src/ui/elements/Select.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createContextAndHook } from '@clerk/shared';
import { createContextAndHook } from '@clerk/shared/react/hooks';
import type { SelectId } from '@clerk/types';
import type { PropsWithChildren, ReactElement } from 'react';
import React, { useState } from 'react';
Expand Down
2 changes: 1 addition & 1 deletion packages/clerk-js/src/ui/elements/Tabs.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createContextAndHook } from '@clerk/shared';
import { createContextAndHook } from '@clerk/shared/react/hooks';
import type { PropsWithChildren } from 'react';
import React from 'react';

Expand Down
2 changes: 1 addition & 1 deletion packages/clerk-js/src/ui/elements/TimerButton.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useSafeLayoutEffect } from '@clerk/shared';
import { useSafeLayoutEffect } from '@clerk/shared/react/hooks';
import React, { useEffect } from 'react';

import { Button, useLocalizations } from '../customizables';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createContextAndHook } from '@clerk/shared';
import { createContextAndHook } from '@clerk/shared/react/hooks';
import type { ClerkAPIError, ClerkRuntimeError } from '@clerk/types';
import React from 'react';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createContextAndHook } from '@clerk/shared';
import { createContextAndHook } from '@clerk/shared/react/hooks';
import React from 'react';

type FlowMetadata = {
Expand Down
2 changes: 1 addition & 1 deletion packages/clerk-js/src/ui/localization/makeLocalizable.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { isClerkRuntimeError } from '@clerk/shared';
import { isClerkRuntimeError } from '@clerk/shared/error';
import type { ClerkAPIError, ClerkRuntimeError, LocalizationResource } from '@clerk/types';
import React from 'react';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createContextAndHook } from '@clerk/shared';
import { createContextAndHook } from '@clerk/shared/react/hooks';
import type { ClerkAPIError } from '@clerk/types';
import React from 'react';

Expand Down
2 changes: 1 addition & 1 deletion packages/clerk-js/src/ui/styledSystem/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type StyleRule = Exclude<_Interpolation<InternalTheme>, string | number | boolea
type ThemableCssProp = ((params: InternalTheme) => StyleRule) | StyleRule;
type CssProp = { css?: ThemableCssProp };

export type AsProp = { as?: React.ElementType };
export type AsProp = { as?: React.ElementType | undefined };

type ElementProps = {
div: React.JSX.IntrinsicElements['div'];
Expand Down
2 changes: 1 addition & 1 deletion packages/clerk-js/src/utils/captcha.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { loadScript } from '@clerk/shared';
import { loadScript } from '@clerk/shared/loadScript';

import { clerkFailedToLoadThirdPartyScript } from '../core/errors';

Expand Down
2 changes: 1 addition & 1 deletion packages/clerk-js/src/utils/cookies/client.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createCookieHandler } from '@clerk/shared';
import { createCookieHandler } from '@clerk/shared/cookie';

const CLIENT_COOKIE_NAME = '__client';

Expand Down
2 changes: 1 addition & 1 deletion packages/clerk-js/src/utils/cookies/client_uat.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createCookieHandler } from '@clerk/shared';
import { createCookieHandler } from '@clerk/shared/cookie';

const CLIENT_UAT_COOKIE_NAME = '__client_uat';

Expand Down
2 changes: 1 addition & 1 deletion packages/clerk-js/src/utils/cookies/devBrowser.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createCookieHandler } from '@clerk/shared';
import { createCookieHandler } from '@clerk/shared/cookie';

import { DEV_BROWSER_JWT_MARKER } from '../devBrowser';

Expand Down
2 changes: 1 addition & 1 deletion packages/clerk-js/src/utils/cookies/initted.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createCookieHandler } from '@clerk/shared';
import { createCookieHandler } from '@clerk/shared/cookie';

const INITTED_COOKIE_NAME = '__initted';

Expand Down
2 changes: 1 addition & 1 deletion packages/clerk-js/src/utils/cookies/session.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createCookieHandler } from '@clerk/shared';
import { createCookieHandler } from '@clerk/shared/cookie';

const SESSION_COOKIE_NAME = '__session';

Expand Down
2 changes: 1 addition & 1 deletion packages/clerk-js/src/utils/errorThrower.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { buildErrorThrower } from '@clerk/shared';
import { buildErrorThrower } from '@clerk/shared/error';

const errorThrower = buildErrorThrower({ packageName: __PKG_NAME__ });

Expand Down
2 changes: 1 addition & 1 deletion packages/clerk-js/src/utils/image.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { isomorphicAtob } from '@clerk/shared';
import { isomorphicAtob } from '@clerk/shared/isomorphicAtob';

/**
* @private
Expand Down
2 changes: 1 addition & 1 deletion packages/clerk-js/src/utils/jwt.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { deprecatedObjectProperty } from '@clerk/shared';
import { deprecatedObjectProperty } from '@clerk/shared/deprecated';
import type { JWT, JWTClaims } from '@clerk/types';

import { urlDecodeB64 } from './encoders';
Expand Down
Loading
Loading