Repository navigation
Fix packed web-host typecheck when @powersync/web is installed - #55
Conversation
Replace unused @ts-expect-error on the literal @powersync/web import with a narrow @ts-ignore so packed native and web consumers both compile. Add packed-consumer typecheck configurations and a release check. Closes #50. Co-authored-by: Darwin <darekaze@users.noreply.github.com>
Keep the comment from matching a real @ts-expect-error directive. Co-authored-by: Darwin <darekaze@users.noreply.github.com>
Review (FM-PS-LYNX-017 / Closes #50)Verdict: Approve for merge Reviewed against the #50 acceptance list (Issues API is 403 for this integration; criteria taken from the filed-issue prompt that opened this PR). Base No High / release-blocker in this diff. Did not expand into #38 / #51 / #53 (none of those block this typing fix). Acceptance
Core changeNarrow I independently confirmed the packed-consumer TestsAdequate for #50. CI ran the packed typecheck (~4s on the Actions runner). Static attach.ts assertions catch a revert to Residuals (not blocking)
No merge from this review. |
Closes #50.
Packed
powersync-lynx/web-hostfailed TypeScript when the optional peer@powersync/webwas installed: the unused@ts-expect-erroron the literal dynamic import insrc/web-host/attach.tsbecame TS2578. Native consumers (peer absent) still need that import to typecheck.Approach
Keep the literal
import("@powersync/web")and source-only distribution. Replace@ts-expect-errorwith a narrow@ts-ignoreso both dependency states compile:@ts-ignoreis not an error.The Host helper continues to hide optional-peer typing behind
PowerSyncWebModule/attach.@powersync/webstays an optional peer only — it is not added to the native runtime graph.Validation
Added two packed-consumer configurations and a release check:
scripts/packed-consumers/native— packed tarball, no@powersync/web, typechecks the Client barrel andpowersync-lynx/web-hostscripts/packed-consumers/web— packed tarball +@powersync/web@2.3.0, importspowersync-lynx/web-hostpnpm check-packed-consumers/test/packed-consumers.test.tsalso assert the factory stays importable and that esbuild still sees the literal Web SDK specifier.Out of scope
Does not implement #52.