ember-cli / ember-cli

The Ember.js command line utility.

Home Page:https://cli.emberjs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add bun support for Ember CLI projects

alakameljebali opened this issue · comments

Hello Ember CLI team,

I am a fan of your project and I appreciate your work on providing a great command-line interface for Ember.js apps.

I am also using bun.sh, a fast JavaScript runtime and toolkit that includes a bundler, test runner, and npm client. I think bun.sh has some advantages over Node.js, such as speed, elegant APIs, and TypeScript support.

I would like to request a feature to add bun support for Ember CLI projects. This would allow users to run, test, and bundle their Ember.js apps using bun instead of Node.js.

I think this would be beneficial for the Ember.js community, as it would offer more choice and flexibility for developers. It would also showcase the compatibility and interoperability of bun with existing JavaScript tools and frameworks.

I am not sure how difficult or feasible this feature would be, but I hope you will consider it. Thank you for your time and attention.

Hello! I would like bun to support ember-cli as well. Bun seems very fast, but in practicality, it hasn't been very easy for any of my tools to adopt (ember-cli included!)

I tried running ember-cli with bun, and ran in to this: oven-sh/bun#5121

I'd also opened this issue: #10371 (so this #10444 may be considered a duplicate of #10371)

imo, it's not so much a feature that ember-cli supports bun, but moreso that bun needs to implement process/EventEmitter correctly 😅 (or declare a good reason why they won't, and then we can move on from there with bun-specific branching or something (but that's kinda gross)) (or, ember-cli removes it's process instanceof EventEmitter check, and either work-around the issue or do something simpler during initialization.

In particular, there is this code within ember-cli:

if (outerProcess instanceof EventEmitter === false) {

I don't know why we need to capture an outerProcess. ember-cli has been around since the Node 0.x days, so it's possible that none of this code is needed in modern node, and by removing code that not needed by Node < 16, maybe we'll accidentally be compatible with bun.