feat(chrome-extension): Create js only create clerk client for extensions#7935
feat(chrome-extension): Create js only create clerk client for extensions#7935
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 176f5ba The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
!snapshot |
|
Hey @royanger - the snapshot version command generated the following package versions:
Tip: Use the snippet copy button below to quickly install the required packages. npm i @clerk/agent-toolkit@0.3.0-snapshot.v20260226185040 --save-exact
npm i @clerk/astro@3.0.0-snapshot.v20260226185040 --save-exact
npm i @clerk/backend@3.0.0-snapshot.v20260226185040 --save-exact
npm i @clerk/chrome-extension@3.0.0-snapshot.v20260226185040 --save-exact
npm i @clerk/clerk-js@6.0.0-snapshot.v20260226185040 --save-exact
npm i @clerk/dev-cli@1.0.0-snapshot.v20260226185040 --save-exact
npm i @clerk/expo@3.0.0-snapshot.v20260226185040 --save-exact
npm i @clerk/expo-passkeys@1.0.0-snapshot.v20260226185040 --save-exact
npm i @clerk/express@2.0.0-snapshot.v20260226185040 --save-exact
npm i @clerk/fastify@2.7.0-snapshot.v20260226185040 --save-exact
npm i @clerk/localizations@4.0.0-snapshot.v20260226185040 --save-exact
npm i @clerk/msw@0.0.1-snapshot.v20260226185040 --save-exact
npm i @clerk/nextjs@7.0.0-snapshot.v20260226185040 --save-exact
npm i @clerk/nuxt@2.0.0-snapshot.v20260226185040 --save-exact
npm i @clerk/react@6.0.0-snapshot.v20260226185040 --save-exact
npm i @clerk/react-router@3.0.0-snapshot.v20260226185040 --save-exact
npm i @clerk/shared@4.0.0-snapshot.v20260226185040 --save-exact
npm i @clerk/tanstack-react-start@1.0.0-snapshot.v20260226185040 --save-exact
npm i @clerk/testing@2.0.0-snapshot.v20260226185040 --save-exact
npm i @clerk/ui@1.0.0-snapshot.v20260226185040 --save-exact
npm i @clerk/upgrade@2.0.0-snapshot.v20260226185040 --save-exact
npm i @clerk/vue@2.0.0-snapshot.v20260226185040 --save-exact |
|
!snapshot |
|
Hey @royanger - the snapshot version command generated the following package versions:
Tip: Use the snippet copy button below to quickly install the required packages. npm i @clerk/agent-toolkit@0.3.0-snapshot.v20260226220202 --save-exact
npm i @clerk/astro@3.0.0-snapshot.v20260226220202 --save-exact
npm i @clerk/backend@3.0.0-snapshot.v20260226220202 --save-exact
npm i @clerk/chrome-extension@3.0.0-snapshot.v20260226220202 --save-exact
npm i @clerk/clerk-js@6.0.0-snapshot.v20260226220202 --save-exact
npm i @clerk/dev-cli@1.0.0-snapshot.v20260226220202 --save-exact
npm i @clerk/expo@3.0.0-snapshot.v20260226220202 --save-exact
npm i @clerk/expo-passkeys@1.0.0-snapshot.v20260226220202 --save-exact
npm i @clerk/express@2.0.0-snapshot.v20260226220202 --save-exact
npm i @clerk/fastify@2.7.0-snapshot.v20260226220202 --save-exact
npm i @clerk/localizations@4.0.0-snapshot.v20260226220202 --save-exact
npm i @clerk/msw@0.0.1-snapshot.v20260226220202 --save-exact
npm i @clerk/nextjs@7.0.0-snapshot.v20260226220202 --save-exact
npm i @clerk/nuxt@2.0.0-snapshot.v20260226220202 --save-exact
npm i @clerk/react@6.0.0-snapshot.v20260226220202 --save-exact
npm i @clerk/react-router@3.0.0-snapshot.v20260226220202 --save-exact
npm i @clerk/shared@4.0.0-snapshot.v20260226220202 --save-exact
npm i @clerk/tanstack-react-start@1.0.0-snapshot.v20260226220202 --save-exact
npm i @clerk/testing@2.0.0-snapshot.v20260226220202 --save-exact
npm i @clerk/ui@1.0.0-snapshot.v20260226220202 --save-exact
npm i @clerk/upgrade@2.0.0-snapshot.v20260226220202 --save-exact
npm i @clerk/vue@2.0.0-snapshot.v20260226220202 --save-exact |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis pull request refactors the 🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.changeset/wild-pianos-matter.md:
- Around line 12-15: Fix the typos in the changeset: remove the stray trailing
single quote after the semicolon in the line declaring const clerk =
createClerkClient({ publishableKey }); and correct the misspelled function name
createClerkCleint to createClerkClient in the background worker example (the
line starting with const clerk = await createClerkClient(...)); keep the
existing await and background: true options intact.
In `@packages/chrome-extension/README.md`:
- Line 81: Typo in the README: replace the misspelled token `reasct-router` with
the correct `react-router` in the bullet that begins "SyncHost, Service Workers
and `react-router`" so the displayed link text and code-formatted token read
"react-router" consistently; update only the README.md bullet text containing
`reasct-router`.
In `@playground/browser-extension-js/src/popup.ts`:
- Around line 95-100: The createInfoRow function uses innerHTML with
interpolated label/value which can allow XSS if those strings are ever
untrusted; change createInfoRow to build the row with createElement and assign
textContent (or setAttribute for classes) to the label and value spans instead
of using innerHTML so the values are escaped and not interpreted as HTML.
ℹ️ Review info
Configuration used: Repository YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled
You can enable these sources in your CodeRabbit configuration.
⛔ Files ignored due to path filters (1)
packages/chrome-extension/src/__tests__/__snapshots__/client-exports.test.ts.snapis excluded by!**/*.snap
📒 Files selected for processing (25)
.changeset/wild-pianos-matter.md.gitignorepackages/chrome-extension/README.mdpackages/chrome-extension/client/package.jsonpackages/chrome-extension/package.jsonpackages/chrome-extension/src/__tests__/client-exports.test.tspackages/chrome-extension/src/background/clerk.tspackages/chrome-extension/src/client/index.tspackages/chrome-extension/src/utils/__tests__/clerk-client.test.tspackages/chrome-extension/src/utils/clerk-client.tspackages/chrome-extension/tsup.config.tsplayground/browser-extension-js/.envplayground/browser-extension-js/.env.exampleplayground/browser-extension-js/.gitignoreplayground/browser-extension-js/README.mdplayground/browser-extension-js/build/manifest.jsonplayground/browser-extension-js/build/popup.cssplayground/browser-extension-js/build/popup.htmlplayground/browser-extension-js/esbuild.config.mjsplayground/browser-extension-js/package.jsonplayground/browser-extension-js/pnpm-workspace.yamlplayground/browser-extension-js/src/popup.tsplayground/browser-extension-js/tsconfig.jsonplayground/browser-extension/README.mdplayground/browser-extension/package.json
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
tmilewski
left a comment
There was a problem hiding this comment.
This LGTM! Just check the .env and the one CR comment. 🚀
@clerk/agent-toolkit
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/dev-cli
@clerk/expo
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/hono
@clerk/localizations
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
Description
Customers want to be able to use Clerk in JS-only Chrome Extensions, either when building new or when switching an existing extension to Clerk.
This PR adds the
/clientimport path for usingcreateClerkClient()without React.This deprecates the previous
/backgroundonly import:This also adds a JS only Chrome Extension playground in
playground/browser-extension-js.The latest snapshot works with the new Chrome Extension JS Quickstart repo
Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change
Summary by CodeRabbit
Release Notes
New Features
createClerkClient()now available from@clerk/chrome-extension/clientDeprecations
createClerkClient()from@clerk/chrome-extension/backgroundis deprecatedDocumentation