Skip to content

chore(sdk): packaging hardening + bump ethereum-contracts to 1.15.2#75

Merged
kasparkallas merged 3 commits into
mainfrom
chore/sdk-packaging-hardening
Jul 2, 2026
Merged

chore(sdk): packaging hardening + bump ethereum-contracts to 1.15.2#75
kasparkallas merged 3 commits into
mainfrom
chore/sdk-packaging-hardening

Conversation

@kasparkallas

@kasparkallas kasparkallas commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

This PR bundles two related SDK changes on one branch. Combined, the changesets bump @sfpro/sdk 0.2.2 → 0.2.3 (both patch).

1 · Packaging hardening

@sfpro/sdk stays ESM-only (correct for how it's consumed). This closes two gaps: the npm tarball shipped junk (no files allowlist) and nothing protected the export/type contract in CI. Grew out of reviewing an ESM/CJS consumer-compatibility hand-off.

  • files: ["dist"] — tarball now ships only dist/ (plus package.json, LICENSE); no more src/, tests, wagmi.config.ts / vitest.config.ts / tsconfig.json, .turbo/, or .env.example.
  • Add LICENSE (MIT).
  • engines.node >= 18.
  • Validation gatecheck:package (attw --pack --profile esm-only && publint) wired into ci.yml and sdk-release.yml (pre-publish) to lock the export/type contract.
  • Docs — "Module format (ESM / CommonJS)" section in installation.mdx (await import() any Node / require() Node 20.19+ for the data entrypoints).
  • Fixed repository.url to the git+… form publint wants.

2 · Bump @superfluid-finance/ethereum-contracts 1.15.1 → 1.15.2 + regenerate

Regenerating against 1.15.2 drops the SuperTokenFactory canonical ERC20 wrapper API, removed upstream (confirmed intentional).

⚠️ Heads-up for consumers — the following exports are removed (shipped as a patch per maintainer decision):

  • Actions (6): read/write/simulate variants of SuperTokenFactory{GetCanonicalErc20Wrapper, ComputeCanonicalErc20WrapperAddress, CreateCanonicalErc20Wrapper, InitializeCanonicalWrapperSuperTokens}
  • Hooks (6): the corresponding use* variants.

createERC20Wrapper and all other SuperTokenFactory functions are unaffected; no whole contract ABI was dropped. The rest of the regen diff is cosmetic — the OpenZeppelin v5.6.1 SafeCast error rename (SafeCastOverflowedIntToUintSafeCastOverflowedIntDowncast) across several contracts. @superfluid-finance/metadata is already at the latest stable (1.6.3), so no bump there.

Verification

  • pnpm --filter=@sfpro/sdk build / typecheck — clean.
  • pnpm --filter=@sfpro/sdk test:unit — 4/4 pass.
  • pnpm --filter=@sfpro/sdk check:package — attw green (esm-only), publint "All good".
  • pnpm changeset status — @sfpro/sdk bumps at patch (→ 0.2.3).
  • npm pack --dry-run — tarball top-level is LICENSE, dist, package.json only.

🤖 Generated with Claude Code

- Add "files": ["dist"] so the tarball ships only dist (+ package.json,
  LICENSE), dropping src, tests, configs, .turbo, and .env.example
- Add MIT LICENSE to the published package
- Declare engines.node >= 18
- Add attw (--profile esm-only) + publint gate as check:package, wired into
  CI and the release workflow to lock the export/type-resolution contract
- Document the ESM/CommonJS consumption story in the SDK docs
- Fix repository.url to the git+ URL form publint expects

Package stays ESM-only; no API or runtime changes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
superfluid-cms Ready Ready Preview, Comment Jul 1, 2026 2:46pm
superfluid-data Ready Ready Preview, Comment Jul 1, 2026 2:46pm
superfluid-pro-website Ready Ready Preview, Comment Jul 1, 2026 2:46pm
superfluid-sdk-docs Ready Ready Preview, Comment Jul 1, 2026 2:46pm

Request Review

Regenerating against @superfluid-finance/ethereum-contracts 1.15.2 drops the
SuperTokenFactory canonical ERC20 wrapper API, which was removed upstream:

- Removed actions (6): read/write/simulate variants of SuperTokenFactory
  {GetCanonicalErc20Wrapper, ComputeCanonicalErc20WrapperAddress,
  CreateCanonicalErc20Wrapper, InitializeCanonicalWrapperSuperTokens}
- Removed hooks (6): the corresponding use* variants

createERC20Wrapper and all other SuperTokenFactory functions are unaffected.
Also refreshes the OpenZeppelin SafeCast error inherited across several
contracts (SafeCastOverflowedIntToUint -> SafeCastOverflowedIntDowncast)
from the OZ v5.6.1 submodule bump.

BREAKING CHANGE: SuperTokenFactory canonical-wrapper actions and hooks removed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Downgrade the changeset from minor to patch per maintainer decision; the
combined release is now 0.2.2 -> 0.2.3. The removed SuperTokenFactory
canonical-wrapper exports are still listed in the changelog entry.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

1 participant