-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Closed
Labels
bugSomething isn't workingSomething isn't workingconfirmed bugWe can reproduce this issueWe can reproduce this issuejscRelated to an issue in JavaScriptCoreRelated to an issue in JavaScriptCorenode.jsCompatibility with Node.js APIsCompatibility with Node.js APIsregression
Description
What version of Bun is running?
1.2.4+fd9a5ea66
What platform is your computer?
Darwin 24.3.0 arm64 arm
What steps can reproduce the bug?
Run the following code using node
and bun
, you can observe that Node.js returns a result for the regex, while in bun
, it logs null
:
(async () => {
const res = await fetch('https://raw.githubusercontent.com/GitbookIO/integrations/c26e594ca86bc75eaa18c4cda995dab56e21008a/integrations/arcade/assets/arcade-preview.png');
const content = await res.arrayBuffer();
const base64 = Buffer.from(content).toString('base64');
const byteRegexp = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/;
console.log(base64.match(byteRegexp));
})()
This regex might not be correct, but it should still return the same value.
What is the expected behavior?
Both Node.js and Bun should return the same results.
What do you see instead?
Bun returns null
.
Additional information
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingconfirmed bugWe can reproduce this issueWe can reproduce this issuejscRelated to an issue in JavaScriptCoreRelated to an issue in JavaScriptCorenode.jsCompatibility with Node.js APIsCompatibility with Node.js APIsregression