fireproof-storage / fireproof

Realtime database, runs anywhere. Install Fireproof in your front-end app or edge function, and sync data via any backend.
https://fireproof.storage
Other
219 stars 16 forks source link

Update root workspace scripts, package dependencies, and add .nvmrc #57

Closed thedanchez closed 5 months ago

thedanchez commented 5 months ago

This is a quality of maintainer/contributor life issue post 😄

I noticed that we're not making any use of recursive commands pnpm -r in the root-level package.json.

Unless there's some reason why we're not (could use background context here), I think we should incorporate that and update all the local packages/* and examples/* to install their dependencies using workspace:* or workspace:^ so that at the very least, the recursive install, build and test scripts can run successfully and consistently in the correct dependency order.

Another thing I'd like to suggest is introducing a .nvmrc file to the project to manage the required Node version (via running nvm use at the top-level). As it stands, Node 16 has reached end of life so we should be target either the latest LTS for Node 18 or 20 -- I'd personally suggest targeting Node v20.10.0.

# .nvmrc
v20.10.0

Best part about this is, staring from Node 18+, fetch is now built into the runtime so we should be able do away with cross-fetch which I saw that @fireproof/connect was using.

Would love to get thoughts from everyone on this. Feel free to poke holes and raise things I may be missing here.

thedanchez commented 5 months ago

I went and got ahead of myself in excitement and put up this PR: https://github.com/fireproof-storage/fireproof/pull/58

Can always close it if we feel it's not needed in the end.

jchris commented 5 months ago

wow yes! this is exactly what we need. I will look at the code now

jchris commented 5 months ago

merged in #58

this uncovers more work to be done, getting the examples directory clean, and fixing the react build https://github.com/fireproof-storage/fireproof/issues/59