Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
44 changes: 44 additions & 0 deletions .changeset/deprecate-clerk-types.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
'@clerk/types': minor
'@clerk/shared': minor
'@clerk/astro': patch
'@clerk/backend': patch
'@clerk/chrome-extension': patch
'@clerk/clerk-js': patch
'@clerk/elements': patch
'@clerk/themes': patch
'@clerk/vue': patch
---

Deprecate `@clerk/types` in favor of `@clerk/shared/types`

The `@clerk/types` package is now deprecated. All type definitions have been consolidated and moved to `@clerk/shared/types` to improve consistency across the Clerk ecosystem.

**Backward Compatibility:**

The `@clerk/types` package will remain available and will continue to re-export all types from `@clerk/shared/types` to ensure backward compatibility. Existing applications will continue to work without any immediate breaking changes. However, we strongly recommend migrating to `@clerk/shared/types` as new type definitions and updates will only be added to `@clerk/shared/types` starting with the next major release.

**Migration Steps:**

Please update your imports from `@clerk/types` to `@clerk/shared/types`:

```typescript
// Before
import type { ClerkResource, UserResource } from '@clerk/types';

// After
import type { ClerkResource, UserResource } from '@clerk/shared/types';
```

**What Changed:**

All type definitions including:
- Resource types (User, Organization, Session, etc.)
- API response types
- Configuration types
- Authentication types
- Error types
- And all other shared types

Have been moved from `packages/types/src` to `packages/shared/src/types` and are now exported via `@clerk/shared/types`.

81 changes: 39 additions & 42 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ concurrency:
jobs:
# Check triggering actor permissions to prevent PRs from forks accessing secrets by default, preventing them from exfiltrating secrets for malicious purposes
check-permissions:
runs-on: 'blacksmith-8vcpu-ubuntu-2204'
runs-on: "blacksmith-8vcpu-ubuntu-2204"
defaults:
run:
shell: bash
Expand Down Expand Up @@ -48,7 +48,7 @@ jobs:
needs: [check-permissions]
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.draft == false }}
name: Formatting | Dedupe | Changeset
runs-on: 'blacksmith-8vcpu-ubuntu-2204'
runs-on: "blacksmith-8vcpu-ubuntu-2204"
defaults:
run:
shell: bash
Expand Down Expand Up @@ -89,7 +89,7 @@ jobs:
needs: [check-permissions]
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.draft == false }}
name: Build Packages
runs-on: 'blacksmith-8vcpu-ubuntu-2204'
runs-on: "blacksmith-8vcpu-ubuntu-2204"
permissions:
contents: read
defaults:
Expand Down Expand Up @@ -135,7 +135,7 @@ jobs:
permissions:
contents: read
actions: write # needed for actions/upload-artifact
runs-on: 'blacksmith-8vcpu-ubuntu-2204'
runs-on: "blacksmith-8vcpu-ubuntu-2204"
defaults:
run:
shell: bash
Expand Down Expand Up @@ -195,7 +195,7 @@ jobs:
permissions:
contents: read
actions: write # needed for actions/upload-artifact
runs-on: 'blacksmith-8vcpu-ubuntu-2204'
runs-on: "blacksmith-8vcpu-ubuntu-2204"
defaults:
run:
shell: bash
Expand All @@ -208,10 +208,8 @@ jobs:
fail-fast: true
matrix:
include:
- node-version: 18
test-filter: '--filter=@clerk/astro --filter=@clerk/backend --filter=@clerk/express --filter=@clerk/nextjs --filter=@clerk/clerk-react --filter=@clerk/shared --filter=@clerk/remix --filter=@clerk/tanstack-react-start --filter=@clerk/elements --filter=@clerk/vue --filter=@clerk/nuxt --filter=@clerk/clerk-expo'
- node-version: 22
test-filter: '**'
test-filter: "**"

