Skip to content

Commit bce6afb

Browse files
author
Jacek Radko
authored
Merge branch 'main' into fredrik/eslint-plugin-path-matching
2 parents b945c14 + 2492043 commit bce6afb

340 files changed

Lines changed: 11942 additions & 1248 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.

‎.changeset/clean-chairs-go.md‎

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

‎.changeset/config.json‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,15 @@
88
],
99
"commit": false,
1010
"ignore": [],
11-
"fixed": [],
11+
"fixed": [
12+
[
13+
"@clerk/electron-passkeys",
14+
"@clerk/electron-passkeys-darwin-arm64",
15+
"@clerk/electron-passkeys-darwin-x64",
16+
"@clerk/electron-passkeys-win32-arm64-msvc",
17+
"@clerk/electron-passkeys-win32-x64-msvc"
18+
]
19+
],
1220
"linked": [],
1321
"access": "public",
1422
"baseBranch": "origin/main",
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@clerk/eslint-plugin': patch
3+
---
4+
5+
Handle non-promise return types when `require-auth-protection` rule fixer makes the function `async`.
6+
7+
The eslint rule fixer will now wrap a non-promise return type with `Promise<>` to produce valid TypeScript.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@clerk/eslint-plugin': patch
3+
---
4+
5+
The `require-auth-protection` fixer now matches the string quote style of existing imports when inserting a new `auth` import.
6+
7+
Previously, new imports always used single quotes regardless of how other imports in the file were quoted.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@clerk/eslint-plugin': patch
3+
---
4+
5+
The `require-auth-protection` rule now accepts OR-conditions like `if (!isAuthenticated || otherCondition)` when determining if a resource is protected.
6+
7+
Previously, only bare auth checks such as `if (!isAuthenticated)` were recognized. Guards with only `||` are safe but were incorrectly reported as missing protection.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

‎.changeset/nine-lies-eat.md‎

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@clerk/clerk-js': patch
3+
---
4+
5+
Prevent a cross-tab broadcast failure from evicting a freshly cached session token. Previously, if broadcasting a token update to other tabs threw (for example when the `BroadcastChannel` was racing a close), the token that was just cached got dropped and the next `getToken()` made an unnecessary network request. The broadcast is now isolated so a failure no longer discards a valid cached token.

‎.claude/settings.json‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,17 @@
2323
"Bash(cat secrets/**:*)",
2424
"Bash(cat **/.keys.json:*)"
2525
]
26+
},
27+
"hooks": {
28+
"SessionStart": [
29+
{
30+
"hooks": [
31+
{
32+
"type": "command",
33+
"command": "echo '{\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"This is the clerk/javascript SDK monorepo. A project skill named clerk-monorepo documents the repo setup, the pnpm + turbo dev loop, the package map, and the hard rules for changesets, conventional commits, and PRs. Invoke it via the Skill tool (skill: clerk-monorepo) before building, testing, committing, changing any package, or opening a PR in this repo.\"}}'"
34+
}
35+
]
36+
}
37+
]
2638
}
2739
}
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
name: Electron Passkeys Native Build
2+
3+
on:
4+
workflow_dispatch:
5+
6+
concurrency:
7+
group: electron-passkeys-${{ github.head_ref || github.ref }}
8+
cancel-in-progress: true
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
build:
15+
name: Build ${{ matrix.settings.target }}
16+
runs-on: ${{ matrix.settings.host }}
17+
timeout-minutes: 30
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
settings:
22+
- host: macos-14
23+
target: aarch64-apple-darwin
24+
- host: macos-14
25+
target: x86_64-apple-darwin
26+
- host: windows-latest
27+
target: x86_64-pc-windows-msvc
28+
- host: windows-latest
29+
target: aarch64-pc-windows-msvc
30+
defaults:
31+
run:
32+
working-directory: packages/electron-passkeys
33+
steps:
34+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
35+
with:
36+
persist-credentials: false
37+
38+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
39+
with:
40+
node-version: 24
41+
42+
- uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
43+
44+
- uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
45+
with:
46+
toolchain: stable
47+
targets: ${{ matrix.settings.target }}
48+
49+
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
50+
with:
51+
workspaces: packages/electron-passkeys
52+
53+
- name: Install dependencies
54+
run: pnpm install --filter @clerk/electron-passkeys... --frozen-lockfile --ignore-scripts
55+
working-directory: .
56+
57+
- name: Build native module
58+
run: pnpm build:native --target ${{ matrix.settings.target }}
59+
60+
- name: Smoke test (host-native targets only)
61+
if: matrix.settings.target == 'aarch64-apple-darwin' || matrix.settings.target == 'x86_64-pc-windows-msvc'
62+
run: node -e "const m = require('./index.js'); console.log('isAvailable:', m.isAvailable(), 'capabilities:', JSON.stringify(m.capabilities())); if (!m.isAvailable()) throw new Error('the loader did not find the freshly built native binary');"
63+
64+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
65+
with:
66+
name: bindings-${{ matrix.settings.target }}
67+
path: packages/electron-passkeys/electron-passkeys.*.node
68+
if-no-files-found: error
69+
70+
package:
71+
name: Assemble platform packages
72+
needs: build
73+
runs-on: blacksmith-8vcpu-ubuntu-2204
74+
timeout-minutes: 10
75+
defaults:
76+
run:
77+
working-directory: packages/electron-passkeys
78+
steps:
79+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
80+
with:
81+
persist-credentials: false
82+
83+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
84+
with:
85+
node-version: 24
86+
87+
- uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
88+
89+
- name: Install dependencies
90+
run: pnpm install --filter @clerk/electron-passkeys... --frozen-lockfile --ignore-scripts
91+
working-directory: .
92+
93+
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
94+
with:
95+
path: packages/electron-passkeys/artifacts
96+
97+
- name: Move binaries into per-platform npm packages
98+
run: pnpm artifacts
99+
100+
- name: Verify every platform package contains its binary
101+
run: node scripts/check-electron-passkeys-binaries.mjs packages/electron-passkeys/npm
102+
working-directory: .
103+
104+
- name: Upload assembled platform binaries
105+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
106+
with:
107+
name: electron-passkeys-npm
108+
path: packages/electron-passkeys/npm/**/*.node
109+
if-no-files-found: error
110+
retention-days: 90

0 commit comments

Comments
 (0)