Skip to content

Add missing Bun compatibility data#28592

Merged
caugner merged 3 commits intomdn:mainfrom
The-Fiery-Fire:bun/ensure-added
Dec 12, 2025
Merged

Add missing Bun compatibility data#28592
caugner merged 3 commits intomdn:mainfrom
The-Fiery-Fire:bun/ensure-added

Conversation

@RiskyMH
Copy link
Contributor

@RiskyMH RiskyMH commented Dec 7, 2025

Summary

There are many things that are missing Bun, so this PR just tries to ensure its accurate!

Test results and supporting details

Worth noting I did use claude code to initially make this diff where it found examples and tried to run the code, but I manually checked most and they seemed to work as expected in Bun (especially checked ones that node/deno doesn't claim here right now)

Also it may be worth for consistency in another pr to have more false entries where node/deno has it.

Related issues

@github-actions github-actions bot added data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API data:js Compat data for JS/ECMAScript features. https://developer.mozilla.org/docs/Web/JavaScript size:l [PR only] 101-1000 LoC changed labels Dec 7, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 7, 2025

Tip: Review these changes grouped by change (recommended for most PRs), or grouped by feature (for large PRs).

@caugner
Copy link
Contributor

caugner commented Dec 9, 2025

@alii Could you help us review these changes? If so, I would recommend looking at the grouped changes in the automated comment above.

@alii
Copy link
Contributor

alii commented Dec 9, 2025

Yep, will find some time today. Thank you @RiskyMH for all of these

@alii
Copy link
Contributor

alii commented Dec 9, 2025

These changes look fine and are certainly more accurate than the status quo, so LGTM assuming it's acceptable to reconcile any mistakes in the near future (likely this week, if any).

Since these changes look "plausibly accurate" @RiskyMH, I've put a message in Bun's team chat asking about the level of confidence we can have in this and future similar changes.

Comment on lines 282 to 284
"safari": {
"version_added": false
},
Copy link
Contributor

@caugner caugner Dec 10, 2025

Choose a reason for hiding this comment

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

Note: If Bun supports this, Safari might support this as well!?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I feel like deno & nodejs also should support this too

https://developer.mozilla.org/en-US/docs/Web/API/DOMException#browser_compatibility

Comment on lines 80 to 82
"safari": {
"version_added": false
},
Copy link
Contributor

@caugner caugner Dec 10, 2025

Choose a reason for hiding this comment

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

Note: If Bun supports this, Safari might support this as well!?

Copy link
Contributor

Choose a reason for hiding this comment

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

There is no collector test for this yet.

@RiskyMH Can you share how you tested this? Maybe we can add this as a custom collector test.

Copy link
Contributor Author

@RiskyMH RiskyMH Dec 12, 2025

Choose a reason for hiding this comment

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

Yeah a few of these I wasn't as sure how they worked, so as I mentioned earlier I used claude somewhat to make some initial tests for it. I did check it code & explanation to see if they sounded reasonable to what the docs on mdn had and all though.

For this one in particular it seemed like all it meant was using ArrayBuffer instead of a SharedArrayBuffer

// code it generated to test
Atomics.load(new Int32Array(new ArrayBuffer(4)), 0) // => 0 (not throw)

It's another one of the cases where everywhere I tested it also seemed supported too, which i personally hope but it makes it harder to know if it was a bad test


so if this was wrong, I'm sorry and yeah can remove it

Co-authored-by: Claas Augner <495429+caugner@users.noreply.github.com>
@RiskyMH
Copy link
Contributor Author

RiskyMH commented Dec 10, 2025

Also I moved my fork to personal acc so you guys can actually interact with it unlike last time 🤣

Copy link
Contributor

@caugner caugner left a comment

Choose a reason for hiding this comment

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

LGTM, all plausible.

@caugner caugner merged commit 4a3cf27 into mdn:main Dec 12, 2025
8 checks passed
@RiskyMH RiskyMH deleted the bun/ensure-added branch December 12, 2025 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API data:js Compat data for JS/ECMAScript features. https://developer.mozilla.org/docs/Web/JavaScript size:l [PR only] 101-1000 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants