Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR switches the package manager used in this project to Bun.
Why migrate to Bun?
One reason for migrating is the faster installation speed, but that’s not the primary motivation. The main benefit of using Bun is that it helps save disk space. Yarn creates a
node_modules
directory for every workspace, even when packages share the same version. In contrast, Bun typically creates anode_modules
directory only at the project root, significantly reducing disk space usage.Addressing Version Mismatch Issues
There were issues where Bun caused version mismatches, leading to test failures.
These failing tests have been resolved in this PR. Most test failures stemmed from type mismatches. For example, the current version of Hono includes a TypeScript property,
status
, to improve user experience, which didn’t exist in older versions. Adding such TypeScript properties caused issues when test code in this project usedEqual
, as shown below:In this PR, the issue is resolved by using
expectTypeOf<Actual>().toMatchObjectType<Expected>()
. This approach doesn’t require exact equality, only compatibility between types.Additionally, with Bun, you can specify a particular version of Hono in
devDependencies
. If a different Hono version is listed indevDependencies
, Bun creates a separatenode_modules
directory to maintain compatibility.The Author Should Do the Following, if Applicable
yarn changeset
at the root of this repo and push the changeset