Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(remix-node): use built-in atob & btoa #7206

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/early-trains-fold.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@remix-run/node": patch
---

Remove `atob`/`btoa` polyfills in favor of built-in versions
7 changes: 0 additions & 7 deletions packages/remix-node/base64.ts

This file was deleted.

7 changes: 0 additions & 7 deletions packages/remix-node/globals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import {
WritableStreamDefaultWriter as NodeWritableStreamDefaultWriter,
} from "@remix-run/web-stream";

import { atob, btoa } from "./base64";
import {
Blob as NodeBlob,
File as NodeFile,
Expand All @@ -32,9 +31,6 @@ declare global {
}

interface Global {
atob: typeof atob;
btoa: typeof btoa;

Blob: typeof Blob;
File: typeof File;

Expand All @@ -51,9 +47,6 @@ declare global {
}

export function installGlobals() {
global.atob = atob;
global.btoa = btoa;

global.Blob = NodeBlob;
global.File = NodeFile;

Expand Down