tinybase icon indicating copy to clipboard operation
tinybase copied to clipboard

Consider using Bun for the development of TinyBase itself

Open gunta opened this issue 1 year ago • 1 comments

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/[email protected]: This is a stub types definition. prettier provides its own type definitions, so you do not need this installed.
npm WARN deprecated @npmcli/[email protected]: This functionality has been moved to @npmcli/fs
npm WARN deprecated @babel/[email protected]: 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/[email protected]: 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/[email protected]: 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/[email protected]: 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 [email protected]: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated @babel/[email protected]: 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/[email protected]: 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 [email protected]: Use your platform's native atob() and btoa() methods instead
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated @babel/[email protected]: 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 [email protected]: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated [email protected]: Use your platform's native DOMException instead
npm WARN deprecated [email protected]: Please use @jridgewell/sourcemap-codec instead
npm WARN deprecated [email protected]: The v1 package contains DANGEROUS / INSECURE binaries. Upgrade to safe fsevents v2
npm WARN deprecated [email protected]: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated [email protected]: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
npm WARN deprecated [email protected]: 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/[email protected]
 + @automerge/[email protected]
 + @babel/[email protected]
 + @babel/[email protected] (v7.24.0 available)
 + @babel/[email protected] (v7.24.0 available)
 + @babel/[email protected]
 + @babel/[email protected]
 + @prettier/[email protected]
 + @rollup/[email protected]
 + @rollup/[email protected]
 + @rollup/[email protected]
 + @sqlite.org/[email protected]
 + @types/[email protected]
 + @types/[email protected]
 + @types/[email protected]
 + @types/[email protected]
 + @types/[email protected]
 + @types/[email protected]
 + @types/[email protected] (v20.11.25 available)
 + @types/[email protected]
 + @types/[email protected] (v18.2.64 available)
 + @types/[email protected] (v18.2.21 available)
 + @types/[email protected]
 + @types/[email protected]
 + @typescript-eslint/[email protected]
 + @typescript-eslint/[email protected] (v7.1.1 available)
 + @vlcn.io/[email protected]
 + [email protected]
 + [email protected]
 + [email protected]
 + [email protected]
 + [email protected]
 + [email protected]
 + [email protected]
 + [email protected]
 + [email protected] (v8.6.0 available)
 + [email protected]
 + [email protected]
 + [email protected]
 + [email protected]
 + [email protected]
 + [email protected]
 + [email protected] (v7.34.0 available)
 + [email protected]
 + [email protected]
 + [email protected]
 + [email protected]
 + [email protected]
 + [email protected]
 + [email protected]
 + [email protected]
 + [email protected]
 + [email protected]
 + [email protected]
 + [email protected]
 + [email protected]
 + [email protected]
 + [email protected]
 + [email protected]
 + [email protected]
 + [email protected]
 + [email protected]
 + [email protected] (v4.12.1 available)
 + [email protected]
 + [email protected]
 + [email protected]
 + [email protected]
 + [email protected]
 + [email protected]
 + [email protected] (v0.2.3 available)
 + [email protected]
 + [email protected] (v5.4.2 available)
 + [email protected]

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

gunta avatar Mar 09 '24 05:03 gunta

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

jamesgpearce avatar Mar 11 '24 20:03 jamesgpearce

I got pretty far with this but there were incompatibilities with some of the third-party SQLite dependencies (at runtime). Sad because the package management was much faster!

jamesgpearce avatar Mar 30 '25 23:03 jamesgpearce