tinyplex / tinybase

The reactive data store for local‑first apps.
https://tinybase.org
MIT License
3.23k stars 65 forks source link

Consider using Bun for the development of TinyBase itself #137

Open gunta opened 4 months ago

gunta commented 4 months ago

Is your feature request related to a problem? Please describe. Not a big deal, but the install process of when you do npm i for TinyBase it is a bit slow.

Describe the solution you'd like Support Bun for contributors of TinyBase. Nothing really special to do other than perhaps handling the lock file.

Describe alternatives you've considered Pnpm, Yarn

Additional context

The results on my MacBook M1 Max show that the install process is around 5 times faster.

Npm

time npm i                  
npm WARN deprecated @types/prettier@3.0.0: This is a stub types definition. prettier provides its own type definitions, so you do not need this installed.
npm WARN deprecated @npmcli/move-file@1.1.2: This functionality has been moved to @npmcli/fs
npm WARN deprecated @babel/plugin-proposal-optional-catch-binding@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-catch-binding instead.
npm WARN deprecated @babel/plugin-proposal-numeric-separator@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-numeric-separator instead.
npm WARN deprecated @babel/plugin-proposal-nullish-coalescing-operator@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-nullish-coalescing-operator instead.
npm WARN deprecated @babel/plugin-proposal-class-properties@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead.
npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated @babel/plugin-proposal-optional-chaining@7.21.0: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-chaining instead.
npm WARN deprecated @babel/plugin-proposal-async-generator-functions@7.20.7: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-async-generator-functions instead.
npm WARN deprecated abab@2.0.6: Use your platform's native atob() and btoa() methods instead
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated @babel/plugin-proposal-object-rest-spread@7.20.7: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-object-rest-spread instead.
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated domexception@4.0.0: Use your platform's native DOMException instead
npm WARN deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead
npm WARN deprecated fsevents@1.2.13: The v1 package contains DANGEROUS / INSECURE binaries. Upgrade to safe fsevents v2
npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated babel-eslint@10.1.0: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
npm WARN deprecated squel@5.13.0: No longer maintained

added 2495 packages, and audited 2496 packages in 19s

326 packages are looking for funding
  run `npm fund` for details

17 vulnerabilities (1 low, 7 moderate, 7 high, 2 critical)

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.
npm i  16.35s user 14.14s system 162% cpu 18.748 total

Bun

time bun i                  
bun install v1.0.29 (a146856d)
[10.41ms] migrated lockfile from package-lock.json

 + @automerge/automerge@2.1.10
 + @automerge/automerge-repo@1.1.1
 + @babel/cli@7.23.9
 + @babel/core@7.23.9 (v7.24.0 available)
 + @babel/preset-env@7.23.9 (v7.24.0 available)
 + @babel/preset-react@7.23.3
 + @babel/preset-typescript@7.23.3
 + @prettier/sync@0.5.1
 + @rollup/plugin-image@3.0.3
 + @rollup/plugin-replace@5.0.5
 + @rollup/plugin-terser@0.4.4
 + @sqlite.org/sqlite-wasm@3.45.1-build1
 + @types/asciichart@1.5.8
 + @types/expect-puppeteer@5.0.6
 + @types/http-server@0.12.4
 + @types/jest@29.5.12
 + @types/jest-environment-puppeteer@5.0.6
 + @types/less@3.0.6
 + @types/node@20.11.20 (v20.11.25 available)
 + @types/puppeteer@5.4.7
 + @types/react@18.2.58 (v18.2.64 available)
 + @types/react-dom@18.2.19 (v18.2.21 available)
 + @types/react-test-renderer@18.0.7
 + @types/tmp@0.2.6
 + @typescript-eslint/eslint-plugin@7.0.2
 + @typescript-eslint/parser@7.0.2 (v7.1.1 available)
 + @vlcn.io/crsqlite-wasm@0.16.0
 + asciichart@1.5.25
 + babel-eslint@10.1.0
 + babel-jest@29.7.0
 + babel-plugin-transform-import-meta@2.2.1
 + babel-plugin-transform-vite-meta-env@1.0.3
 + babel-preset-minify@0.5.2
 + buffer-replace@1.0.0
 + country-flag-emoji-json@2.0.0
 + cspell@8.4.1 (v8.6.0 available)
 + electric-sql@0.9.4
 + esbuild@0.20.1
 + eslint@8.57.0
 + eslint-config-prettier@9.1.0
 + eslint-plugin-jest@27.9.0
 + eslint-plugin-jsdoc@48.2.0
 + eslint-plugin-react@7.33.2 (v7.34.0 available)
 + eslint-plugin-react-hooks@4.6.0
 + expo-sqlite@13.2.1
 + fake-indexeddb@5.0.2
 + gulp@4.0.2
 + gulp-gzip@1.4.2
 + http-server@14.1.1
 + idb@8.0.0
 + jest@29.7.0
 + jest-environment-jsdom@29.7.0
 + jest-fetch-mock@3.0.3
 + jest-puppeteer@10.0.1
 + less@4.2.0
 + partykit@0.0.93
 + partysocket@0.0.25
 + prettier@3.2.5
 + puppeteer@22.2.0
 + react@18.2.0
 + react-dom@18.2.0
 + react-test-renderer@18.2.0
 + rollup@4.12.0 (v4.12.1 available)
 + rollup-plugin-esbuild@6.1.1
 + rollup-plugin-gzip@3.1.1
 + rollup-plugin-preserve-shebang@1.0.1
 + rollup-plugin-prettier@4.1.1
 + sqlite3@5.1.7
 + tinydocs@0.1.36
 + tmp@0.2.1 (v0.2.3 available)
 + ts-unused-exports@10.0.1
 + typescript@5.3.3 (v5.4.2 available)
 + yjs@13.6.12

warn: cbor-extract's install script took 1.1s

 2045 packages installed [7.26s]
bun i  3.34s user 5.26s system 111% cpu 7.738 total
jamesgpearce commented 4 months ago

OK, very tempting (says the man with bad bandwidth too :) )