Skip to content

Commit

Permalink
Merge branch 'main' into elef/sdk-1003-inject-clerk-js-script-for-ssr
Browse files Browse the repository at this point in the history
  • Loading branch information
brkalow authored Apr 12, 2024
2 parents 3003b5c + 6ca6256 commit ffa9071
Show file tree
Hide file tree
Showing 201 changed files with 2,101 additions and 629 deletions.
2 changes: 2 additions & 0 deletions .changeset/breezy-shirts-tell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
6 changes: 6 additions & 0 deletions .changeset/clean-deers-mate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@clerk/backend': minor
'@clerk/nextjs': minor
---

Implement token signature verification when passing verified token from Next.js middleware to the application origin.
2 changes: 2 additions & 0 deletions .changeset/early-geese-kiss.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
6 changes: 6 additions & 0 deletions .changeset/eighty-pens-mix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@clerk/clerk-js': minor
'@clerk/types': minor
---

Add support for different CAPTCHA widget types
5 changes: 5 additions & 0 deletions .changeset/fresh-turkeys-sit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@clerk/clerk-js': patch
---

Resolve type issues when importing `@clerk/clerk-js` directly
40 changes: 40 additions & 0 deletions .changeset/gorgeous-schools-drive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
'@clerk/localizations': minor
'@clerk/clerk-js': minor
'@clerk/types': minor
---

Move passkey related apis to stable:

- Register passkey for a user
Usage: `await clerk.user.createPasskey()`
- Authenticate with passkey
Usage: `await clerk.client.signIn.authenticateWithPasskey()`
```ts
try {
await clerk.client.signIn.authenticateWithPasskey(...args);
}catch (e) {
if (isClerkRuntimeError(e)) {
if (err.code === 'passkey_operation_aborted') {
...
}
}
}
```
- ClerkRuntimeError codes introduced:
- `passkey_not_supported`
- `passkeys_pa_not_supported`
- `passkey_invalid_rpID_or_domain`
- `passkey_already_exists`
- `passkey_operation_aborted`
- `passkey_retrieval_cancelled`
- `passkey_retrieval_failed`
- `passkey_registration_cancelled`
- `passkey_registration_failed`

- Get the user's passkeys
`clerk.user.passkeys`
- Update the name of a passkey
`clerk.user.passkeys?.[0].update({name:'Company issued passkey'})`
- Delete a passkey
`clerk.user.passkeys?.[0].delete()`
4 changes: 4 additions & 0 deletions .changeset/mighty-dragons-build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
---


5 changes: 5 additions & 0 deletions .changeset/modern-bobcats-love.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@clerk/clerk-js': patch
---

Bug Fix: When authenticating with a passkey and user was looked out an error was thrown for accessing an undefined variable
8 changes: 8 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
"chilly-pens-speak",
"chilly-suns-argue",
"chilly-tips-compete",
"clean-deers-mate",
"clean-files-hug",
"clever-bananas-turn",
"clever-cups-knock",
Expand Down Expand Up @@ -142,6 +143,7 @@
"early-cars-cross",
"early-dryers-lay",
"early-forks-argue",
"early-geese-kiss",
"early-poets-leave",
"early-timers-wave",
"early-tomatoes-hide",
Expand All @@ -153,6 +155,7 @@
"eight-mangos-do",
"eight-plants-melt",
"eight-pots-guess",
"eighty-pens-mix",
"eighty-planets-provide",
"eighty-walls-appear",
"eleven-bananas-joke",
Expand Down Expand Up @@ -216,6 +219,7 @@
"four-ties-yawn",
"fresh-crews-lick",
"fresh-kings-join",
"fresh-turkeys-sit",
"friendly-apricots-camp",
"friendly-boats-chew",
"friendly-months-film",
Expand Down Expand Up @@ -256,6 +260,7 @@
"gorgeous-camels-mate",
"gorgeous-camels-whisper",
"gorgeous-insects-reply",
"gorgeous-schools-drive",
"gorgeous-stingrays-lay",
"great-falcons-knock",
"great-moons-suffer",
Expand Down Expand Up @@ -397,6 +402,7 @@
"metal-wolves-wave",
"mighty-bulldogs-try",
"mighty-cooks-admire",
"mighty-dragons-build",
"mighty-kings-play",
"mighty-melons-greet",
"mighty-pugs-knock",
Expand Down Expand Up @@ -535,6 +541,7 @@
"rotten-rats-protect",
"rotten-tigers-rescue",
"rotten-ways-do",
"rude-chefs-train",
"rude-cows-fry",
"rude-deers-fetch",
"rude-falcons-grow",
Expand Down Expand Up @@ -629,6 +636,7 @@
"smooth-numbers-shout",
"smooth-pets-rhyme",
"soft-apples-chew",
"soft-bees-bathe",
"soft-birds-thank",
"soft-donkeys-promise",
"soft-fireants-jog",
Expand Down
5 changes: 5 additions & 0 deletions .changeset/rare-shoes-hunt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@clerk/backend': patch
---

