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

Add Bun runtime to BCD #18484

Open
programandoconro opened this issue Dec 27, 2022 · 11 comments
Open

Add Bun runtime to BCD #18484

programandoconro opened this issue Dec 27, 2022 · 11 comments
Labels
data:browsers 🌍 Data about browsers (versions, release dates, etc). This data is used for validation. meeting agenda 🏢 Issues or pull requests in need of discussion in a project meeting.

Comments

@programandoconro
Copy link

programandoconro commented Dec 27, 2022

What type of issue is this?

Request to add a new browser

What information was incorrect, unhelpful, or incomplete?

I was experimenting today with Bun and it actually includes fetch by default. I know Bun is still in beta but due to its recently boom in popularity, I was expecting to see in the support data.

What did you expect to see?

Bun as supporting fetch in the data.

Did you test this? If so, how?

Yep, fetch seems to work fine in Bun.

Can you link to any release notes, bugs, pull requests, or MDN pages related to this?

https://github.com/oven-sh/bun

Do you have anything more you want to share?

No response

MDN URL

https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API

MDN metadata

MDN page report details
  • Query: api.fetch
  • Report started: 2022-12-27T07:23:57.806Z
@queengooborg
Copy link
Collaborator

I haven't heard of Bun until now, but this is a request to track the Bun runtime in BCD, correct?

@programandoconro
Copy link
Author

programandoconro commented Dec 28, 2022 via email

@queengooborg
Copy link
Collaborator

Okay, so it is then -- I'll modify the issue to better represent this, and relay it to the rest of the BCD owners to get their opinion, since tracking a new runtime in BCD is a large commitment (adding an entire runtime to the infrastructure just for one or a few features would be pointless after all).

@queengooborg queengooborg changed the title api.fetch - <Bun run time not included> Add Bun runtime to BCD Dec 28, 2022
@queengooborg queengooborg added data:browsers 🌍 Data about browsers (versions, release dates, etc). This data is used for validation. meeting agenda 🏢 Issues or pull requests in need of discussion in a project meeting. labels Dec 28, 2022
@programandoconro
Copy link
Author

programandoconro commented Dec 28, 2022 via email

@whinc
Copy link

whinc commented Sep 16, 2023

bun has released v1.0.0 at September 8, 2023

@lgarron
Copy link
Contributor

lgarron commented Sep 17, 2023

I would be really glad to see this in browser compat data. Where node-ts and deno walked, bun is running.

It is by far the most straightforward way to run TypeScript code without a compilation step — both for server code and client code. A lot of web-compatible code (e.g. web workers, to name just one example) runs in bun with zero modification, making it extremely simple to iterate and test code without separate build steps of polyfills. It is an ideal tool for coding anything using web technologies.

I expect that I will be starting to orient my personal web development flow around what is available in browsers and bun, at least as much as node compatibility, and I'd be glad to be able to use MDN as a reference for that.

@queengooborg
Copy link
Collaborator

Hey all! We have discussed adding Bun to BCD in the most recent BCD meeting. We have guidelines for adding new browsers (see the corresponding docs), and only the last two are currently met.

To track Bun in BCD, we will need the following:

  • a compelling downstream-consumer story (e.g., MDN or caniuse express an interest, or someone is planning to do something with the data that might plausibly grow BCD's reach)
  • reviewers (e.g., two or more people with interest and ability to test data relating to new and existing releases, or at least one reviewer acting on behalf of the vendor)

In other words, we will need interest from either the rest of MDN (https://github.com/mdn/yari), CanIUse (https://www.caniuse.com), or another large consumer of BCD (such as JetBrains or Visual Studio). We will also need contributors who are interested and able to review data relating to Bun, either two independent individuals or one individual associated with Bun who is willing to maintain Bun-related data.

@lgarron
Copy link
Contributor

lgarron commented Sep 27, 2023

  • reviewers (e.g., two or more people with interest and ability to test data relating to new and existing releases, or at least one reviewer acting on behalf of the vendor)

I'd be happy to volunteer as an independent reviewer.

Is there data on roughly how much work load this is initially, and then on an ongoing basis?

(It looks like there are ≈1800 entries for both deno and node at the moment, I assume they got added in smaller batches?)

@queengooborg
Copy link
Collaborator

Thank you for your interest, @lgarron! Apologies for not responding until now -- we at Open Web Docs have been working hard on another project (see openwebdocs/project#168), and this had slipped off of our radar.

For the most part, I would say that the compatibility data for Bun can be added over time, so the initial work can be performed in smaller batches. The responsibility for a reviewer for an engine would be the following:

  • Add compatibility data for the browser/runtime where we do not have any (in other words, test for what version a feature was implemented in, and add it to BCD)
  • Review others' PRs and confirm their accuracy, using release notes, manual testing, or source code commit verification
  • When a new version of the browser/runtime is released, determine what new features were implemented and update BCD accordingly

For web browsers, we have a system implemented to do this automatically (https://mdn-bcd-collector.gooborg.com) by running code for many features and collecting the results, then compiling them into BCD changes. However, it is not yet designed to run in standalone JS runtimes like Node.js, Deno and Bun, so we must rely on contributors to maintain that data. We aim to implement support in the future, but that has also been on our backburner. (If anyone's interested in contributing to add support, however, I will happily review and accept PRs related to that goal!)

@queengooborg
Copy link
Collaborator

Hey all! I wanted to give an update on where we're at in regards to adding Bun.

A sister project called runtime-compat-data by UnJS was developed and launched recently, which uses the collector and its tests to detect compatibility and generate a support report for various runtimes, including NodeJS, Deno and Bun.

Because it uses the collector, the results generated are in the same structure as BCD. As such, we have been able to use it to update our own NodeJS and Deno data!

I'm going to revisit the idea of adding Bun in our next BCD meeting call!

@chardoncs
Copy link

chardoncs commented Sep 25, 2024

I support adding Bun to BCD. Bun had become stable, and has been gaining popularity.

I think the only problem is Bun is still young (although it's stable now) and iterating very fast imo. Idk if the MDN team can catch the pace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:browsers 🌍 Data about browsers (versions, release dates, etc). This data is used for validation. meeting agenda 🏢 Issues or pull requests in need of discussion in a project meeting.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants