Skip to content

Conversation

@aspiers
Copy link
Contributor

@aspiers aspiers commented Jan 4, 2026

Summary

This PR migrates the SDK from the local packages/lexicon workspace to using the published @hypercerts-org/lexicon package (v0.10.0-beta.3) from npm. It also updates the release workflow to match the lexicon repository's approach, supporting npm Trusted Publishers and improving beta release versioning.

Main Changes

1. Lexicon Package Migration

  • Removed the entire packages/lexicon local workspace (318 files deleted)
  • Added dependency on @hypercerts-org/lexicon@0.10.0-beta.3 npm package
  • Refactored SDK to import from published package instead of local workspace
  • Eliminated LexiconRegistry class - now using direct imports from lexicon package
  • Updated all imports across sdk-core and sdk-react to use @hypercerts-org/lexicon
  • Reduced overall codebase by ~3,000 lines while improving maintainability

2. Release Workflow Improvements

  • Replaced separate release-beta.yml with unified release.yml supporting both stable and beta releases
  • Implemented npm Trusted Publishers support using GitHub OIDC tokens (no more .npmrc with auth tokens)
  • Added comprehensive publishing documentation in docs/PUBLISHING.md
  • Improved beta version commit messages to show which specific packages were versioned (e.g., sdk-core@x.y.z, sdk-react@x.y.z) instead of misleading workspace version
  • Enhanced publish output to clearly indicate which packages were actually published

3. Code Quality Improvements

  • Fixed incorrectly named Markdown files (.MD.md)
  • Added .pnpm-store/ to .gitignore and .prettierignore
  • Ran prettier across the codebase for consistent formatting
  • Suppressed expected test errors to reduce noise in test output
  • Added new validation tests for hypercert records
  • Improved test mocks and fixtures

Benefits

  1. Simplified architecture: No longer maintaining duplicate lexicon code in monorepo
  2. Single source of truth: Lexicon definitions come from dedicated published package
  3. Better versioning: Lexicon can be versioned independently and updated via dependency
  4. Cleaner releases: Improved visibility into what packages are being versioned/published
  5. Modern publishing: Using npm Trusted Publishers eliminates need for stored auth tokens
  6. Reduced maintenance: ~3,000 fewer lines of code to maintain in this repo

Migration Impact

  • All existing functionality preserved
  • Test coverage maintained/improved
  • Breaking changes handled via proper versioning in lexicon package
  • No API changes to SDK consumers

Testing

  • All existing tests updated and passing
  • New validation tests added for hypercert records
  • Verified imports work correctly from published lexicon package

🤖 Generated with Claude Code

*.MD is not a valid file suffix.  In particular AGENTS.MD will not be
honoured by some AI agents.
@changeset-bot
Copy link

changeset-bot bot commented Jan 4, 2026

🦋 Changeset detected

Latest commit: 6b36e83

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

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

@aspiers aspiers force-pushed the develop branch 3 times, most recently from 06d74ee to fae9ff1 Compare January 4, 2026 02:03
aspiers and others added 2 commits January 4, 2026 02:06
Without this patch, running tests produces verbose output with
summaries and progress indicators, and React hook tests that
intentionally trigger errors pollute the console with expected error
messages.

This is a problem because the noisy output makes it harder to identify
actual test failures and important issues when running tests across the
monorepo.

This patch solves the problem by configuring vitest with silent mode
and summary-disabled reporters in both packages, adding proper error
suppression in tests that intentionally check error conditions, and
hoisting vitest dependencies (upgraded to v4) to the root to
consolidate test infrastructure.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This supports npmjs.org Trusted Publishers.
@aspiers
Copy link
Contributor Author

aspiers commented Jan 5, 2026

Merging as discussed in team call just now.

@aspiers aspiers merged commit 7332fea into hypercerts-org:develop Jan 5, 2026
2 checks passed
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