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 support. #15

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Add bun support. #15

wants to merge 3 commits into from

Conversation

acopier
Copy link

@acopier acopier commented May 6, 2024

This PR Adds support for Bun, a blazingly fast JS runtime, package manager and much more.

closes #13

@Dionysusnu
Copy link

New iteration of roblox-ts/roblox-ts#2485

Copy link

@Dionysusnu Dionysusnu left a comment

Choose a reason for hiding this comment

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

a blazingly fast JS runtime

Note that this won't allow you to use Bun's runtime itself, just the package manager. You'd need to change the compiler itself to support the runtime. We've tried in the past, and it turned out to be quite a lot of work.

src/commands/init.ts Outdated Show resolved Hide resolved
src/commands/init.ts Outdated Show resolved Hide resolved
@acopier
Copy link
Author

acopier commented May 9, 2024

@Dionysusnu status?

@acopier acopier requested a review from Dionysusnu May 9, 2024 09:53
@acopier
Copy link
Author

acopier commented Jun 1, 2024

@Dionysusnu status?

?

@Dionysusnu
Copy link

Dionysusnu commented Jun 1, 2024

Apologies for missing your first message, but I'm not the maintainer of roblox-ts, just a contributor.

@acopier
Copy link
Author

acopier commented Jun 2, 2024

@osyrisrblx do you mind looking at this?

Copy link

@Dionysusnu Dionysusnu left a comment

Choose a reason for hiding this comment

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

I've looked into it some more, and I think it's a better option to stick with npm init -y for the init command. As explained in the earlier comment, bun can only work as a package manager for roblox-ts, the runtime isn't compatible. Therefore, I think it's better to init with npm, which just creates the package.json. The things bun init does on top of that are either incorrect for roblox-ts, or already covered by other parts of the init process.

I've left suggestions on how to add this in the code.

src/commands/init.ts Show resolved Hide resolved
src/commands/init.ts Show resolved Hide resolved
src/commands/init.ts Show resolved Hide resolved
@acopier
Copy link
Author

acopier commented Aug 31, 2024

I've looked into it some more, and I think it's a better option to stick with npm init -y for the init command. As explained in the earlier comment, bun can only work as a package manager for roblox-ts, the runtime isn't compatible. Therefore, I think it's better to init with npm, which just creates the package.json. The things bun init does on top of that are either incorrect for roblox-ts, or already covered by other parts of the init process.

I've left suggestions on how to add this in the code.

We cannot depend on NPM, some users don't even have NPM installed.

@Dionysusnu
Copy link

My previous comment (in the suggestion thread) applies:

If only bun is installed, I don't think we can reasonably provide the bun init option, because we wouldn't get the correct defaults for package.json.

@acopier
Copy link
Author

acopier commented Aug 31, 2024

My previous comment (in the suggestion thread) applies:

If only bun is installed, I don't think we can reasonably provide the bun init option, because we wouldn't get the correct defaults for package.json.

I think the condition check is enough.

@Dionysusnu
Copy link

What do you mean by condition check?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for Bun
2 participants