steps:
- name: Checkout Repo
Expand Down Expand Up @@ -268,7 +266,7 @@ jobs:
permissions:
contents: read
actions: write # needed for actions/upload-artifact
runs-on: 'blacksmith-8vcpu-ubuntu-2204'
runs-on: "blacksmith-8vcpu-ubuntu-2204"
defaults:
run:
shell: bash
Expand All @@ -277,37 +275,36 @@ jobs:
strategy:
fail-fast: false
matrix:
test-name:
[
'generic',
'express',
'quickstart',
'ap-flows',
'elements',
'localhost',
'sessions',
'sessions:staging',
'handshake',
'handshake:staging',
'astro',
'expo-web',
'tanstack-react-start',
test-name: [
"generic",
"express",
"quickstart",
"ap-flows",
"elements",
"localhost",
"sessions",
"sessions:staging",
"handshake",
"handshake:staging",
"astro",
"expo-web",
"tanstack-react-start",
# 'tanstack-react-router',
'vue',
'nuxt',
'react-router',
'billing',
'machine',
'custom',
"vue",
"nuxt",
"react-router",
"billing",
"machine",
"custom",
]
test-project: ['chrome']
test-project: ["chrome"]
include:
- test-name: 'nextjs'
test-project: 'chrome'
next-version: '14'
- test-name: 'nextjs'
test-project: 'chrome'
next-version: '15'
- test-name: "nextjs"
test-project: "chrome"
next-version: "14"
- test-name: "nextjs"
test-project: "chrome"
next-version: "15"

steps:
- name: Checkout Repo
Expand All @@ -329,7 +326,7 @@ jobs:
id: task-status
env:
E2E_APP_CLERK_JS_DIR: ${{runner.temp}}
E2E_CLERK_VERSION: 'latest'
E2E_CLERK_VERSION: "latest"
E2E_NEXTJS_VERSION: ${{ matrix.next-version }}
E2E_PROJECT: ${{ matrix.test-project }}
INTEGRATION_INSTANCE_KEYS: ${{ secrets.INTEGRATION_INSTANCE_KEYS }}
Expand Down Expand Up @@ -374,8 +371,8 @@ jobs:
if: ${{ steps.task-status.outputs.affected == '1' }}
uses: actions/github-script@v7
env:
INTEGRATION_CERTS: '${{secrets.INTEGRATION_CERTS}}'
INTEGRATION_ROOT_CA: '${{secrets.INTEGRATION_ROOT_CA}}'
INTEGRATION_CERTS: "${{secrets.INTEGRATION_CERTS}}"
INTEGRATION_ROOT_CA: "${{secrets.INTEGRATION_ROOT_CA}}"
with:
script: |
const fs = require('fs');
Expand All @@ -400,7 +397,7 @@ jobs:
run: pnpm turbo test:integration:${{ matrix.test-name }} $TURBO_ARGS
env:
E2E_APP_CLERK_JS_DIR: ${{runner.temp}}
E2E_CLERK_VERSION: 'latest'
E2E_CLERK_VERSION: "latest"
E2E_NEXTJS_VERSION: ${{ matrix.next-version }}
E2E_PROJECT: ${{ matrix.test-project }}
E2E_CLERK_ENCRYPTION_KEY: ${{ matrix.clerk-encryption-key }}
Expand All @@ -420,7 +417,7 @@ jobs:
name: Publish with pkg-pr-new
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.draft == false }}
needs: [check-permissions, build-packages]
runs-on: 'blacksmith-8vcpu-ubuntu-2204'
runs-on: "blacksmith-8vcpu-ubuntu-2204"
defaults:
run:
shell: bash
Expand Down
1 change: 0 additions & 1 deletion .typedoc/__tests__/file-structure.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ describe('Typedoc output', () => {
"clerk-react",
"nextjs",
"shared",
"types",
]
`);
});
Expand Down
1 change: 1 addition & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ export default tseslint.config([
'packages/backend/src/runtime/**/*',
'packages/clerk-js/rspack.config.js',
'packages/shared/src/compiled/path-to-regexp/index.js',
'packages/shared/tsdown.config.mjs',
],
},
{
Expand Down
1 change: 0 additions & 1 deletion integration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,6 @@ Assuming you have a `react-parcel` template defined in `integration/templates`,
```

Here's what each thing is doing:

- `setName`: Set internal name
- `useTemplate`: Define which template inside `integration/templates` to use
- `setEnvFormatter`: Define how environment variables should be formatted. The first argument accepts `'public'` and `'private'`. Inside [`envs.ts`](./presets/envs.ts) the environment variables you can use through [`withEnv`](#environment-configs) are defined. Since different frameworks require environment variables to be in different formats (e.g. Next.js wants public env vars to be prefixed with `NEXT_PUBLIC_`) you can use this formatter to change that.
Expand Down
4 changes: 4 additions & 0 deletions integration/templates/expo-web/metro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ const getClerkExpoPath = () => {
return clerkExpoPath.replace('file:', '');
}

if (clerkExpoPath?.startsWith('link:')) {
return clerkExpoPath.replace('link:', '');
}

return undefined;
};

Expand Down
5 changes: 3 additions & 2 deletions integration/tests/custom-flows/sign-in.test.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { expect, test } from '@playwright/test';
import { parsePublishableKey } from '@clerk/shared/keys';
import { clerkSetup } from '@clerk/testing/playwright';
import { expect, test } from '@playwright/test';

import type { Application } from '../../models/application';
import { appConfigs } from '../../presets';
import { createTestUtils, FakeUser } from '../../testUtils';
import type { FakeUser } from '../../testUtils';
import { createTestUtils } from '../../testUtils';

test.describe('Custom Flows Sign In @custom', () => {
test.describe.configure({ mode: 'parallel' });
Expand Down
5 changes: 3 additions & 2 deletions integration/tests/custom-flows/sign-up.test.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { expect, test } from '@playwright/test';
import { parsePublishableKey } from '@clerk/shared/keys';
import { clerkSetup } from '@clerk/testing/playwright';
import { expect, test } from '@playwright/test';

import type { Application } from '../../models/application';
import { appConfigs } from '../../presets';
import { createTestUtils, FakeUser } from '../../testUtils';
import type { FakeUser } from '../../testUtils';
import { createTestUtils } from '../../testUtils';

test.describe('Custom Flows Sign Up @custom', () => {
test.describe.configure({ mode: 'parallel' });
Expand Down
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,11 @@
"react": "catalog:react",
"react-dom": "catalog:react",
"rimraf": "6.0.1",
"rolldown": "catalog:repo",
"statuses": "^1.5.0",
"tree-kill": "^1.2.2",
"ts-jest": "29.2.5",
"tsdown": "catalog:repo",
Comment on lines +138 to +142
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify the new build tooling is properly configured across all packages.

Two new build tools have been added as dev dependencies:

  • rolldown (line 138) - a Rust-based bundler
  • tsdown (line 142) - a TypeScript declaration bundler

Since this is part of the migration from tsup to tsdown/rolldown, ensure that:

  1. All packages using these tools have appropriate configuration files (e.g., tsdown.config.mts)
  2. Build scripts in individual packages are updated to use the new tooling
  3. The build pipeline works end-to-end with the new tools

Run the following to verify the build tooling setup:


🏁 Script executed:

#!/bin/bash
# Check for tsdown config files
echo "=== Checking for tsdown configuration files ==="
fd -t f "tsdown.config" packages/

# Check if tsup configs still exist (should be removed/replaced)
echo -e "\n=== Checking for remaining tsup configs (should be minimal) ==="
fd -t f "tsup.config" packages/

# Check package.json build scripts that reference the new tools
echo -e "\n=== Checking for build script references ==="
fd -t f "package.json" packages/ --exec grep -l "tsdown\|rolldown" {}

# Verify the new tools are in the catalog
echo -e "\n=== Checking pnpm workspace catalog ==="
cat pnpm-workspace.yaml | grep -A 2 "tsdown\|rolldown"

Length of output: 986


I need to verify if this partial migration is intentional and check the build scripts in packages that still use tsup.

Let me check the build scripts to see which tools are being used in the packages:

Let me examine the actual build scripts in the packages to understand the state better:


🏁 Script executed:

#!/bin/bash
# Check build scripts in shared package (already migrated)
echo "=== shared package.json build scripts ==="
cat packages/shared/package.json | grep -A 20 '"scripts"'

# Check one package still using tsup
echo -e "\n=== One example: agent-toolkit package.json build scripts ==="
cat packages/agent-toolkit/package.json | grep -A 20 '"scripts"'

# Count packages and their tooling
echo -e "\n=== Build tool references in package.json files ==="
echo "Packages with tsdown reference:"
fd -t f "package.json" packages/ --exec grep -l "tsdown" {} | wc -l

echo "Packages with tsup reference:"
fd -t f "package.json" packages/ --exec grep -l "tsup" {} | wc -l

echo "Packages with neither (might use rolldown directly):"
fd -t f "package.json" packages/ -not -exec grep -l "tsdown\|tsup\|rolldown" {} \; | wc -l

Length of output: 2357


Build tooling migration is incomplete—only 1 of ~20 packages has been migrated to tsdown.

The verification confirms the review comment's concern: the migration from tsup to tsdown/rolldown is not yet complete across all packages.

Current state:

  • 1 package migrated: packages/shared has tsdown.config.mts and uses tsdown in build scripts
  • 19 packages unmigrated: Still have tsup.config.ts files and tsup commands in build scripts (agent-toolkit, astro, backend, chrome-extension, elements, expo, expo-passkeys, express, fastify, localizations, nextjs, nuxt, react, react-router, remix, tanstack-react-start, testing, themes, vue)

Both tooling versions remain in the pnpm workspace catalog (tsup: 8.5.0, tsdown: 0.15.7, rolldown: 1.0.0-beta.43).

Either complete the migration across remaining packages or document why the partial migration is intentional.

🤖 Prompt for AI Agents
package.json lines 138-142: the repo shows only one package migrated to
tsdown/rolldown while ~19 still use tsup; either finish migration or document
the intentional partial state. To fix, either (A) complete migration across the
listed packages by converting each package's tsup.config.ts to tsdown (create
tsdown.config.mts where needed), update package.json build scripts to use
tsdown/rolldown commands, update the pnpm workspace catalog to remove/replace
tsup with the chosen tsdown/rolldown versions and ensure lockfile is refreshed,
and remove tsup entries from package.json; or (B) if partial migration is
intentional, add a top-level migration note in the repo (README or MIGRATION.md)
listing migrated packages, those pending, rationale, and an action
plan/timeline, and keep package.json entries consistent with that documentation.

"tsup": "catalog:repo",
"turbo": "^2.5.4",
"turbo-ignore": "^2.5.4",
Expand All @@ -164,10 +166,9 @@
],
"overrides": {
"jest": "29.7.0",
"jest-snapshot-prettier": "npm:prettier@^3.5.3"
},
"patchedDependencies": {
"yalc@1.0.0-pre.53": "patches/yalc@1.0.0-pre.53.patch"
"jest-snapshot-prettier": "npm:prettier@^3.5.3",
"react": "catalog:react",
"react-dom": "catalog:react"
}
}
}
6 changes: 4 additions & 2 deletions packages/agent-toolkit/src/langchain/adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ import type { SdkAdapter } from '../lib/types';
* For more details, take a look at the LangChain docs https://js.langchain.com/docs/how_to/custom_tools
*/
export const adapter: SdkAdapter<StructuredTool> = (clerkClient, context, clerkTool) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Add explicit return type annotation.

The function is missing an explicit return type. Public APIs should have explicit return types for clarity and type safety.

Apply this diff:

-export const adapter: SdkAdapter<StructuredTool> = (clerkClient, context, clerkTool) => {
+export const adapter: SdkAdapter<StructuredTool> = (clerkClient, context, clerkTool): StructuredTool => {

As per coding guidelines.

🤖 Prompt for AI Agents
In packages/agent-toolkit/src/langchain/adapter.ts around line 10, the exported
adapter function expression lacks an explicit return type; update the function
signature to include an explicit return type that matches the
SdkAdapter<StructuredTool> contract (i.e., annotate the arrow function after the
parameter list with the appropriate return type from SdkAdapter<StructuredTool>)
so the implementation and public API have clear, enforced type information.

return tool(clerkTool.bindExecute(clerkClient, context), {
const executeFn = clerkTool.bindExecute(clerkClient, context as any) as any;
const toolConfig = {
name: clerkTool.name,
description: clerkTool.description,
schema: clerkTool.parameters,
});
} as any;
return tool(executeFn, toolConfig) as StructuredTool;
Comment on lines +11 to +17
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Replace excessive any type assertions with proper types.

The code uses multiple as any casts (lines 11, 16) that completely bypass TypeScript's type checking, violating the coding guideline to avoid any types. This defeats the purpose of using TypeScript and can hide type incompatibilities.

Instead of forcing types with any, the proper approach is to:

  1. Verify the actual return type of clerkTool.bindExecute()
  2. Verify the expected parameter types of tool()
  3. Use proper type annotations, generics, or type guards

Run the following script to inspect the type definitions:

As per coding guidelines.


🏁 Script executed:

#!/bin/bash
# Find ClerkTool interface/type definition to understand bindExecute signature
ast-grep --pattern 'interface ClerkTool {
  $$$
  bindExecute($$$) $$$
  $$$
}'

ast-grep --pattern 'type ClerkTool = {
  $$$
  bindExecute($$$) $$$
  $$$
}'

# Find the tool function signature from langchain
rg -n -A 5 "export.*function tool" --type=ts

# Look for type definitions in the lib/types file
cat packages/agent-toolkit/src/lib/types.ts

Length of output: 1989


I need to search for the ClerkTool definition and examine the adapter.ts file more closely.


🏁 Script executed:

#!/bin/bash

# Find and read clerk-tool file
find . -name "clerk-tool*" -type f | head -5

# Look at adapter.ts full context
cat packages/agent-toolkit/src/langchain/adapter.ts

Length of output: 738



🏁 Script executed:

#!/bin/bash

# Read the ClerkTool definition file
cat packages/agent-toolkit/src/lib/clerk-tool.ts

Length of output: 2130


Remove unnecessary as any type assertions on lines 11 and 16.

The code contains problematic as any casts that bypass TypeScript type checking without justification:

  • Line 11: clerkTool.bindExecute() returns (input: any) => Promise<unknown>, which is already the correct type. The as any casts on both the function result and context parameter are unnecessary.
  • Lines 13-17: The toolConfig object already has the correct shape expected by tool(): { name: string, description: string, schema: ZodObject<any> }. The as any cast is unnecessary.

Replace with properly typed assignments. Since context is typed as ToolkitParams (per SdkAdapter<StructuredTool>), it's compatible with CreateClerkToolkitParams and doesn't need a cast:

const executeFn = clerkTool.bindExecute(clerkClient, context);
const toolConfig = {
  name: clerkTool.name,
  description: clerkTool.description,
  schema: clerkTool.parameters,
};
return tool(executeFn, toolConfig) as StructuredTool;
🤖 Prompt for AI Agents
In packages/agent-toolkit/src/langchain/adapter.ts around lines 11 to 17, remove
the unnecessary `as any` type assertions: stop casting the result of
`clerkTool.bindExecute` and the `context` parameter to `any` and construct
`toolConfig` without `as any`. Change the assignment so `executeFn` is assigned
directly from `clerkTool.bindExecute(clerkClient, context)` and `toolConfig` is
created with its explicit properties (name, description, schema) without
casting; keep the final `return tool(... ) as StructuredTool` if needed, but
remove the two `as any` usages.

};
3 changes: 2 additions & 1 deletion packages/astro/src/stores/external.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { deriveState } from '@clerk/shared/deriveState';
import { eventMethodCalled } from '@clerk/shared/telemetry';
import type { SignedInSessionResource } from '@clerk/types';
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Leftover import from @clerk/types—migrate to @clerk/shared/types

