Skip to content

Commit e84ffff

Browse files
authored
Merge branch 'main' into keiran/com-974
2 parents e55fe7c + 74dd3b8 commit e84ffff

File tree

168 files changed

+2687
-1240
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

168 files changed

+2687
-1240
lines changed

.changeset/salty-spiders-end.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

.changeset/short-stars-start.md

Lines changed: 0 additions & 2 deletions
This file was deleted.

.changeset/tangy-toes-dress.md

Lines changed: 0 additions & 8 deletions
This file was deleted.

.changeset/twenty-camels-drum.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ jobs:
9898
9999
github.rest.actions.createWorkflowDispatch({
100100
owner: 'clerk',
101-
repo: 'generated-typedoc',
102-
workflow_id: 'update-docs.yml',
101+
repo: 'clerk-docs',
102+
workflow_id: 'typedoc.yml',
103103
ref: 'main',
104104
})
105105
} else{

integration/templates/next-app-router/src/app/page.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@ export default function Home() {
1010
<SignedIn>SignedIn</SignedIn>
1111
<SignedOut>SignedOut</SignedOut>
1212
<Protect fallback={'SignedOut from protect'}>SignedIn from protect</Protect>
13+
<Protect plan='free_user'>
14+
<p>user in free</p>
15+
</Protect>
16+
<Protect plan='pro'>
17+
<p>user in pro</p>
18+
</Protect>
19+
<Protect plan='plus'>
20+
<p>user in plus</p>
21+
</Protect>
1322
<SignIn
1423
routing='hash'
1524
signUpUrl={'/sign-up'}

integration/tests/pricing-table.test.ts

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,11 @@ testAgainstRunningApps({ withEnv: [appConfigs.envs.withBilling] })('pricing tabl
6464
await expect(u.po.page.getByText('Checkout')).toBeVisible();
6565
});
6666

67-
test.skip('can subscribe to a plan', async ({ page, context }) => {
67+
test('can subscribe to a plan', async ({ page, context }) => {
6868
const u = createTestUtils({ app, page, context });
6969
await u.po.signIn.goTo();
7070
await u.po.signIn.signInWithEmailAndInstantPassword({ email: fakeUser.email, password: fakeUser.password });
71-
await u.po.page.goToRelative('/pricing-table');
72-
71+
await u.po.page.goToRelative('/pricing-table?newSubscriptionRedirectUrl=/pricing-table');
7372
await u.po.pricingTable.waitForMounted();
7473
await u.po.pricingTable.startCheckout({ planSlug: 'plus' });
7574
await u.po.checkout.waitForMounted();
@@ -87,7 +86,7 @@ testAgainstRunningApps({ withEnv: [appConfigs.envs.withBilling] })('pricing tabl
8786
}
8887
});
8988

90-
test.skip('can upgrade to a new plan with saved card', async ({ page, context }) => {
89+
test('can upgrade to a new plan with saved card', async ({ page, context }) => {
9190
const u = createTestUtils({ app, page, context });
9291
await u.po.signIn.goTo();
9392
await u.po.signIn.signInWithEmailAndInstantPassword({ email: fakeUser.email, password: fakeUser.password });
@@ -100,7 +99,7 @@ testAgainstRunningApps({ withEnv: [appConfigs.envs.withBilling] })('pricing tabl
10099
await expect(u.po.page.getByText('Payment was successful!')).toBeVisible();
101100
});
102101

103-
test.skip('can downgrade to previous plan', async ({ page, context }) => {
102+
test('can downgrade to previous plan', async ({ page, context }) => {
104103
const u = createTestUtils({ app, page, context });
105104
await u.po.signIn.goTo();
106105
await u.po.signIn.signInWithEmailAndInstantPassword({ email: fakeUser.email, password: fakeUser.password });
@@ -114,7 +113,7 @@ testAgainstRunningApps({ withEnv: [appConfigs.envs.withBilling] })('pricing tabl
114113
await expect(u.po.page.getByText('Success!')).toBeVisible();
115114
});
116115

117-
test.skip('user is prompted to add email before checkout', async ({ page, context }) => {
116+
test('user is prompted to add email before checkout', async ({ page, context }) => {
118117
const u = createTestUtils({ app, page, context });
119118

120119
const fakeUser = u.services.users.createFakeUser({ withEmail: false, withPhoneNumber: true });
@@ -157,7 +156,7 @@ testAgainstRunningApps({ withEnv: [appConfigs.envs.withBilling] })('pricing tabl
157156
// });
158157

159158
test.describe('redirects', () => {
160-
test.skip('default navigates to afterSignInUrl', async ({ page, context }) => {
159+
test('default navigates to afterSignInUrl', async ({ page, context }) => {
161160
const u = createTestUtils({ app, page, context });
162161
await u.po.signIn.goTo();
163162
await u.po.signIn.signInWithEmailAndInstantPassword({ email: fakeUser.email, password: fakeUser.password });
@@ -172,9 +171,16 @@ testAgainstRunningApps({ withEnv: [appConfigs.envs.withBilling] })('pricing tabl
172171
.getByRole('button', { name: /^continue$/i })
173172
.click();
174173
await u.page.waitForAppUrl('/');
174+
// eslint-disable-next-line playwright/no-conditional-in-test
175+
if (app.name.includes('next')) {
176+
// Correctly updates RSCs with the new `pla` claim.
177+
await expect(u.po.page.getByText('user in pro')).toBeVisible({
178+
timeout: 5_000,
179+
});
180+
}
175181
});
176182

177-
test.skip('navigates to supplied newSubscriptionRedirectUrl', async ({ page, context }) => {
183+
test('navigates to supplied newSubscriptionRedirectUrl', async ({ page, context }) => {
178184
const u = createTestUtils({ app, page, context });
179185
await u.po.signIn.goTo();
180186
await u.po.signIn.signInWithEmailAndInstantPassword({ email: fakeUser.email, password: fakeUser.password });
@@ -193,7 +199,7 @@ testAgainstRunningApps({ withEnv: [appConfigs.envs.withBilling] })('pricing tabl
193199
});
194200

195201
test.describe('in UserProfile', () => {
196-
test.skip('renders pricing table with plans', async ({ page, context }) => {
202+
test('renders pricing table with plans', async ({ page, context }) => {
197203
const u = createTestUtils({ app, page, context });
198204
await u.po.signIn.goTo();
199205
await u.po.signIn.signInWithEmailAndInstantPassword({ email: fakeUser.email, password: fakeUser.password });
@@ -206,7 +212,7 @@ testAgainstRunningApps({ withEnv: [appConfigs.envs.withBilling] })('pricing tabl
206212
await expect(u.po.page.getByRole('heading', { name: 'Pro' })).toBeVisible();
207213
});
208214

209-
test.skip('can subscribe to a plan, revalidates payment sources on complete and then downgrades to free', async ({
215+
test('can subscribe to a plan, revalidates payment sources on complete and then downgrades to free', async ({
210216
page,
211217
context,
212218
}) => {
@@ -254,7 +260,7 @@ testAgainstRunningApps({ withEnv: [appConfigs.envs.withBilling] })('pricing tabl
254260
await fakeUser.deleteIfExists();
255261
});
256262

257-
test.skip('checkout always revalidates on open', async ({ page, context }) => {
263+
test('checkout always revalidates on open', async ({ page, context }) => {
258264
const u = createTestUtils({ app, page, context });
259265

260266
const fakeUser = u.services.users.createFakeUser();
@@ -282,7 +288,7 @@ testAgainstRunningApps({ withEnv: [appConfigs.envs.withBilling] })('pricing tabl
282288
await fakeUser.deleteIfExists();
283289
});
284290

285-
test.skip('adds payment source via checkout and resets stripe setup intent after failed payment', async ({
291+
test('adds payment source via checkout and resets stripe setup intent after failed payment', async ({
286292
page,
287293
context,
288294
}) => {
@@ -319,7 +325,7 @@ testAgainstRunningApps({ withEnv: [appConfigs.envs.withBilling] })('pricing tabl
319325
await fakeUser.deleteIfExists();
320326
});
321327

322-
test.skip('displays notice then plan cannot change', async ({ page, context }) => {
328+
test('displays notice then plan cannot change', async ({ page, context }) => {
323329
const u = createTestUtils({ app, page, context });
324330

325331
const fakeUser = u.services.users.createFakeUser();

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"test:integration:vue": "E2E_APP_ID=vue.vite pnpm test:integration:base --grep @vue",
5353
"test:typedoc": "pnpm typedoc:generate && cd ./.typedoc && vitest run",
5454
"turbo:clean": "turbo daemon clean",
55-
"typedoc:generate": "pnpm build:declarations && typedoc --tsconfig tsconfig.typedoc.json",
55+
"typedoc:generate": "pnpm build:declarations && typedoc --tsconfig tsconfig.typedoc.json && rm -rf .typedoc/docs && mv .typedoc/temp-docs .typedoc/docs",
5656
"version-packages": "changeset version && pnpm install --lockfile-only --engine-strict=false",
5757
"version-packages:canary": "./scripts/canary.mjs",
5858
"version-packages:snapshot": "./scripts/snapshot.mjs",

packages/agent-toolkit/CHANGELOG.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,32 @@
11
# @clerk/agent-toolkit
22

3+
## 0.1.10
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [[`2a90b68`](https://github.com/clerk/javascript/commit/2a90b689550ae960496c9292ca23e0225e3425cd), [`af50905`](https://github.com/clerk/javascript/commit/af50905ea497ed3286c8c4c374498e06ca6ee82b)]:
8+
- @clerk/types@4.67.0
9+
- @clerk/shared@3.12.3
10+
- @clerk/backend@2.4.5
11+
12+
## 0.1.9
13+
14+
### Patch Changes
15+
16+
- Updated dependencies [[`8ee859c`](https://github.com/clerk/javascript/commit/8ee859ce00d1d5747c14a80fe7166303e64a4f1f)]:
17+
- @clerk/shared@3.12.2
18+
- @clerk/types@4.66.1
19+
- @clerk/backend@2.4.4
20+
21+
## 0.1.8
22+
23+
### Patch Changes
24+
25+
- Updated dependencies [[`025e304`](https://github.com/clerk/javascript/commit/025e304c4d6402dfd750ee51ac9c8fc2dea1f353), [`dedf487`](https://github.com/clerk/javascript/commit/dedf48703986d547d5b28155b0182a51030cffeb), [`b96114e`](https://github.com/clerk/javascript/commit/b96114e438638896ba536bb7a17b09cdadcd9407)]:
26+
- @clerk/types@4.66.0
27+
- @clerk/backend@2.4.3
28+
- @clerk/shared@3.12.1
29+
330
## 0.1.7
431

532
### Patch Changes

packages/agent-toolkit/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@clerk/agent-toolkit",
3-
"version": "0.1.7",
3+
"version": "0.1.10",
44
"description": "Clerk Toolkit for AI Agents",
55
"homepage": "https://clerk.com/",
66
"bugs": {

0 commit comments

Comments
 (0)