Skip to content

Upgrade TypeScript, unified watcher setup#959

Merged
simolus3 merged 13 commits into
mainfrom
unified-typescript-build
May 29, 2026
Merged

Upgrade TypeScript, unified watcher setup#959
simolus3 merged 13 commits into
mainfrom
unified-typescript-build

Conversation

@simolus3

@simolus3 simolus3 commented May 13, 2026

Copy link
Copy Markdown
Contributor

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:ts to run tsc everytime something changes, which is much faster than having to invoke rollup on 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 catch blocks which correctly use an unknown type by default (but we can change that to any). 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 in vue and nuxt is beyond broken for reasons I don't understand (it looks like types are resolved against @powersync/common/dist while symbols are resolved against @powersync/common/lib??). A few as any fix this, when we split @powersync/common into interfaces and implementation we should be able to fix this properly.

@changeset-bot

changeset-bot Bot commented May 13, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: cab84e5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Base automatically changed from pnpm11 to main May 14, 2026 09:45
@simolus3 simolus3 force-pushed the unified-typescript-build branch from 4356ee6 to 2153354 Compare May 28, 2026 12:10
@simolus3 simolus3 marked this pull request as ready for review May 28, 2026 12:27
@simolus3 simolus3 requested a review from Chriztiaan May 28, 2026 12:28

@Chriztiaan Chriztiaan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Chriztiaan
Chriztiaan previously approved these changes May 28, 2026
@simolus3 simolus3 force-pushed the unified-typescript-build branch from 1945edf to cab84e5 Compare May 29, 2026 07:11
@simolus3

Copy link
Copy Markdown
Contributor Author

I can't get any of our RN demos to work even on main, they just render a black screen for me... I'll see if I can upgrade a few demos to a more recent RN version, but that seems to break a lot.

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 demos:inject script which is fixed now.

@Chriztiaan

Copy link
Copy Markdown
Contributor

I can't get any of our RN demos to work even on main, they just render a black screen for me... I'll see if I can upgrade a few demos to a more recent RN version, but that seems to break a lot.

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 demos:inject script which is fixed now.

Thanks for checking, I'll do a test on my side too.

@Chriztiaan

Copy link
Copy Markdown
Contributor

RN demos do work on my side :)

@simolus3 simolus3 merged commit 5f65b5f into main May 29, 2026
15 of 16 checks passed
@simolus3 simolus3 deleted the unified-typescript-build branch May 29, 2026 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants