Skip to content

Commit

Permalink
chore(nextjs): Use utilities from @clerk/shared
Browse files Browse the repository at this point in the history
  • Loading branch information
dimkl committed Sep 28, 2023
1 parent e6174a5 commit 5864bc7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 27 deletions.
7 changes: 7 additions & 0 deletions .changeset/unlucky-emus-greet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@clerk/nextjs': minor
'@clerk/shared': minor
---

Add the `use client` directive in `@clerk/shared` to make the package compatible with an RSC environment.
Remove several helpers from `@clerk/nextjs` and import them from `@clerk/shared` instead.
2 changes: 1 addition & 1 deletion packages/nextjs/src/server/utils.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import type { RequestState } from '@clerk/backend';
import { buildRequestUrl, constants } from '@clerk/backend';
import { handleValueOrFn, isHttpOrHttps } from '@clerk/shared';
import type { NextRequest } from 'next/server';
import { NextResponse } from 'next/server';

import { constants as nextConstants } from '../constants';
import { handleValueOrFn, isHttpOrHttps } from '../shared';
import { API_KEY, DOMAIN, IS_SATELLITE, PROXY_URL, SECRET_KEY, SIGN_IN_URL } from './clerkClient';
import { missingDomainAndProxy, missingSignInUrlInDev } from './errors';
import type { NextMiddlewareResult, RequestLike } from './types';
Expand Down
1 change: 0 additions & 1 deletion packages/nextjs/src/shared/index.ts

This file was deleted.

25 changes: 0 additions & 25 deletions packages/nextjs/src/shared/url.ts

This file was deleted.

0 comments on commit 5864bc7

Please sign in to comment.