dual SDK builds, generated types, turbo, and changesets - #1340
Merged
Conversation
|
@success-OG Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Calebux
added a commit
that referenced
this pull request
Sep 2, 2026
Both files kept rename-form markers. Resolved to main's implementations: the branch's versions are re-export shims pointing at ./generated/contracts and ../domain/stealth, neither of which exists in main's shared/ layout. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0162MkeaKNEWK6fHdgJqHGyn
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
v2 SDK & shared packaging plus CI/DevEx for epics G and H.
closes #1301
closes #1305
closes #1309
closes #1313
#1301 Dual ESM/CJS SDK, exports map, tree-shaking
@syncro/sdknow ships ESM + CJS fromtsup, with types per condition (import/require→.d.ts/.d.cts).Subpath exports:
.,./webhooks,./stellar,./zk,./contracts,./types,./errors.sideEffects: false. Stellar helpers resolve through@syncro/shared/stellar/memoinstead of a relative source path.Proven locally:
dist/webhooksdoes not contain stellar/zk tokens (and vice versa). Sizes: webhooks 5.2KB, stellar 1.6KB, zk 4.3KBsdk/package-size.json)CI:
.github/workflows/sdk-package.yml#1305 Generated DB + contract types
Database row types are generated from
supabase/migrations→supabase/schema.snapshot.json+shared/src/generated/database.ts(60 tables, includingSubscriptionsRow). A column change in a migration changes the generatedRowtype and fails consumers until they adapt.Contract types come from
shared/src/generated/soroban-abi.json(WASM when--wasm/CONTRACT_WASM_DIRis set). Shared TS and SDK bindings share that ABI. CI also fails if an ABI function name disappears from the listed Rust source.Hand-written domain types live in
shared/src/domain/(subscription, payment, user, analytics, stealth). Old paths re-export from there.scripts/generate-schema-snapshot.shstill dumps SQL when the Supabase CLI is available, then always regenerates JSON/TS from migrations.CI:
.github/workflows/generated-types.yml(npm run check:generated)#1309 Turbo task graph, affected PRs, remote cache
Turbo 2 across
backend,client,sdk,shared, andcontracts.sdk#typecheckdepends onshared#build. PRs run--filter=...[origin/<base>]; main runs the full graph. GitHub Actions cache +TURBO_TOKEN/TURBO_TEAMfor remote cache. Hit rate is written to the job summary.Before:
npm run typecheck --workspacesplus per-package jobs with no shared task cache. After: affected-only on PRs, cached task outputs, remote cache when token is set. Record p50 from Actions after ~20 PRs.CI:
.github/workflows/turbo.yml#1313 Changesets, CI-only publish
.changeset/for@syncro/sdkand@syncro/sharedsdk/orshared/without a changeset failchangesets/action(changelog + bumps, including dependent packages)id-token: write,NPM_CONFIG_PROVENANCE=true). Localnpm publishis rejected (scripts/assert-ci-publish.mjs)CI:
.github/workflows/changeset.yml,.github/workflows/release.ymlSecrets / vars to set
TURBO_TOKEN,TURBO_TEAM(optional; enables Vercel remote cache)NPM_TOKEN(publish)Test plan
npm run generate && npm run check:generatednpm run build -w sdk && npm run check:package -w sdksdk/with no changeset and confirm the changeset job fails