Skip to content

Latest commit

 

History

History
249 lines (147 loc) · 19.8 KB

CHANGELOG.md

File metadata and controls

249 lines (147 loc) · 19.8 KB

flow-js-testing

0.4.0

Minor Changes

  • #155 9dcab53 Thanks @jribbink! - Allow custom transaction signers to be provided as object with addr, privateKey, keyId, hashAlgorithm, signatureAlgorithm keys as an alternative to supplying merely the signer's account address and having Flow JS Testing determine the rest. This allows for more complex transaction authorizers. See documentation for examples.
  • #126 3fc34f3 Thanks @refi93! - Add getTimeOffset/setTimeOffset utilities, allowing to advance the time while testing smart-contracts
  • #170 da5e666 Thanks @jribbink! - Emulator logs are now captured when calling executeScript, sendTransaction, deployContract, and deployContractByName. They part of the tuple returned by these functions (i.e. [result, error, logs]) and are provided as an array of strings.
  • #142 9aecfdd Thanks @jribbink! - BREAKING Bumped @onflow/fcl to 1.1.1-alpha.1

    Developers should note that [U]Int* and Word* types are now decoded into strings by @onflow/fcl and no longer implicitly decoded into numbers. This means that these types will need to be explicitly converted to JavaScript Number types if required.

    This potentially affects the return values or event data for the following flow-js-testing features.

    • sendTransaction (any [U]Int* and Word* event data will be decoded into a string instead of number)
    • executeScript (any [U]Int* and Word* return values will be decoded into a string instead of number)
    • deployContract/deployContractByName (any [U]Int* and Word* event data will be decoded into a string instead of number)
    • updateContract (any [U]Int* and Word* event data will be decoded into a string instead of number)
    • getBlockOffset (return value will be string instead of number, and must be explicitly converted if JavaScript Number is required)

    See more here

  • #117 033562b Thanks @jribbink! - Dynamically select ports for emulator instead of supplying admin port statically through emulator.start arguments, deprecate use of this argument

Patch Changes

  • #207 a65ff32 Thanks @MaxStalker! - - Tests updated and double-checked.
    • Fixed regexp for log extracting.
    • Added ability to skip transaction signatures validation.
    • Updated GitHub actions to show code coverage report
  • #177 8d75426 Thanks @adbario! - Fix the warning about deprecated default compute limit for transactions
  • #190 1ce23f0 Thanks @adbario! - Add explicit scoping to arguments for scripts in nested await functions to hint microbunde into doing the right thing
  • #164 962b535 Thanks @jribbink! - Bump @onflow/flow-cadut to 0.2.0-alpha.7 (fixes bug where optional array, dictionary, path arguments did not work)
  • #138 e807e83 Thanks @jribbink! - Version bump @onflow/flow-cadut (fixes "transaction" keyword not allowed in templates & adds PublicPath/PrivatePath/StoragePath/CapabilityPath argument compatibility)
  • #165 4ac3741 Thanks @jribbink! - Block & timestamp offsets (e.g. setBlockOffset/setTimestampOffset now work in contracts. As well, deployContract & deployContractByName have the option of accepting code transformers like scripts/transactions.

    Additionally, passing the builtInMethods code transformer is now deprecated for scripts & transactions which require usage of block/timestamp offsets as transformer is applied by default internally by Flow JS Testing.

    See more here

  • #186 ff208e2 Thanks @justinbarry! - Add explicit scoping to arguments in nested await functions to hint microbunde into doing the right thing
  • #144 d1eb29b Thanks @jribbink! - Convert examples to run in Jest environment instead of ESM loader

0.3.2-alpha.0

Patch Changes

  • #207 a65ff32 Thanks @MaxStalker! - - Tests updated and double-checked.
    • Fixed regexp for log extracting.
    • Added ability to skip transaction signatures validation.
    • Updated GitHub actions to show code coverage report

0.3.0-alpha.17

Patch Changes

  • #177 8d75426 Thanks @adbario! - Fix the warning about deprecated default compute limit for transactions
  • #190 1ce23f0 Thanks @adbario! - Add explicit scoping to arguments for scripts in nested await functions to hint microbunde into doing the right thing

0.3.0-alpha.16

Patch Changes

  • #186 ff208e2 Thanks @justinbarry! - Add explicit scoping to arguments in nested await functions to hint microbunde into doing the right thing

0.3.0-alpha.15

Minor Changes

  • #170 da5e666 Thanks @jribbink! - Emulator logs are now captured when calling executeScript, sendTransaction, deployContract, and deployContractByName. They part of the tuple returned by these functions (i.e. [result, error, logs]) and are provided as an array of strings.

Patch Changes

  • #165 4ac3741 Thanks @jribbink! - Block & timestamp offsets (e.g. setBlockOffset/setTimestampOffset now work in contracts. As well, deployContract & deployContractByName have the option of accepting code transformers like scripts/transactions.

    Additionally, passing the builtInMethods code transformer is now deprecated for scripts & transactions which require usage of block/timestamp offsets as transformer is applied by default internally by Flow JS Testing.

    See more here

0.3.0-alpha.14

Minor Changes

  • #155 9dcab53 Thanks @jribbink! - Allow custom transaction signers to be provided as object with addr, privateKey, keyId, hashAlgorithm, signatureAlgorithm keys as an alternative to supplying merely the signer's account address and having Flow JS Testing determine the rest. This allows for more complex transaction authorizers. See documentation for examples.

  • #158 57edf7d Thanks @jribbink! - Flow JS Testing now exports multiple new API methods:

    • pubFlowKey - may be used to generate an RLP-encoded Buffer representing a public key corresponding to a particular private key.
    • createAccount method which may be used to manually create an account with a given human-readable name & specified keys.

    And exports the following two enums which may be used with createAccount and sendTransaction:

Patch Changes

  • #164 962b535 Thanks @jribbink! - Bump @onflow/flow-cadut to 0.2.0-alpha.7 (fixes bug where optional array, dictionary, path arguments did not work)

  • #156 2206eda Thanks @jribbink! - Bumped @onflow/fcl to ^1.2.1-alpha.0

0.3.0-alpha.12

Patch Changes

0.3.0-alpha.11

Minor Changes

  • #142 9aecfdd Thanks @jribbink! - BREAKING Bumped @onflow/fcl to 1.1.1-alpha.1

    Developers should note that [U]Int* and Word* types are now decoded into strings by @onflow/fcl and no longer implicitly decoded into numbers. This means that these types will need to be explicitly converted to JavaScript Number types if required.

    This potentially affects the return values or event data for the following flow-js-testing features.

    • sendTransaction (any [U]Int* and Word* event data will be decoded into a string instead of number)
    • executeScript (any [U]Int* and Word* return values will be decoded into a string instead of number)
    • deployContract/deployContractByName (any [U]Int* and Word* event data will be decoded into a string instead of number)
    • updateContract (any [U]Int* and Word* event data will be decoded into a string instead of number)
    • getBlockOffset (return value will be string instead of number, and must be explicitly converted if JavaScript Number is required)

    See more here

Patch Changes

  • #144 d1eb29b Thanks @jribbink! - Convert examples to run in Jest environment instead of ESM loader

0.3.0-alpha.10

Patch Changes

  • #138 e807e83 Thanks @jribbink! - Version bump @onflow/flow-cadut (fixes "transaction" keyword not allowed in templates & adds PublicPath/PrivatePath/StoragePath/CapabilityPath argument compatibility)

0.3.0-alpha.9

Minor Changes

  • #126 3fc34f3 Thanks @refi93! - Add getTimeOffset/setTimeOffset utilities, allowing to advance the time while testing smart-contracts

0.3.0-alpha.8

Minor Changes

  • 033562b: Dynamically select ports for emulator instead of supplying admin port statically through emulator.start arguments, deprecate use of this argument

0.2.3-alpha.7

Patch Changes

  • 5791e66: Introduce changesets

0.2.0

BREAKING CHANGES

  • sendTransaction and executeScript functions now return a tuple of [result, error]. As do the following functions:

    • updateContract

    • setBlockOffset

    • scratch

    • registerContract

    • mintTokens

    • initManager

    • deployContract

    • createAccount

    • setBlockOffset

    • mintFlow

    • getManagerAddress

    • getContractAddress

    • getBlockOffset

    • getBalance

    • getAccountAddress

    • checkManager

    • getBlockOffset

    • getFlowBalance

Any code that relies upon checking the result of any of these functions and expects only the result returned will need to be refactored. Jest asserts were updated accordingly, but if you were writing your own you will need to update them. For examples of new usage see the script, transaction and api documentation.

0.1.15

  • limit field added to script and transactions
  • flow-cadut brings several improvements and fixes to parser

0.1.14 - 2021-09-08

  • Refactor FlowManager to include new block offset code
  • Add code transformers functionality
  • Add block offset functionality
  • Add runnable examples
  • Update documentation
  • Update flow-cadut dependency and fixed support for complex types

0.1.13 - 2021-07-28

  • Bootstrap utility added to framework
  • Update flow-cadut dependency and fixed support for complex types
  • Fixed issue with emulator throwing an error with logging flag set to true