Skip to content

Commit

Permalink
fix(clerk-js, clerk-react,gatsby-clerk-plugin): Cleanup subpath impor…
Browse files Browse the repository at this point in the history
…ts (#1804)

* fix(clerk-js,clerk-react): Replace `@clerk/types/src` subpath import with top level

* fix(gatsby-plugin-clerk): Replace IsomorphicClerkOptions subpath import with top level
  • Loading branch information
dimkl committed Oct 2, 2023
1 parent bec6dc7 commit e592565
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 7 deletions.
7 changes: 7 additions & 0 deletions .changeset/strange-lamps-knock.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'gatsby-plugin-clerk': patch
'@clerk/clerk-js': patch
'@clerk/clerk-react': patch
---

Fix internal subpath imports by replacing them with top level imports.
2 changes: 1 addition & 1 deletion packages/clerk-js/src/ui/common/SSOCallback.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { HandleOAuthCallbackParams, HandleSamlCallbackParams } from '@clerk/types/src';
import type { HandleOAuthCallbackParams, HandleSamlCallbackParams } from '@clerk/types';
import React from 'react';

import { useCoreClerk } from '../contexts';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { OAuthProvider, OAuthScope, OAuthStrategy } from '@clerk/types';
import type { ExternalAccountResource } from '@clerk/types/src';
import type { ExternalAccountResource } from '@clerk/types';

import { useRouter } from '../../../ui/router';
import { appendModalState } from '../../../utils';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { SamlAccountResource } from '@clerk/types/src';
import type { SamlAccountResource } from '@clerk/types';

import { useRouter } from '../../../ui/router';
import { useCoreUser } from '../../contexts';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { OAuthProvider, OAuthStrategy, Web3Provider, Web3Strategy } from '@clerk/types';
// TODO: This import shouldn't be part of @clerk/types
import { OAUTH_PROVIDERS, WEB3_PROVIDERS } from '@clerk/types/src';
import { OAUTH_PROVIDERS, WEB3_PROVIDERS } from '@clerk/types';

import { iconImageUrl } from '../common/constants';
import { useEnvironment } from '../contexts/EnvironmentContext';
Expand Down
2 changes: 1 addition & 1 deletion packages/clerk-js/src/ui/utils/test/fixtureHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import type {
UserJSON,
UserSettingsJSON,
} from '@clerk/types';
import type { MembershipRole, PublicUserDataJSON } from '@clerk/types/src';
import type { MembershipRole, PublicUserDataJSON } from '@clerk/types';

import { createUser, getOrganizationId } from '../../../core/test/fixtures';
import { createUserFixture } from './fixtures';
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby-plugin-clerk/src/GatsbyClerkProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import type { IsomorphicClerkOptions } from '@clerk/clerk-react';
import {
__internal__setErrorThrowerOptions,
ClerkLoaded,
ClerkProvider as ReactClerkProvider,
} from '@clerk/clerk-react';
import type { IsomorphicClerkOptions } from '@clerk/clerk-react/dist/types';
import { navigate } from 'gatsby';
import React from 'react';

Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/isomorphicClerk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import type {
UserProfileProps,
UserResource,
} from '@clerk/types';
import type { OrganizationProfileProps, OrganizationSwitcherProps } from '@clerk/types/src';
import type { OrganizationProfileProps, OrganizationSwitcherProps } from '@clerk/types';

import { unsupportedNonBrowserDomainOrProxyUrlFunction } from './errors';
import type {
Expand Down

0 comments on commit e592565

Please sign in to comment.