Upgrade TypeScript, unified watcher setup#959
Conversation
|
4356ee6 to
2153354
Compare
Chriztiaan
left a comment
There was a problem hiding this comment.
Cool change, generally looks good to me.
Could you test a react-native demo using this change on a fresh clone/device? Just for my own sanity.
1945edf to
cab84e5
Compare
|
I can't get any of our RN demos to work even on However, I've set up a new expo app, added PowerSync dependencies via the pnpmfile and got that to work. I also found a TypeScript issue in the |
Thanks for checking, I'll do a test on my side too. |
|
RN demos do work on my side :) |
When working on internal SDK changes in
common, it's convenient to be able to see what needs to be changed in the individual SDK packages consuming that. Right now though, that process requires rebuilding every package in this repository, which is very slow.In the PowerSync service, one can simply run
pnpm watch:tsto run tsc everytime something changes, which is much faster than having to invokerollupon every package. Packages still have their complex build logic, but running TypeScript is the first step of that. In the future, I hope we get to make it the only step for most packages, but we're not really there yet.This also upgrades to TypeScript version 6. I mainly had to change a few
catchblocks which correctly use anunknowntype by default (but we can change that toany). We also a few packages opting in to strict type checks without really having save code - I've added!assertions to keep existing semantics. Finally, resolving types invueandnuxtis beyond broken for reasons I don't understand (it looks like types are resolved against@powersync/common/distwhile symbols are resolved against@powersync/common/lib??). A fewas anyfix this, when we split@powersync/commoninto interfaces and implementation we should be able to fix this properly.