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

Trying bun #443

Draft
wants to merge 17 commits into
base: master
Choose a base branch
from
Draft

Trying bun #443

wants to merge 17 commits into from

Conversation

RobinTail
Copy link
Owner

No description provided.

@RobinTail RobinTail added dependencies Pull requests that update a dependency file CI/CD labels May 8, 2024
@RobinTail
Copy link
Owner Author

RobinTail commented May 8, 2024

Here is what I found out so far about bun:

  1. It is fast
  2. Benchmarking tool is not yet implemented: Implement a custom benchmark runner oven-sh/bun#6201
    a. Using bunx to run vitest bench and it stucks in CI for some reason.
    b. Fixed it by removing --bun from bunx, so it means that vitest relies on Node env for benching.
  3. Code coverage reports (lcov) are not yet implemented: Implement an lcov coverage reporter for bun test oven-sh/bun#4015

Copy link
Contributor

github-actions bot commented May 8, 2024

Performance benchmark

ae67c65

┌─────────────┬─────────┬─────────┬────────┬───────┐
│             │ 10      │ 100     │ 1000   │ 10000 │
├─────────────┼─────────┼─────────┼────────┼───────┤
│ Performance │ 5814819 │ 1006583 │ 125482 │ 14963 │
└─────────────┴─────────┴─────────┴────────┴───────┘

@RobinTail
Copy link
Owner Author

Another thing I found out about bun build:

error: Formats besides 'esm' are not implemented

No dedicated issue, only mentioned roadmap:
oven-sh/bun#159

@RobinTail
Copy link
Owner Author

And another issue - no DTS generation supported by bun build
oven-sh/bun#5141

@RobinTail
Copy link
Owner Author

RobinTail commented May 8, 2024

Another issue, link:./.. directive seems to be not handled correctly in package.json dependencies by bun.
Should use bun link I think

build.ts Show resolved Hide resolved
yarn lint
yarn test
bun run lint
bun run test
- name: Coveralls
Copy link
Owner Author

Choose a reason for hiding this comment

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

this step fails because lcov is not generated by bun test --coverage

cjs.dts.json Outdated
Copy link
Owner Author

Choose a reason for hiding this comment

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

DTS and CJS should be supported by bun builder in the future

Copy link
Owner Author

Choose a reason for hiding this comment

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

Might be a solution at least for DTS:
https://github.com/wobsoriano/bun-plugin-dts

Copy link
Owner Author

Choose a reason for hiding this comment

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

no, it does not work well at all

@RobinTail
Copy link
Owner Author

this somehow breaks dependency resolutions when running vitest

@RobinTail
Copy link
Owner Author

hanging vitest may be fixed in 2.0
vitest-dev/vitest#5047

@RobinTail
Copy link
Owner Author

Not fixed.
with --bun - hanging
without --bun can not find dependency

@RobinTail
Copy link
Owner Author

Fixed by installing the dependency it could not find

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/CD dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant