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

[1.x] Add Bun #616

Merged
merged 1 commit into from
Sep 11, 2023
Merged

[1.x] Add Bun #616

merged 1 commit into from
Sep 11, 2023

Conversation

punyflash
Copy link
Contributor

Bun is an all-in-one high performant toolkit for JavaScript which released 1.0 version after 2 years of development. It is used as:

  • JavaScript runtime (Node.js replacement)
  • Package manager (npm, yarn, pnpm replacement)
  • Bundler (compatible with esbuild API)
  • Test runner (replacement for vitest, jest etc)
  • Package runner (replacement for npx, pnpx)

In addition to almost complete compatibility with Node.js API it introduces extra features as:

  • Compatibility with both ESM and CJS syntax at the same time
  • Support for TypeScript without transpilation
  • Internal transpiler for JSX/TSX
  • JavaScript macros
  • etc...

I think Bun is a nice tool even if only used as package manager, however I believe it may be considered as a primary bundler for Laravel in the future as well

@taylorotwell taylorotwell merged commit 886bc91 into laravel:1.x Sep 11, 2023
4 checks passed
@taylorotwell
Copy link
Member

Nice - thanks

@Jubeki
Copy link
Contributor

Jubeki commented Sep 11, 2023

@punyflash @taylorotwell for me the command sail bun --help is not working with the following error:

OCI runtime exec failed: exec failed: unable to start container process: exec: "bun": executable file not found in $PATH: unknown

Some things I tried is installing Bun as a non root user, because it is installed in /root/.bun. I executed the following commands:

sail shell
curl -fsSL https://bun.sh/install | bash # inside sail container

# Leaving the sail shell
sail bun --help` # does still not work

# It is accessible inside the shell
sail shell
bun --help # does work inside sail container

Did I do anything wrong?

@punyflash
Copy link
Contributor Author

punyflash commented Sep 11, 2023

@Jubeki, my mistake. Bun installer installs itself only for current user (root during build time). I created #617 to fix it. Installing it as npm binary will allow using it as sail user. Thanks a lot for mentioning!

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.

None yet

3 participants