Skip to content

Commit 5bd33d4

Browse files
authored
Merge branch 'main' into alexbratsos/user-4373-signal-update-for-resource-and-fetchstatus-can-happen
2 parents cb580f1 + 90beaeb commit 5bd33d4

691 files changed

Lines changed: 31343 additions & 14041 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

.changeset/kind-peaches-notice.md

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@clerk/astro': minor
3+
'@clerk/nuxt': minor
4+
'@clerk/react-router': minor
5+
'@clerk/tanstack-react-start': minor
6+
'@clerk/shared': patch
7+
---
8+
9+
Add an env-var shortcut for `unsafe_disableDevelopmentModeConsoleWarning` across the Astro, Nuxt, React Router, and TanStack Start integrations so the development-keys console warning can be suppressed without threading the option through `<ClerkProvider>` manually:
10+
11+
- Astro: `PUBLIC_CLERK_UNSAFE_DISABLE_DEVELOPMENT_MODE_CONSOLE_WARNING`
12+
- Nuxt: `NUXT_PUBLIC_CLERK_UNSAFE_DISABLE_DEVELOPMENT_MODE_CONSOLE_WARNING`
13+
- React Router: `VITE_CLERK_UNSAFE_DISABLE_DEVELOPMENT_MODE_CONSOLE_WARNING` (or `CLERK_UNSAFE_DISABLE_DEVELOPMENT_MODE_CONSOLE_WARNING`)
14+
- TanStack Start: `VITE_CLERK_UNSAFE_DISABLE_DEVELOPMENT_MODE_CONSOLE_WARNING` (or `CLERK_UNSAFE_DISABLE_DEVELOPMENT_MODE_CONSOLE_WARNING`)
15+
16+
The Next.js equivalent (`NEXT_PUBLIC_CLERK_UNSAFE_DISABLE_DEVELOPMENT_MODE_CONSOLE_WARNING`) already existed; the JSDoc on `unsafe_disableDevelopmentModeConsoleWarning` now lists every framework's env-var shortcut and clarifies that suppressing the warning at source also keeps it from being mirrored to the dev-server terminal (e.g. Next.js with `experimental.browserDebugInfoInTerminal`).

.cursor/commands/cmt.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Generate a commit message for changes in this chat. **Do not commit or push** (s
1717

1818
Scopes must match package/app names. No scope is also valid. Invalid scope = commitlint rejection.
1919

20-
- **Packages:** agent-toolkit, astro, backend, chrome-extension, clerk-js, dev-cli, elements, expo, expo-passkeys, express, fastify, localizations, nextjs, nuxt, react, react-router, remix, shared, tanstack-react-start, testing, themes, types, ui, upgrade, vue
20+
- **Packages:** astro, backend, chrome-extension, clerk-js, dev-cli, elements, expo, expo-passkeys, express, fastify, localizations, nextjs, nuxt, react, react-router, remix, shared, tanstack-react-start, testing, themes, types, ui, upgrade, vue
2121
- **Other:** docs, repo, release, e2e, \*
2222

2323
---

.cursor/rules/monorepo.mdc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ Core Package Categories
2222
- **Backend**: `@clerk/backend` - Server-side utilities and JWT verification
2323
- **Shared Utilities**: `@clerk/shared`, `@clerk/types` - Common utilities and TypeScript types
2424
- **Developer Tools**: `@clerk/testing`, `@clerk/dev-cli`, `@clerk/upgrade`
25-
- **Specialized**: `@clerk/agent-toolkit` - AI agent integration tools
2625

2726
Directory Structure
2827

.github/actions/init-blacksmith/action.yml

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ inputs:
44
node-version:
55
description: 'The node version to use'
66
required: false
7-
default: '22'
7+
default: '24.15.0'
88
playwright-enabled:
99
description: 'Enable Playwright?'
1010
required: false
@@ -21,19 +21,15 @@ inputs:
2121
description: 'Cache usage settings'
2222
required: false
2323
default: 'remote:rw'
24-
turbo-cache-dir:
25-
description: 'The cache dir to use for Turbo'
26-
required: false
27-
default: './.turbo-cache'
2824
turbo-signature:
2925
description: 'The signature to use for Turbo'
3026
required: false
3127
turbo-team:
3228
description: 'The team to use for Turbo remote auth'
33-
required: true
29+
required: false
3430
turbo-token:
3531
description: 'The token to use for Turbo remote auth'
36-
required: true
32+
required: false
3733
registry-url:
3834
description: 'The registry the packages will be published to'
3935
required: false
@@ -52,7 +48,6 @@ runs:
5248
env:
5349
# envs are required to pass inputs to the script
5450
CACHE: ${{ inputs.turbo-cache }}
55-
CACHE_DIR: ${{ inputs.turbo-cache-dir }}
5651
ENABLED: ${{ inputs.turbo-enabled }}
5752
SIGNATURE: ${{ inputs.turbo-signature }}
5853
SUMMARIZE: ${{ inputs.turbo-summarize }}
@@ -67,10 +62,9 @@ runs:
6762
? os.availableParallelism()
6863
: os.cpus().length;
6964
70-
const { ENABLED, CACHE = 'remote:rw', CACHE_DIR, SIGNATURE, SUMMARIZE, TEAM, TOKEN, VERBOSE } = process.env
65+
const { ENABLED, CACHE = 'remote:rw', SIGNATURE, SUMMARIZE, TEAM, TOKEN, VERBOSE } = process.env
7166
7267
const ARGS = [
73-
`--cache-dir=${CACHE_DIR}`,
7468
`--concurrency=${cpus}`,
7569
`--summarize=${SUMMARIZE}`,
7670
]
@@ -88,15 +82,17 @@ runs:
8882
)
8983
9084
if (ENABLED === 'true') {
91-
if (!TEAM) {
92-
throw new Error('turbo-team input is required and must not be empty')
93-
}
94-
if (!TOKEN) {
95-
throw new Error('turbo-token input is required and must not be empty')
85+
const missing = []
86+
if (!TEAM) missing.push('turbo-team')
87+
if (!TOKEN) missing.push('turbo-token')
88+
89+
if (missing.length > 0) {
90+
core.warning(`Missing Turbo remote cache credentials: ${missing.join(', ')}. Turbo remote caching will be disabled.`)
91+
} else {
92+
core.exportVariable('TURBO_CACHE', CACHE)
93+
core.exportVariable('TURBO_TEAM', TEAM)
94+
core.exportVariable('TURBO_TOKEN', TOKEN)
9695
}
97-
core.exportVariable('TURBO_CACHE', CACHE)
98-
core.exportVariable('TURBO_TEAM', TEAM)
99-
core.exportVariable('TURBO_TOKEN', TOKEN)
10096
}
10197
10298
if (SIGNATURE && SIGNATURE !== '') {

.github/actions/init/action.yml

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ inputs:
44
node-version:
55
description: 'The node version to use'
66
required: false
7-
default: '22'
7+
default: '24.15.0'
88
playwright-enabled:
99
description: 'Enable Playwright?'
1010
required: false
@@ -21,19 +21,15 @@ inputs:
2121
description: 'Cache usage settings'
2222
required: false
2323
default: 'remote:rw'
24-
turbo-cache-dir:
25-
description: 'The cache dir to use for Turbo'
26-
required: false
27-
default: './.turbo-cache'
2824
turbo-signature:
2925
description: 'The signature to use for Turbo'
3026
required: false
3127
turbo-team:
3228
description: 'The team to use for Turbo remote auth'
33-
required: true
29+
required: false
3430
turbo-token:
3531
description: 'The token to use for Turbo remote auth'
36-
required: true
32+
required: false
3733
registry-url:
3834
description: 'The registry the packages will be published to'
3935
required: false
@@ -52,7 +48,6 @@ runs:
5248
env:
5349
# envs are required to pass inputs to the script
5450
CACHE: ${{ inputs.turbo-cache }}
55-
CACHE_DIR: ${{ inputs.turbo-cache-dir }}
5651
ENABLED: ${{ inputs.turbo-enabled }}
5752
SIGNATURE: ${{ inputs.turbo-signature }}
5853
SUMMARIZE: ${{ inputs.turbo-summarize }}
@@ -67,10 +62,9 @@ runs:
6762
? os.availableParallelism()
6863
: os.cpus().length;
6964
70-
const { ENABLED, CACHE = 'remote:rw', CACHE_DIR, SIGNATURE, SUMMARIZE, TEAM, TOKEN, VERBOSE } = process.env
65+
const { ENABLED, CACHE = 'remote:rw', SIGNATURE, SUMMARIZE, TEAM, TOKEN, VERBOSE } = process.env
7166
7267
const ARGS = [
73-
`--cache-dir=${CACHE_DIR}`,
7468
`--concurrency=${cpus}`,
7569
`--summarize=${SUMMARIZE}`,
7670
]
@@ -88,15 +82,17 @@ runs:
8882
)
8983
9084
if (ENABLED === 'true') {
91-
if (!TEAM) {
92-
throw new Error('turbo-team input is required and must not be empty')
93-
}
94-
if (!TOKEN) {
95-
throw new Error('turbo-token input is required and must not be empty')
85+
const missing = []
86+
if (!TEAM) missing.push('turbo-team')
87+
if (!TOKEN) missing.push('turbo-token')
88+
89+
if (missing.length > 0) {
90+
core.warning(`Missing Turbo remote cache credentials: ${missing.join(', ')}. Turbo remote caching will be disabled.`)
91+
} else {
92+
core.exportVariable('TURBO_CACHE', CACHE)
93+
core.exportVariable('TURBO_TEAM', TEAM)
94+
core.exportVariable('TURBO_TOKEN', TOKEN)
9695
}
97-
core.exportVariable('TURBO_CACHE', CACHE)
98-
core.exportVariable('TURBO_TEAM', TEAM)
99-
core.exportVariable('TURBO_TOKEN', TOKEN)
10096
}
10197
10298
if (SIGNATURE && SIGNATURE !== '') {

.github/labeler.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,6 @@ integration:
9292
- changed-files:
9393
- any-glob-to-any-file: integration/**
9494

95-
agent-toolkit:
96-
- changed-files:
97-
- any-glob-to-any-file: packages/agent-toolkit/**
98-
9995
# Base branch labels
10096
core-2:
10197
- base-branch: '^release/core-2$'

.github/workflows/ci.yml

Lines changed: 44 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,10 @@ jobs:
218218
fail-fast: false
219219
matrix:
220220
include:
221-
- node-version: 22
221+
- node-version: 24.15.0
222+
test-filter: "**"
223+
filter-label: "**"
224+
- node-version: 20.19.0
222225
test-filter: "**"
223226
filter-label: "**"
224227

@@ -257,7 +260,7 @@ jobs:
257260
- name: Run Typedoc tests
258261
run: |
259262
# Only run Typedoc tests for one matrix version and main test run
260-
if [ "${{ matrix.node-version }}" == "22" ] && [ "${{ matrix.test-filter }}" = "**" ]; then
263+
if [ "${{ matrix.node-version }}" == "24.15.0" ] && [ "${{ matrix.test-filter }}" = "**" ]; then
261264
pnpm turbo run //#test:typedoc
262265
fi
263266
env:
@@ -274,7 +277,9 @@ jobs:
274277

275278
integration-tests:
276279
needs: [check-permissions, build-packages]
277-
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.draft == false }}
280+
if: >-
281+
${{ (github.event_name != 'pull_request' || github.event.pull_request.draft == false)
282+
&& (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) }}
278283
name: Integration Tests (${{ matrix.test-name }}, ${{ matrix.test-project }}${{ matrix.next-version && format(', {0}', matrix.next-version) || '' }})
279284
permissions:
280285
contents: read
@@ -292,6 +297,7 @@ jobs:
292297
[
293298
"generic",
294299
"express",
300+
"fastify",
295301
"ap-flows",
296302
"localhost",
297303
"sessions",
@@ -305,6 +311,7 @@ jobs:
305311
"react-router",
306312
"custom",
307313
"hono",
314+
"chrome-extension",
308315
]
309316
test-project: ["chrome"]
310317
include:
@@ -355,8 +362,7 @@ jobs:
355362
fi
356363
jq --version
357364
358-
- name: Task Status
359-
id: task-status
365+
- name: Validate turbo task
360366
env:
361367
E2E_APP_CLERK_JS_DIR: ${{runner.temp}}
362368
E2E_APP_CLERK_UI_DIR: ${{runner.temp}}
@@ -366,40 +372,48 @@ jobs:
366372
E2E_PROJECT: ${{ matrix.test-project }}
367373
INTEGRATION_INSTANCE_KEYS: ${{ secrets.INTEGRATION_INSTANCE_KEYS }}
368374
run: |
369-
# Use turbo's built-in --affected flag to detect changes
370-
# This automatically uses GITHUB_BASE_REF in GitHub Actions
371-
TASK_COUNT=$(pnpm turbo run test:integration:${{ matrix.test-name }} --affected --dry=json 2>/dev/null | jq '.tasks | length' 2>/dev/null || echo "0")
375+
# Validate the turbo task exists. Turbo's --affected flag is a no-op for
376+
# root-level tasks (//#) — they are always returned as affected. The previous
377+
# --affected check only served to silently skip tests when the task was missing
378+
# from turbo.json, hiding real configuration errors.
379+
TASK_NAME="test:integration:${{ matrix.test-name }}"
380+
TURBO_STDERR=$(mktemp)
381+
if ! TURBO_JSON=$(pnpm turbo run "$TASK_NAME" --dry=json 2>"$TURBO_STDERR"); then
382+
echo "::error::Turbo task '$TASK_NAME' failed validation"
383+
cat "$TURBO_STDERR"
384+
exit 1
385+
fi
372386
373-
if [ "$TASK_COUNT" -gt 0 ]; then
374-
AFFECTED=1
375-
else
376-
AFFECTED=0
387+
if ! TASK_COUNT=$(jq -er '.tasks | length' <<< "$TURBO_JSON"); then
388+
echo "::error::Turbo task '$TASK_NAME' returned invalid JSON or missing .tasks"
389+
printf '%s\n' "$TURBO_JSON"
390+
exit 1
377391
fi
378392
379-
echo "affected=${AFFECTED}"
380-
echo "affected=${AFFECTED}" >> $GITHUB_OUTPUT
393+
if [ "$TASK_COUNT" -eq 0 ]; then
394+
echo "::error::Turbo task '$TASK_NAME' returned 0 tasks"
395+
exit 1
396+
fi
397+
398+
echo "Task '$TASK_NAME' validated ($TASK_COUNT tasks in graph)"
381399
382400
- name: Build packages
383-
if: ${{ steps.task-status.outputs.affected == '1' }}
384401
run: pnpm turbo build $TURBO_ARGS --only
385402

386403
- name: Publish to local registry
387-
if: ${{ steps.task-status.outputs.affected == '1' }}
388404
run: pkglab pub --force
389405

390406
- name: Edit .npmrc [link-workspace-packages=false]
391407
run: sed -i -E 's/link-workspace-packages=(deep|true)/link-workspace-packages=false/' .npmrc
392408

393409
- name: Install @clerk/clerk-js in os temp
394-
if: ${{ steps.task-status.outputs.affected == '1' }}
395410
working-directory: ${{runner.temp}}
396411
run: |
397412
mkdir clerk-js && cd clerk-js
398413
pnpm init
399414
pkglab add @clerk/clerk-js
400415
401416
- name: Install @clerk/ui in os temp
402-
if: ${{ steps.task-status.outputs.affected == '1' }}
403417
working-directory: ${{runner.temp}}
404418
run: |
405419
mkdir clerk-ui && cd clerk-ui
@@ -411,7 +425,6 @@ jobs:
411425
run: cd packages/astro && pnpm copy:components
412426

413427
- name: Write all ENV certificates to files in integration/certs
414-
if: ${{ steps.task-status.outputs.affected == '1' }}
415428
uses: actions/github-script@v7
416429
env:
417430
INTEGRATION_CERTS: "${{secrets.INTEGRATION_CERTS}}"
@@ -429,12 +442,10 @@ jobs:
429442
}
430443
431444
- name: LS certs
432-
if: ${{ steps.task-status.outputs.affected == '1' }}
433445
working-directory: ./integration/certs
434446
run: ls -la && pwd
435447

436448
- name: Run Integration Tests
437-
if: ${{ steps.task-status.outputs.affected == '1' }}
438449
id: integration-tests
439450
timeout-minutes: 25
440451
run: pnpm turbo test:integration:${{ matrix.test-name }} $TURBO_ARGS
@@ -451,12 +462,21 @@ jobs:
451462
NODE_EXTRA_CA_CERTS: ${{ github.workspace }}/integration/certs/rootCA.pem
452463
VERCEL_AUTOMATION_BYPASS_SECRET: ${{ secrets.VERCEL_AUTOMATION_BYPASS_SECRET }}
453464

465+
- name: Sanitize artifact name
466+
if: ${{ cancelled() || failure() }}
467+
id: sanitize
468+
run: |
469+
SANITIZED="${TEST_NAME//:/-}"
470+
echo "artifact-suffix=${SANITIZED}" >> $GITHUB_OUTPUT
471+
env:
472+
TEST_NAME: ${{ matrix.test-name }}
473+
454474
- name: Upload test-results
455475
if: ${{ cancelled() || failure() }}
456476
uses: actions/upload-artifact@v4
457477
with:
458-
name: playwright-traces-${{ github.run_id }}-${{ github.run_attempt }}-${{ matrix.test-name }}${{ matrix.next-version && format('-next{0}', matrix.next-version) || '' }}
459-
path: integration/test-results
478+
name: playwright-traces-${{ github.run_id }}-${{ github.run_attempt }}-${{ steps.sanitize.outputs.artifact-suffix }}${{ matrix.next-version && format('-next{0}', matrix.next-version) || '' }}
479+
path: test-results
460480
retention-days: 1
461481

462482
pkg-pr-new:
@@ -484,7 +504,7 @@ jobs:
484504
uses: ./.github/actions/init-blacksmith
485505
with:
486506
turbo-enabled: true
487-
node-version: 22
507+
node-version: 24.15.0
488508
turbo-signature: ${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }}
489509
turbo-summarize: ${{ env.TURBO_SUMMARIZE }}
490510
turbo-team: ${{ vars.TURBO_TEAM }}

.github/workflows/e2e-cleanups.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
# run every 6 hours on every weekday
66
- cron: '0 */6 * * 1-5'
77

8+
permissions:
9+
contents: read
10+
811
jobs:
912
integration-tests:
1013
name: Cleanup e2e instances
@@ -34,3 +37,4 @@ jobs:
3437
run: pnpm test:integration:cleanup
3538
env:
3639
INTEGRATION_INSTANCE_KEYS: ${{ secrets.INTEGRATION_INSTANCE_KEYS }}
40+
INTEGRATION_STAGING_INSTANCE_KEYS: ${{ secrets.INTEGRATION_STAGING_INSTANCE_KEYS }}

0 commit comments

Comments
 (0)