Skip to content

refactor(core): use atob and btoa instead of Buffer#72

Merged
andrascodes merged 1 commit into
mainfrom
andras/refactor-core-use-atob-and-btoa-instead-of-buffer
May 6, 2026
Merged

refactor(core): use atob and btoa instead of Buffer#72
andrascodes merged 1 commit into
mainfrom
andras/refactor-core-use-atob-and-btoa-instead-of-buffer

Conversation

@andrascodes andrascodes force-pushed the andras/refactor-core-use-atob-and-btoa-instead-of-buffer branch from ebacb9a to da2f27c Compare April 1, 2026 17:11
@andrascodes andrascodes force-pushed the core_expose_stampers branch from 54fa0c4 to 1800c58 Compare April 1, 2026 17:11
@andrascodes andrascodes force-pushed the andras/refactor-core-use-atob-and-btoa-instead-of-buffer branch from da2f27c to f3577ac Compare April 1, 2026 21:08
@andrascodes andrascodes force-pushed the core_expose_stampers branch from 1800c58 to 7c1df70 Compare April 7, 2026 11:21
@andrascodes andrascodes force-pushed the andras/refactor-core-use-atob-and-btoa-instead-of-buffer branch 2 times, most recently from 4a78517 to 068598d Compare April 7, 2026 16:17
@andrascodes andrascodes marked this pull request as ready for review April 7, 2026 16:54
Copy link
Copy Markdown
Member

@OmarBasem OmarBasem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add context on the PR description on why we are removing Buffer, is it to make it work with RN?

@andrascodes
Copy link
Copy Markdown
Collaborator Author

Can you add context on the PR description on why we are removing Buffer, is it to make it work with RN?

Yes. No Buffer in Hermes. Do you have a better alternative solution for this? I'd be happy to change it.

@andrascodes andrascodes force-pushed the andras/refactor-core-use-atob-and-btoa-instead-of-buffer branch from 068598d to c1d3e47 Compare April 20, 2026 10:11
@andrascodes andrascodes force-pushed the core_expose_stampers branch from 892cc8f to 3819862 Compare April 20, 2026 10:11
@andrascodes andrascodes force-pushed the core_expose_stampers branch from 3819862 to f3b5f87 Compare April 24, 2026 17:57
@andrascodes andrascodes force-pushed the andras/refactor-core-use-atob-and-btoa-instead-of-buffer branch from c1d3e47 to 746cf47 Compare April 24, 2026 17:57
SahilVasava
SahilVasava previously approved these changes Apr 28, 2026
Copy link
Copy Markdown
Collaborator

@SahilVasava SahilVasava left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Correctly addresses the base64url issue by doing the explicit -+, _/ conversion before atob. The Uint8Array + String.fromCharCode + btoa round-trip is the standard browser-safe pattern.

@andrascodes andrascodes force-pushed the andras/refactor-core-use-atob-and-btoa-instead-of-buffer branch from 746cf47 to f35e00b Compare May 4, 2026 13:12
@andrascodes andrascodes force-pushed the core_expose_stampers branch from f3b5f87 to dd8818e Compare May 4, 2026 13:12
@andrascodes andrascodes force-pushed the andras/refactor-core-use-atob-and-btoa-instead-of-buffer branch 3 times, most recently from 1cb09ed to 8c73809 Compare May 5, 2026 11:28
@andrascodes andrascodes force-pushed the core_expose_stampers branch from 49ad4b7 to 2ba28ae Compare May 5, 2026 11:28
@andrascodes andrascodes force-pushed the core_expose_stampers branch from 2ba28ae to ffc0e8a Compare May 5, 2026 13:22
@andrascodes andrascodes force-pushed the andras/refactor-core-use-atob-and-btoa-instead-of-buffer branch from 8c73809 to c232734 Compare May 5, 2026 13:22
@andrascodes andrascodes force-pushed the core_expose_stampers branch from ffc0e8a to 02e10cd Compare May 5, 2026 14:31
@andrascodes andrascodes force-pushed the andras/refactor-core-use-atob-and-btoa-instead-of-buffer branch from c232734 to 2c9c241 Compare May 5, 2026 14:31
@andrascodes andrascodes changed the base branch from core_expose_stampers to main May 6, 2026 12:18
@andrascodes andrascodes dismissed SahilVasava’s stale review May 6, 2026 12:18

The base branch was changed.

@andrascodes andrascodes force-pushed the andras/refactor-core-use-atob-and-btoa-instead-of-buffer branch from 2c9c241 to 8c4ba7e Compare May 6, 2026 12:18
@andrascodes andrascodes merged commit 3d9a42e into main May 6, 2026
14 of 15 checks passed
Copy link
Copy Markdown
Collaborator

@SahilVasava SahilVasava left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (re-approving after force-push). atob/btoa swap is correct; base64url ↔ base64 conversion handled symmetrically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants