Skip to content
This repository was archived by the owner on Nov 5, 2024. It is now read-only.

Commit baa449a

Browse files
Version Packages (#211)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent e940e5e commit baa449a

25 files changed

+78
-169
lines changed

.changeset/blue-dancers-guess.md

-8
This file was deleted.

.changeset/bright-comics-fold.md

-5
This file was deleted.

.changeset/brown-bugs-fry.md

-5
This file was deleted.

.changeset/clean-oranges-hammer.md

-5
This file was deleted.

.changeset/friendly-snails-push.md

-5
This file was deleted.

.changeset/giant-dots-trade.md

-5
This file was deleted.

.changeset/gold-cheetahs-attend.md

-5
This file was deleted.

.changeset/happy-gifts-bake.md

-5
This file was deleted.

.changeset/kind-fishes-switch.md

-13
This file was deleted.

.changeset/long-hairs-collect.md

-5
This file was deleted.

.changeset/moody-moose-work.md

-5
This file was deleted.

.changeset/olive-fishes-tap.md

-17
This file was deleted.

.changeset/polite-apes-shop.md

-5
This file was deleted.

.changeset/poor-sloths-love.md

-5
This file was deleted.

.changeset/pre.json

-31
This file was deleted.

.changeset/quick-carrots-type.md

-5
This file was deleted.

.changeset/rare-starfishes-mate.md

-5
This file was deleted.

.changeset/red-vans-explode.md

-9
This file was deleted.

.changeset/rude-turtles-grab.md

-5
This file was deleted.

.changeset/selfish-turtles-do.md

-5
This file was deleted.

.changeset/sweet-penguins-cry.md

-5
This file was deleted.

.changeset/tough-swans-itch.md

-5
This file was deleted.

.changeset/wet-pillows-applaud.md

-5
This file was deleted.

CHANGELOG.md

+77
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,82 @@
11
# flow-js-testing
22

3+
## 0.4.0
4+
5+
### Minor Changes
6+
7+
- [#155](https://github.com/onflow/flow-js-testing/pull/155) [`9dcab53`](https://github.com/onflow/flow-js-testing/commit/9dcab535393654e3c6ba41a3ac41095519446c27) Thanks [@jribbink](https://github.com/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](/docs/send-transactions.md).
8+
9+
* [#158](https://github.com/onflow/flow-js-testing/pull/158) [`57edf7d`](https://github.com/onflow/flow-js-testing/commit/57edf7d215dd535ee8c4fa0e3dbc2d998efa8c79) Thanks [@jribbink](https://github.com/jribbink)! - Flow JS Testing now exports multiple new API methods:
10+
11+
- [`pubFlowKey`](/docs/api.md#pubflowkeykeyobject) - may be used to generate an RLP-encoded `Buffer` representing a public key corresponding to a particular private key.
12+
- [`createAccount`](/docs/accounts.md#createaccountname-keys) method which may be used to manually create an account with a given human-readable name & specified keys.
13+
14+
And exports the following two enums which may be used with [`createAccount`](/docs/accounts.md#createaccountname-keys) and [`sendTransaction`](/docs/send-transactions.md):
15+
16+
- [`SignatureAlgorithm`](/docs/api.md#signaturealgorithm)
17+
- [`HashAlgorithm`](/docs/api.md#hashalgorithm)
18+
19+
- [#126](https://github.com/onflow/flow-js-testing/pull/126) [`3fc34f3`](https://github.com/onflow/flow-js-testing/commit/3fc34f3f52f2623ca825ba84e05c774996bce67e) Thanks [@refi93](https://github.com/refi93)! - Add getTimeOffset/setTimeOffset utilities, allowing to advance the time while testing smart-contracts
20+
21+
* [#170](https://github.com/onflow/flow-js-testing/pull/170) [`da5e666`](https://github.com/onflow/flow-js-testing/commit/da5e6667fd9cf134ea536d6c82ce5e649e86d28f) Thanks [@jribbink](https://github.com/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.
22+
23+
- [#142](https://github.com/onflow/flow-js-testing/pull/142) [`9aecfdd`](https://github.com/onflow/flow-js-testing/commit/9aecfdd67a98f4eb16b7350b8892c08d83dbd0f7) Thanks [@jribbink](https://github.com/jribbink)! - **BREAKING** Bumped @onflow/fcl to 1.1.1-alpha.1
24+
25+
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.
26+
27+
This potentially affects the return values or event data for the following flow-js-testing features.
28+
29+
- `sendTransaction` (any `[U]Int*` and `Word*` event data will be decoded into a string instead of number)
30+
- `executeScript` (any `[U]Int*` and `Word*` return values will be decoded into a string instead of number)
31+
- `deployContract`/`deployContractByName` (any `[U]Int*` and `Word*` event data will be decoded into a string instead of number)
32+
- `updateContract` (any `[U]Int*` and `Word*` event data will be decoded into a string instead of number)
33+
- `getBlockOffset` (return value will be string instead of number, and must be explicitly converted if JavaScript Number is required)
34+
35+
[See more here](https://github.com/onflow/fcl-js/blob/%40onflow/fcl%401.0.3-alpha.1/packages/sdk/CHANGELOG.md#100-alpha0)
36+
37+
* [#166](https://github.com/onflow/flow-js-testing/pull/166) [`69b25e0`](https://github.com/onflow/flow-js-testing/commit/69b25e089a28ccea40e1ba41ff2045aa71b92cb4) Thanks [@jribbink](https://github.com/jribbink)! - Add `signUserMessage` utility to sign a message with an arbitrary signer and `verifyUserMessage` to verify signatures. [See more here](/docs/api.md#signusermessagemessage-signer)
38+
39+
- [#117](https://github.com/onflow/flow-js-testing/pull/117) [`033562b`](https://github.com/onflow/flow-js-testing/commit/033562b78e7d0b065578fd4bd1d63dae528c091a) Thanks [@jribbink](https://github.com/jribbink)! - Dynamically select ports for emulator instead of supplying admin port statically through emulator.start arguments, deprecate use of this argument
40+
41+
* [#129](https://github.com/onflow/flow-js-testing/pull/129) [`78944c1`](https://github.com/onflow/flow-js-testing/commit/78944c155dd50bff9a350bfac5da0c2dd5493d69) Thanks [@jribbink](https://github.com/jribbink)! - Add optional error message match to shallRevert Jest assertion
42+
43+
### Patch Changes
44+
45+
- [#207](https://github.com/onflow/flow-js-testing/pull/207) [`a65ff32`](https://github.com/onflow/flow-js-testing/commit/a65ff328863aaac087a4f01c66a19a660f52519f) Thanks [@MaxStalker](https://github.com/MaxStalker)! - - Tests updated and double-checked.
46+
- Fixed regexp for log extracting.
47+
- Added ability to skip transaction signatures validation.
48+
- Updated GitHub actions to show code coverage report
49+
50+
* [#177](https://github.com/onflow/flow-js-testing/pull/177) [`8d75426`](https://github.com/onflow/flow-js-testing/commit/8d75426bd605c8488809f271537fd6dcdf43e81f) Thanks [@adbario](https://github.com/adbario)! - Fix the warning about deprecated default compute limit for transactions
51+
52+
- [#190](https://github.com/onflow/flow-js-testing/pull/190) [`1ce23f0`](https://github.com/onflow/flow-js-testing/commit/1ce23f0c1e78afb2bec372aadb59212aa7666ab9) Thanks [@adbario](https://github.com/adbario)! - Add explicit scoping to arguments for scripts in nested await functions to hint microbunde into doing the right thing
53+
54+
* [#164](https://github.com/onflow/flow-js-testing/pull/164) [`962b535`](https://github.com/onflow/flow-js-testing/commit/962b53572848ba17f7b472e07171f0e775448406) Thanks [@jribbink](https://github.com/jribbink)! - Bump @onflow/flow-cadut to 0.2.0-alpha.7 (fixes bug where optional array, dictionary, path arguments did not work)
55+
56+
- [#138](https://github.com/onflow/flow-js-testing/pull/138) [`e807e83`](https://github.com/onflow/flow-js-testing/commit/e807e831de37f92dc429f872ac62f1ab4d575d0e) Thanks [@jribbink](https://github.com/jribbink)! - Version bump @onflow/flow-cadut (fixes "transaction" keyword not allowed in templates & adds PublicPath/PrivatePath/StoragePath/CapabilityPath argument compatibility)
57+
58+
* [#149](https://github.com/onflow/flow-js-testing/pull/149) [`fcabb81`](https://github.com/onflow/flow-js-testing/commit/fcabb81ebf78bc271ca39c01e4c901cae94cf8b0) Thanks [@jribbink](https://github.com/jribbink)! - Fix flow-cadut imports that prevented CLI from working
59+
60+
- [#192](https://github.com/onflow/flow-js-testing/pull/192) [`31c5da0`](https://github.com/onflow/flow-js-testing/commit/31c5da087108b22ce3dba9cd31ca6282f0ec81ff) Thanks [@justinbarry](https://github.com/justinbarry)! - Fix imports for flow-cadut generator
61+
62+
* [#116](https://github.com/onflow/flow-js-testing/pull/116) [`5791e66`](https://github.com/onflow/flow-js-testing/commit/5791e669e9304dc82f8dbefd0aa923d10e4aac25) Thanks [@jribbink](https://github.com/jribbink)! - Introduce changesets
63+
64+
- [#186](https://github.com/onflow/flow-js-testing/pull/186) [`de917f0`](https://github.com/onflow/flow-js-testing/commit/de917f004c5171e8e26aaf9919e1511d949bafce) Thanks [@justinbarry](https://github.com/justinbarry)! - No longer compress the packaged version of the library
65+
66+
* [#165](https://github.com/onflow/flow-js-testing/pull/165) [`4ac3741`](https://github.com/onflow/flow-js-testing/commit/4ac37411199245528fb149b0f7bff7125311ac44) Thanks [@jribbink](https://github.com/jribbink)! - Block & timestamp offsets (e.g. `setBlockOffset`/`setTimestampOffset` now work in contracts. As well, `deployContract` & `deployContractByName` have the option of [accepting code transformers](/docs/api.md#deploycontractprops) like scripts/transactions.
67+
68+
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.
69+
70+
[See more here](/TRANSITIONS.md#0002-depreaction-of-builtinmethods-code-transformer)
71+
72+
- [#186](https://github.com/onflow/flow-js-testing/pull/186) [`ff208e2`](https://github.com/onflow/flow-js-testing/commit/ff208e2fd397e685900ed29baaa2846b0bbe5bab) Thanks [@justinbarry](https://github.com/justinbarry)! - Add explicit scoping to arguments in nested await functions to hint microbunde into doing the right thing
73+
74+
* [#144](https://github.com/onflow/flow-js-testing/pull/144) [`d1eb29b`](https://github.com/onflow/flow-js-testing/commit/d1eb29bd5d115d4e13725de96bb9b53d3f9655ad) Thanks [@jribbink](https://github.com/jribbink)! - Convert examples to run in Jest environment instead of ESM loader
75+
76+
- [#188](https://github.com/onflow/flow-js-testing/pull/188) [`f905016`](https://github.com/onflow/flow-js-testing/commit/f905016c57c4d438c5be56eded188a0169d6eb59) Thanks [@adbario](https://github.com/adbario)! - Fix numbers as values deprecation warnings for tests
77+
78+
* [#156](https://github.com/onflow/flow-js-testing/pull/156) [`2206eda`](https://github.com/onflow/flow-js-testing/commit/2206eda493e7c51cfe53c1cbf9365e81064dbcef) Thanks [@jribbink](https://github.com/jribbink)! - Bumped @onflow/fcl to ^1.2.1-alpha.0
79+
380
## 0.3.2-alpha.0
481

582
### Patch Changes

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@onflow/flow-js-testing",
3-
"version": "0.3.2-alpha.0",
3+
"version": "0.4.0",
44
"description": "This package will expose a set of utility methods, to allow Cadence code testing with libraries like Jest",
55
"repository": {
66
"type": "git",

0 commit comments

Comments
 (0)