Skip to content

Latest commit

 

History

History
329 lines (182 loc) · 12.1 KB

CHANGELOG.md

File metadata and controls

329 lines (182 loc) · 12.1 KB

clarigen-deno

0.5.5

Patch Changes

  • aaa12d6 Thanks @hstove! - Fixed an issue where a project's requirements didn't have the correct contract identifier for simnet environment

0.5.4

Patch Changes

  • 127a4ad Thanks @hstove! - Fixes an issue when running the Clarinet wrapper using externally-installed cli

0.5.3

Patch Changes

  • 4904ab9 Thanks @hstove! - Fixes clarigen init command due to .toml files not being included from deno.land package manager

0.5.2

Patch Changes

  • 868684c Thanks @hstove! - Fixes issues with ABI types when using conditionals to infer Clarity type

0.5.1

Patch Changes

  • 174a74a Thanks @hstove! - Fixes an issue when getting contract variables/constants for project requirements

0.5.0

Minor Changes

  • 22a2ea7 Thanks @hstove! - Updates the ClarityAbiNonFungibleToken type to include a JS-native type.

    Fixed an issue when fetching variables in projects that use requirements.

0.4.16

Patch Changes

  • 50e8996 Thanks @hstove! - Updated clarinet deno package dependency to 1.3.1

0.4.15

Patch Changes

  • b73538d Thanks @hstove! - The documentation generator has been updated to include maps and variables!

    Previously, generated docs only included functions. Now, all maps and variables are included as well. Additionally, if you include comments directly above any maps, variables, and constants, those comments will be parsed and included in generated documentation.

0.4.14

Patch Changes

  • d57411f Thanks @hstove! - When building docs, excluded contracts are not included in the README

0.4.13

Patch Changes

  • e919d0a Thanks @hstove! - You can now output multiple Clarigen generated type files. To do so, use outputs with an array of paths, instead of output. Example:

    [esm]
    outputs = ["src/clarigen.ts", "other/types.ts"]

    You can also exclude specific contracts from having documentation generated. To do so, use the exclude (array) in your Clarigen.toml. Each entry in exclude should be the contract name - without file extensions or paths. Example:

    [docs]
    exclude = ["ft-trait"]

0.4.12

Patch Changes

0.4.11

Patch Changes

  • 15a3f18 Thanks @hstove! - Updated contractFactory behavior - now all contract calls will have the full identifier - not just the contractName.

0.4.10

Patch Changes

  • ecce3ed Thanks @hstove! - Fixed an issue with contractFactory, where the contractName was wrong.

0.4.9

Patch Changes

  • cc58a0f Thanks @hstove! - Clarigen now outputs a "constants" property with each contract. This allows you to get the value for your constants from within the JS runtime.

    Example:

    (define-constant my-const u1)
    (define-data-var my-var uint u2)

    Both the constant and the variable's initial value will be added to your contract's type definitions. You can access it like:

    console.log(contract.constants.myConst); // 1n
    console.log(contract.constants.myVar); // 2n

    For variables, only the initial value (when the contract is deployed) is added to the contract's types.

0.4.8

Patch Changes

  • 588876f Thanks @hstove! - Adds a deno.helper configuration option. If present, a helper file will be generated, which includes helpful and common imports for Clarinet testing environments.

0.4.7

Patch Changes

  • 7c9073e Thanks @hstove! - Fixed an issue with clarigen --watch, where the "file watcher" would be triggered multiple times in a row, where it should have been debounced.
  • fa41cd0 Thanks @hstove! - Fixed an issue with contracts that have an NFT where the "key" is a tuple type

0.4.6

Patch Changes

  • 6636047 Thanks @hstove! - When generating files, contracts are sorted by name. This prevents git changes due to the indeterminant way that Clarinet outputs contract order

0.4.5

Patch Changes

  • 89ce01f Thanks @hstove! - - Fixed a bug where an error would throw if there was no output in the esm section of config
    • Added chain.burnBlockHeight

0.4.4

Patch Changes

  • 3d737d0 Thanks @hstove! - Adds a top-level mod.ts file for easier imports

0.4.3

Patch Changes

  • Added a new docs command to the CLI! This will parse your contracts and automatically generate documentation for each of your contracts. Included in the docs are comments and rich type information.

  • daaf0b5 Thanks @hstove! - Internally updated to Clarinet v1!

  • daaf0b5 Thanks @hstove! - Updated the types for rovOk and rovErr to properly throw type errors if the function doesn't return a response

0.4.2

Patch Changes

0.4.1

Patch Changes

  • 420cd6c Thanks @hstove! - Includes accounts, deployment IDs with ESM
  • db95d1c Thanks @hstove! - Added simnet export to ESM, if include_accounts is configured.

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

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