Skip to content

ci(changesets): version packages#64

Merged
solidsnakedev merged 1 commit into
mainfrom
changeset-release/main
Nov 20, 2025
Merged

ci(changesets): version packages#64
solidsnakedev merged 1 commit into
mainfrom
changeset-release/main

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

@evolution-sdk/evolution@0.2.2

Patch Changes

  • #63 7bb1da3 Thanks @solidsnakedev! - Improve Variant type inference with PropertyKey constraint

    The Variant helper now accepts PropertyKey (string | number | symbol) as variant keys instead of just strings, enabling more flexible discriminated union patterns.

    Before:

    // Only string keys were properly typed
    const MyVariant = TSchema.Variant({
      Success: { value: TSchema.Integer },
      Error: { message: TSchema.ByteArray }
    })

    After:

    // Now supports symbols and numbers as variant keys
    const MyVariant = TSchema.Variant({
      Success: { value: TSchema.Integer },
      Error: { message: TSchema.ByteArray }
    })
    // Type inference is improved, especially with const assertions

    Replace @ts-expect-error with as any following Effect patterns

    Improved code quality by replacing forbidden @ts-expect-error directives with explicit as any type assertions, consistent with Effect Schema's approach for dynamic object construction.

    Add comprehensive Cardano Address type support

    Added full CBOR encoding support for Cardano address structures with Aiken compatibility:

    const Credential = TSchema.Variant({
      VerificationKey: { hash: TSchema.ByteArray },
      Script: { hash: TSchema.ByteArray }
    })
    
    const Address = TSchema.Struct({
      payment_credential: Credential,
      stake_credential: TSchema.UndefinedOr(
        TSchema.Variant({
          Inline: { credential: Credential },
          Pointer: {
            slot_number: TSchema.Integer,
            transaction_index: TSchema.Integer,
            certificate_index: TSchema.Integer
          }
        })
      )
    })
    
    // Creates proper CBOR encoding matching Aiken's output
    const address = Data.withSchema(Address).toData({
      payment_credential: { VerificationKey: { hash } },
      stake_credential: { Inline: { credential: { VerificationKey: { stakeHash } } } }
    })
  • #63 844dfec Thanks @solidsnakedev! - Add Aiken-compatible CBOR encoding with encodeMapAsPairs option and comprehensive test suite. PlutusData maps can now encode as arrays of pairs (Aiken style) or CBOR maps (CML style). Includes 72 Aiken reference tests and 40 TypeScript compatibility tests verifying identical encoding. Also fixes branded schema pattern in Data.ts for cleaner type inference and updates TSchema error handling test.

docs@0.0.2

Patch Changes

  • Updated dependencies [7bb1da3, 844dfec]:
    • @evolution-sdk/evolution@0.2.2

@solidsnakedev solidsnakedev merged commit 68ff1d3 into main Nov 20, 2025
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