⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

@jacekradko
Copy link
Member

@jacekradko jacekradko commented Jan 22, 2026

Summary

  • Replaces global.btoa with globalThis.btoa in the encodeB64 function

globalThis is the standard way to access the global object across different JavaScript environments (browser, Node.js, workers, etc.), while global is Node.js-specific and may cause issues in other environments.

Test plan

  • Existing tests pass

Summary by CodeRabbit

  • Chores
    • Internal compatibility improvements to ensure consistent behavior across different JavaScript runtime environments.
    • Patch version bump for the shared package to roll out the compatibility fix.

✏️ Tip: You can customize this high-level summary in your review settings.

@changeset-bot
Copy link

changeset-bot bot commented Jan 22, 2026

🦋 Changeset detected

Latest commit: 634a7ff

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 20 packages
Name Type
@clerk/shared Patch
@clerk/agent-toolkit Patch
@clerk/astro Patch
@clerk/backend Patch
@clerk/chrome-extension Patch
@clerk/clerk-js Patch
@clerk/expo-passkeys Patch
@clerk/expo Patch
@clerk/express Patch
@clerk/fastify Patch
@clerk/localizations Patch
@clerk/msw Patch
@clerk/nextjs Patch
@clerk/nuxt Patch
@clerk/react-router Patch
@clerk/react Patch
@clerk/tanstack-react-start Patch
@clerk/testing Patch
@clerk/ui Patch
@clerk/vue Patch

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

@vercel
Copy link

vercel bot commented Jan 22, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
clerk-js-sandbox Ready Ready Preview, Comment Jan 22, 2026 6:29pm

Request Review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 22, 2026

📝 Walkthrough

Walkthrough

The change updates the encodeB64 function in the encoders module to use globalThis.btoa instead of global.btoa for accessing the base64 encoder. The functional behavior of the encoding remains unchanged. No exported or public declarations were added, removed, or modified.

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely describes the main change: replacing global with globalThis in the encodeB64 function, which matches the actual code modifications.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 22, 2026

Open in StackBlitz

@clerk/agent-toolkit

npm i https://pkg.pr.new/@clerk/agent-toolkit@7648

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@7648

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@7648

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@7648

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@7648

@clerk/dev-cli

npm i https://pkg.pr.new/@clerk/dev-cli@7648

@clerk/expo

npm i https://pkg.pr.new/@clerk/expo@7648

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@7648

@clerk/express

npm i https://pkg.pr.new/@clerk/express@7648

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@7648

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@7648

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@7648

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@7648

@clerk/react

npm i https://pkg.pr.new/@clerk/react@7648

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@7648

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@7648

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@7648

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@7648

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@7648

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@7648

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@7648

commit: 634a7ff

@jacekradko jacekradko merged commit cfa70ce into main Jan 22, 2026
40 checks passed
@jacekradko jacekradko deleted the fix/gloabl-error branch January 22, 2026 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants