From 181428a2f33381edc9dcf32f3d1a06ca8fec6466 Mon Sep 17 00:00:00 2001 From: Aiden Cline <63023139+rekram1-node@users.noreply.github.com> Date: Thu, 10 Sep 2026 20:08:36 -0500 Subject: [PATCH] fix(codemode): use Bun's wording for the missing atob/btoa argument (#48381) --- packages/codemode/src/stdlib/web.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/codemode/src/stdlib/web.ts b/packages/codemode/src/stdlib/web.ts index 75796699d43..c67db4a17bb 100644 --- a/packages/codemode/src/stdlib/web.ts +++ b/packages/codemode/src/stdlib/web.ts @@ -5,9 +5,8 @@ import { coerceToString } from "./value.js" // WebIDL DOMString conversion: a missing argument is a TypeError, anything else stringifies. const base64 = (name: "atob" | "btoa") => sync(name, (args, node) => { - if (args.length === 0) { - throw new InterpreterRuntimeError(`${name} requires 1 argument, but only 0 were provided.`, node).as("TypeError") - } + if (args.length === 0) + throw new InterpreterRuntimeError(`${name} requires 1 argument (a string)`, node).as("TypeError") const input = coerceToString(args[0]) try { return name === "atob" ? atob(input) : btoa(input)