Skip to main content
Module

x/clarigen/CHANGELOG.md

Deno package for type-safe Clarinet tests
Go to Latest
File

clarigen-deno

0.4.0

Minor Changes

  • 52d697e Thanks @hstove! - Clarigen now comes with a fully-featured CLI, powered by Deno and Clarinet

Patch Changes

  • 555b763 Thanks @hstove! - Fixed an issue with clarinet scripts importing Cliffy modules

0.3.7

Patch Changes

  • Updated type stubs to remove unnecessary code

0.3.6

Patch Changes

  • 17abcf1 Thanks @hstove! - Big DX updates:

    1. Contract calls support an “object” syntax
    2. Tuples are properly “camel-cased”
    3. Integer types are number | bigint now in all arguments

    Object vs spread:

    Updates the contract call syntax to support function arguments either as an object or an array. Previously, the only supported syntax was to “spread”.

    For example, given the function:

    (define-read-only (add (a uint) (b uint)))

    The “spread” syntax is:

    contract.add(1, 2);

    Now you can also do:

    contract.add({ a: 1, b: 2 });

    Tuples are camel-ized

    Previously, tuples (either as arguments or as results) were not properly camel-cased. Now, they are, which makes writing JS much easier.

    Example function:

    (define-read-only (merge-tuple (i { min-height: uint }))
      (merge i { max-height: u100000 })
    )

    Previously, the tuples in both arguments and results were not camel-case:

    // old
    const result = contract.mergeTuple({ "min-height": 1n });
    const max = result["max-height"];

    Now it’s much cleaner:

    const result = contract.mergeTuple({ minHeight: 1n });
    const max = result.maxHeight;

    Integer types for arguments

    Previously, if a function had a uint or int argument, you could already pass the argument as number | bigint. However, if you had a type where the integer was within a type (like (list uint)), you could only use bigint.

    Now, you can use number | bigint within any argument type that has an integer.

0.3.5

Patch Changes

  • f7e827d Thanks @hstove! - Added instance methods to Chain to support the full Clarinet api

0.3.4

Patch Changes

0.3.3

Patch Changes

  • c8d6b4a Thanks @hstove! - Removed ‘commit’ option for changesets

0.3.2

Patch Changes

0.3.1

Patch Changes

  • b66cb90: Fixed - removed accounts from index file

0.3.0

Minor Changes

  • 7cf0c8f: Updates generated files for Clarinet unit test environments

0.2.4

Patch Changes

  • 4dd63d4: Fixed code not included in version

0.2.3

Patch Changes

  • 8b4467e: Fixed camelCasing, adds variables to abi

0.2.2

Patch Changes

  • c7273ce: Version bump to trigger deno push

0.2.1

Patch Changes

  • 0acb708: Changed the outputted file from CLI from ‘single.ts’ to ‘index.ts’

0.2.0

Minor Changes

  • 185f6db: First version:

    • CLI to generate types
    • Type-friendly test runner