Skip to content

Commit

Permalink
feat(remix-node): use built-in atob & btoa (#7206)
Browse files Browse the repository at this point in the history
Co-authored-by: Matt Brophy <[email protected]>
  • Loading branch information
MichaelDeBoey and brophdawg11 authored Sep 1, 2023
1 parent ea0ecd6 commit f6f9644
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
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

0 comments on commit f6f9644

Please sign in to comment.