mobxjs / mobx-state-tree

Full-featured reactive state management without the boilerplate
https://mobx-state-tree.js.org/
MIT License
6.99k stars 641 forks source link

Chore/use bun as a package manager and script runner #2148

Closed coolsoftwaretyler closed 9 months ago

coolsoftwaretyler commented 9 months ago

What does this PR do and why?

This PR will supercede https://github.com/mobxjs/mobx-state-tree/pull/2103 so we can more easily pull in the TypeScript upgrades from https://github.com/mobxjs/mobx-state-tree/pull/2103.

It swaps us over to using Bun as a package manager and script runner for MobX-State-Tree development.

There should be no downstream effects of this change. All scripts from package.json are compatible with Bun, but now our dependency downloads are much much faster than with yarn. This also opens the door to using the Bun test runner which is faster than Jest, and understands TypeScript by default.

I updated the docs to point people to Bun for these commands, as opposed to Yarn. And I updated our CircleCI jobs to use Bun as well (probably needs some iteration - I will check during the CI stage of this PR).

Steps to validate locally

Pull this down, remove your node_modules folder, and run bun install (assuming you already have Bun on your machine. Run any and all scrips from package.json and you'll see it all works with bun run as opposed to yarn. You can just go from top to bottom in the scripts block and verify things work as expected.

While running these tests, I also:

  1. Fixed some prettier issues in two test files
  2. Deployed the docs (that's why there are docs/API/ diffs in this PR