Trigger the handshake when no dev browser token exists in development.
2 changes: 2 additions & 0 deletions .changeset/rude-beers-confess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
2 changes: 2 additions & 0 deletions .changeset/rude-chefs-train.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
2 changes: 2 additions & 0 deletions .changeset/soft-bees-bathe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
7 changes: 7 additions & 0 deletions .changeset/unlucky-years-provide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@clerk/localizations': patch
'@clerk/clerk-js': patch
'@clerk/types': patch
---

Renaming `passkeys_pa_not_supported` to `passkey_pa_not_supported` to align with the rest passkey error codes.
2 changes: 2 additions & 0 deletions .changeset/witty-schools-occur.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
4 changes: 2 additions & 2 deletions .github/actions/init/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ runs:
steps:
- name: Configure Turborepo
id: turbo
uses: actions/github-script@v6
uses: actions/github-script@v7
env:
# envs are required to pass inputs to the script
ENABLED: ${{ inputs.turbo-enabled }}
Expand Down Expand Up @@ -109,7 +109,7 @@ runs:

- name: Cache Playwright Binaries
if: inputs.playwright-enabled == 'true'
uses: actions/cache@v3
uses: actions/cache@v4
id: playwright-cache
with:
path: ~/.cache/ms-playwright
Expand Down
23 changes: 7 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,19 @@ jobs:
formatting-linting:
name: Formatting, linting & changeset checks
runs-on: ${{ vars.RUNNER_LARGE }}
timeout-minutes: ${{ fromJSON(vars.TIMEOUT_MINUTES_NORMAL) }}
timeout-minutes: 10

env:
TURBO_SUMMARIZE: false

steps:
- name: Checkout Repo
timeout-minutes: ${{ fromJSON(vars.TIMEOUT_MINUTES_SHORT) }}
uses: actions/checkout@v4
with:
fetch-depth: 0
show-progress: false

- name: Setup
timeout-minutes: ${{ fromJSON(vars.TIMEOUT_MINUTES_SHORT) }}
id: config
uses: ./.github/actions/init
with:
Expand All @@ -44,7 +42,6 @@ jobs:
shell: bash

- name: Require Changeset
timeout-minutes: ${{ fromJSON(vars.TIMEOUT_MINUTES_SHORT) }}
if: ${{ !(github.event_name == 'merge_group') }}
run: if [ "${{ github.event.pull_request.user.login }}" = "clerk-cookie" ]; then echo 'Skipping' && exit 0; else npx changeset status --since=origin/main; fi

Expand All @@ -53,28 +50,22 @@ jobs:
shell: bash

- name: Check Formatting
timeout-minutes: ${{ fromJSON(vars.TIMEOUT_MINUTES_SHORT) }}
run: npm run format:check

- name: Build Packages
timeout-minutes: ${{ fromJSON(vars.TIMEOUT_MINUTES_SHORT) }}
run: npx turbo build $TURBO_ARGS --only

- name: Lint packages using publint
timeout-minutes: ${{ fromJSON(vars.TIMEOUT_MINUTES_SHORT) }}
run: npx turbo lint:publint $TURBO_ARGS --only

- name: Lint types using attw
timeout-minutes: ${{ fromJSON(vars.TIMEOUT_MINUTES_SHORT) }}
run: npx turbo lint:attw $TURBO_ARGS --filter=!nextjs --filter=!elements --filter=!backend --only

- name: Lint types using attw [Errors Allowed]
timeout-minutes: ${{ fromJSON(vars.TIMEOUT_MINUTES_SHORT) }}
run: npx turbo lint:attw $TURBO_ARGS --filter=nextjs --filter=backend --filter=elements --continue --only
continue-on-error: true # TODO: Remove this when all related errors are fixed
continue-on-error: true # TODO: Remove this when all related errors are fixed

- name: Run lint
timeout-minutes: ${{ fromJSON(vars.TIMEOUT_MINUTES_SHORT) }}
run: npx turbo lint $TURBO_ARGS --only -- --quiet

- name: Upload Turbo Summary
Expand All @@ -90,14 +81,14 @@ jobs:
name: Unit Tests
needs: formatting-linting
runs-on: ${{ vars.RUNNER_LARGE }}
timeout-minutes: ${{ fromJSON(vars.TIMEOUT_MINUTES_NORMAL) }}
timeout-minutes: 10

env:
TURBO_SUMMARIZE: false

strategy:
matrix:
node-version: [ 18, 20 ]
node-version: [18, 20]

steps:
- name: Checkout Repo
Expand Down Expand Up @@ -134,12 +125,12 @@ jobs:
name: Integration Tests
needs: formatting-linting
runs-on: ${{ vars.RUNNER_MEDIUM }}
timeout-minutes: ${{ fromJSON(vars.TIMEOUT_MINUTES_NORMAL) }}
timeout-minutes: 10

strategy:
matrix:
test-name: [ 'generic', 'nextjs', 'express', 'quickstart', 'ap-flows' ]
test-project: [ 'chrome' ]
test-name: ['generic', 'nextjs', 'express', 'quickstart', 'ap-flows']
test-project: ['chrome']

steps:
- name: Checkout Repo
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/e2e-cleanups.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ on:
workflow_dispatch:
schedule:
# run every 6 hours on every weekday
- cron: "0 */6 * * 1-5"
- cron: '0 */6 * * 1-5'

jobs:
integration-tests:
name: Cleanup e2e instances
runs-on: ${{ vars.RUNNER_NORMAL }}
timeout-minutes: ${{ fromJSON(vars.TIMEOUT_MINUTES_NORMAL) }}
timeout-minutes: 10

steps:
- name: Checkout Repo
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lock-threads.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ concurrency:

jobs:
action:
timeout-minutes: ${{ fromJSON(vars.TIMEOUT_MINUTES_SHORT) }}
timeout-minutes: 3
runs-on: ${{ vars.RUNNER_NORMAL }}
steps:
- uses: actions/stale@v9
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/nightly-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ jobs:
integration-tests:
name: Integration Tests
runs-on: ${{ vars.RUNNER_NORMAL }}
timeout-minutes: ${{ fromJSON(vars.TIMEOUT_MINUTES_NORMAL) }}
timeout-minutes: 10

strategy:
matrix:
test-name: [ 'nextjs' ]
test-name: ['nextjs']

steps:
- name: Checkout Repo
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/preview.retheme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ concurrency:
jobs:
preview:
runs-on: ${{ vars.RUNNER_NORMAL }}
timeout-minutes: ${{ fromJSON(vars.TIMEOUT_MINUTES_NORMAL) }}
timeout-minutes: 10
permissions:
contents: write
pull-requests: write
Expand All @@ -32,7 +32,7 @@ jobs:
turbo-signature: ${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }}
turbo-team: ${{ vars.TURBO_TEAM }}
turbo-token: ${{ secrets.TURBO_TOKEN }}
registry-url: "https://registry.npmjs.org"
registry-url: 'https://registry.npmjs.org'

- name: Build packages
run: npx turbo build $TURBO_ARGS
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,19 @@ jobs:
preview:
if: ${{ startsWith(github.event.comment.body, '!preview') && github.repository == 'clerk/javascript' && github.event.issue.pull_request }}
runs-on: ${{ vars.RUNNER_NORMAL }}
timeout-minutes: ${{ fromJSON(vars.TIMEOUT_MINUTES_NORMAL) }}
timeout-minutes: 10

env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_CLERK_PROD_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_JS_PREVIEW_PROJECT_ID }}

permissions:
contents: write
pull-requests: write

steps:
- name: Limit action to Clerk members
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
result-encoding: string
retries: 3
Expand All @@ -53,7 +55,7 @@ jobs:
turbo-signature: ${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }}
turbo-team: ${{ vars.TURBO_TEAM }}
turbo-token: ${{ secrets.TURBO_TOKEN }}
registry-url: "https://registry.npmjs.org"
registry-url: 'https://registry.npmjs.org'

- name: Build packages
run: npx turbo build $TURBO_ARGS
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release-canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
canary-release:
if: ${{ github.repository == 'clerk/javascript' }}
runs-on: ${{ vars.RUNNER_NORMAL }}
timeout-minutes: ${{ fromJSON(vars.TIMEOUT_MINUTES_NORMAL) }}
timeout-minutes: 10
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
Expand All @@ -34,7 +34,7 @@ jobs:
turbo-team: ${{ vars.TURBO_TEAM }}
turbo-token: ${{ secrets.TURBO_TOKEN }}
playwright-enabled: true # Must be present to enable caching on branched workflows
registry-url: "https://registry.npmjs.org"
registry-url: 'https://registry.npmjs.org'

- name: Version packages for canary
id: version-packages
Expand All @@ -52,7 +52,7 @@ jobs:
NPM_CONFIG_PROVENANCE: true

- name: Trigger workflows on related repos
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
result-encoding: string
retries: 3
Expand Down
Loading

0 comments on commit ffa9071

Please sign in to comment.