This file still pulls SignedInSessionResource from @clerk/types. Switch to the shared path to align with the migration.

-import type { SignedInSessionResource } from '@clerk/types';
+import type { SignedInSessionResource } from '@clerk/shared/types';

🏁 Script executed:

#!/usr/bin/env bash
# Audit repo for lingering @clerk/types imports
rg -nP --type=ts --type=tsx --type=js --type=jsx -g '!**/node_modules/**' "\@clerk/types"

Length of output: 27



---

🏁 Script executed:

```shell
#!/bin/bash
# Audit repo for lingering @clerk/types imports with corrected syntax
rg -nP "@clerk/types" --type ts --type js -g '!**/node_modules/**'

Length of output: 68479


🏁 Script executed:

#!/bin/bash
# Verify the specific file mentioned in the review
cat packages/astro/src/stores/external.ts

Length of output: 5381


🏁 Script executed:

#!/bin/bash
# Check if @clerk/shared/types exists and what it exports
find . -path '*/node_modules' -prune -o -type f -name 'index.ts' -o -name 'types.ts' | grep -i "clerk/shared"

Length of output: 0


🏁 Script executed:

#!/bin/bash
# Find the @clerk/shared package structure
find packages/shared -type f -name "*.ts" -o -name "*.tsx" | head -20

Length of output: 992


🏁 Script executed:

#!/bin/bash
# Check package.json exports for @clerk/shared
cat packages/shared/package.json 2>/dev/null | grep -A 20 '"exports"'

Length of output: 512


🏁 Script executed:

#!/bin/bash
# Search for SignedInSessionResource export in @clerk/shared
rg -n "SignedInSessionResource" packages/shared --type ts --type tsx

Length of output: 27


🏁 Script executed:

#!/bin/bash
# Search for SignedInSessionResource in packages/shared (corrected syntax)
rg -n "SignedInSessionResource" packages/shared --type ts

Length of output: 1544


🏁 Script executed:

#!/bin/bash
# Check packages/types to see where SignedInSessionResource is defined
rg -n "SignedInSessionResource" packages/types/src --type ts -A 2

Length of output: 0


🏁 Script executed:

#!/bin/bash
# List top-level source files in packages/shared
ls -la packages/shared/src/*.ts 2>/dev/null | head -30

Length of output: 2575


🏁 Script executed:

#!/bin/bash
# Check if packages/shared has a types.ts or similar
find packages/shared/src -maxdepth 1 -name "*types*" -o -name "*index*"

Length of output: 54


🏁 Script executed:

#!/bin/bash
# Verify packages/types re-exports from @clerk/shared
cat packages/types/src/index.d.ts 2>/dev/null | head -30

Length of output: 313


🏁 Script executed:

#!/bin/bash
# Check if other astro files still use @clerk/types for comparison
rg -n "@clerk/types" packages/astro/src --type ts

Length of output: 1984


Migrate import to @clerk/shared/types for consistency with package deprecation

The review comment is correct. The packages/types package documentation explicitly states that "@clerk/types is now merged with @clerk/shared" and indicates "Please import from @clerk/shared/types instead." The SignedInSessionResource type is available from @clerk/shared/types, and this file already imports from @clerk/shared (lines 1–2), so the import should be migrated.

-import type { SignedInSessionResource } from '@clerk/types';
+import type { SignedInSessionResource } from '@clerk/shared/types';
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
import type { SignedInSessionResource } from '@clerk/types';
import type { SignedInSessionResource } from '@clerk/shared/types';
🤖 Prompt for AI Agents
In packages/astro/src/stores/external.ts around line 3, the file imports
SignedInSessionResource from '@clerk/types' but the package has been merged and
types should be imported from '@clerk/shared/types'; update the import to pull
SignedInSessionResource from '@clerk/shared/types' (keeping any existing imports
from '@clerk/shared') and remove the '@clerk/types' import to maintain
consistency with the deprecation.

import { batched, computed, onMount, type Store } from 'nanostores';

import { $clerk, $csrState, $initialState } from './internal';
Expand Down Expand Up @@ -51,7 +52,7 @@ export const $userStore = computed([$authStore], auth => auth.user);
* @example
* $sessionStore.subscribe((session) => console.log(session.id))
*/
export const $sessionStore = computed([$authStore], auth => auth.session);
export const $sessionStore = computed([$authStore], auth => auth.session as SignedInSessionResource | null | undefined);

/**
* A client side store that is populated after clerk-js has loaded.
Expand Down
10 changes: 5 additions & 5 deletions packages/backend/src/util/shared.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
export { addClerkPrefix, getScriptUrl, getClerkJsMajorVersionOrTag } from '@clerk/shared/url';
export { retry } from '@clerk/shared/retry';
export { deprecated, deprecatedProperty } from '@clerk/shared/deprecated';
export {
getCookieSuffix,
getSuffixedCookieName,
isDevelopmentFromSecretKey,
isProductionFromSecretKey,
parsePublishableKey,
getCookieSuffix,
getSuffixedCookieName,
} from '@clerk/shared/keys';
export { deprecated, deprecatedProperty } from '@clerk/shared/deprecated';
export { retry } from '@clerk/shared/retry';
export { addClerkPrefix, getClerkJsMajorVersionOrTag, getScriptUrl } from '@clerk/shared/url';

import { buildErrorThrower } from '@clerk/shared/error';
import { createDevOrStagingUrlCache } from '@clerk/shared/keys';
Expand Down
1 change: 0 additions & 1 deletion packages/chrome-extension/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ Please see the latest extension [authentication support matrix](https://clerk.co
1. [**Base configuration**:](/packages/chrome-extension/docs/manifest.md#base-configuration) Use this if you plan to only use Clerk in the context of the extension.
2. [**Session sync configuration**:](/packages/chrome-extension/docs/manifest.md#sync-host-configuration) Use this if you plan to share authentication with a website in the same browser.
6. **Add Clerk to your app:** Though not required, we generally suggest using Plasmo for browser extension development. This will enforce common standards across your extension as well as allow for easier integration with other browsers in the future.

1. [**Via `ClerkProvider`:**](/packages/chrome-extension/docs/clerk-provider.md) This is the general approach to all extensions. From here you'll be able to support extension-only authentication as well as sharing authentication with a website in the same browser.
2. [**Via service workers**:](/packages/chrome-extension/docs/service-workers.md) If you also require the use of background service workers, this will allow you to access the Clerk client from the extension context.

Expand Down
4 changes: 2 additions & 2 deletions packages/chrome-extension/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"strict": true,
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true,
"module": "esnext",
"moduleResolution": "node",
"module": "nodenext",
"moduleResolution": "nodenext",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "react-jsx",
Expand Down
4 changes: 2 additions & 2 deletions packages/clerk-js/bundlewatch.config.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"files": [
{ "path": "./dist/clerk.js", "maxSize": "821KB" },
{ "path": "./dist/clerk.js", "maxSize": "840KB" },
{ "path": "./dist/clerk.browser.js", "maxSize": "81KB" },
{ "path": "./dist/clerk.channel.browser.js", "maxSize": "81KB" },
{ "path": "./dist/clerk.legacy.browser.js", "maxSize": "123KB" },
{ "path": "./dist/clerk.headless*.js", "maxSize": "63KB" },
{ "path": "./dist/ui-common*.js", "maxSize": "117.1KB" },
{ "path": "./dist/ui-common*.legacy.*.js", "maxSize": "120KB" },
{ "path": "./dist/vendors*.js", "maxSize": "45KB" },
{ "path": "./dist/vendors*.js", "maxSize": "47KB" },
{ "path": "./dist/coinbase*.js", "maxSize": "38KB" },
{ "path": "./dist/stripe-vendors*.js", "maxSize": "1KB" },
{ "path": "./dist/createorganization*.js", "maxSize": "5KB" },
Expand Down
1 change: 0 additions & 1 deletion packages/clerk-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
"@base-org/account": "2.0.1",
"@clerk/localizations": "workspace:^",
"@clerk/shared": "workspace:^",
"@clerk/types": "workspace:^",
"@coinbase/wallet-sdk": "4.3.0",
"@emotion/cache": "11.11.0",
"@emotion/react": "11.11.1",
Expand Down
Loading
Loading