Skip to content

Commit

Permalink
Merge pull request #161 from algorandfoundation/fix/esm-improvements
Browse files Browse the repository at this point in the history
Build a correctly formed ES Module output
  • Loading branch information
neilcampbell authored Nov 16, 2023
2 parents bc5d0c7 + 298a57b commit fefc859
Show file tree
Hide file tree
Showing 138 changed files with 1,201 additions and 959 deletions.
22 changes: 21 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,25 @@
"env": {
"node": true
},
"extends": ["@makerx/eslint-config"]
"extends": ["@makerx/eslint-config"],
"rules": {
"no-restricted-syntax": [
"error",
{
// Algosdk v2.x.x exports a malformed ES module and when using utils-ts in an ESM project
// the CJS module may be loaded, which may not fuly support all named exports.
// The easiest solution for now, is to only use the default export.
"message": "Only use the default export in 'algosdk'. See rule comment for details",
"selector": "ImportDeclaration[source.value=\"algosdk\"] ImportSpecifier"
}
]
},
"overrides": [
{
"files": ["**/*.spec.ts"],
"rules": {
"no-restricted-syntax": 0
}
}
]
}
12 changes: 6 additions & 6 deletions docs/code/classes/testing.TransactionLogger.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Useful for automated tests.

#### Defined in

[src/testing/transaction-logger.ts:9](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/testing/transaction-logger.ts#L9)
[src/testing/transaction-logger.ts:12](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/testing/transaction-logger.ts#L12)

## Accessors

Expand All @@ -58,7 +58,7 @@ readonly `string`[]

#### Defined in

[src/testing/transaction-logger.ts:14](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/testing/transaction-logger.ts#L14)
[src/testing/transaction-logger.ts:17](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/testing/transaction-logger.ts#L17)

## Methods

Expand All @@ -82,7 +82,7 @@ The wrapped `Algodv2`, any transactions sent using this algod instance will be l

#### Defined in

[src/testing/transaction-logger.ts:45](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/testing/transaction-logger.ts#L45)
[src/testing/transaction-logger.ts:48](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/testing/transaction-logger.ts#L48)

___

Expand All @@ -98,7 +98,7 @@ Clear all logged IDs.

#### Defined in

[src/testing/transaction-logger.ts:21](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/testing/transaction-logger.ts#L21)
[src/testing/transaction-logger.ts:24](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/testing/transaction-logger.ts#L24)

___

Expand All @@ -120,7 +120,7 @@ The method that captures raw transactions and stores the transaction IDs.

#### Defined in

[src/testing/transaction-logger.ts:28](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/testing/transaction-logger.ts#L28)
[src/testing/transaction-logger.ts:31](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/testing/transaction-logger.ts#L31)

___

Expand All @@ -142,4 +142,4 @@ Wait until all logged transactions IDs appear in the given `Indexer`.

#### Defined in

[src/testing/transaction-logger.ts:50](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/testing/transaction-logger.ts#L50)
[src/testing/transaction-logger.ts:53](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/testing/transaction-logger.ts#L53)
20 changes: 10 additions & 10 deletions docs/code/classes/types_account.MultisigAccount.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Account wrapper that supports partial or full multisig signing.

#### Defined in

[src/types/account.ts:34](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/account.ts#L34)
[src/types/account.ts:38](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/account.ts#L38)

## Properties

Expand All @@ -55,7 +55,7 @@ Account wrapper that supports partial or full multisig signing.

#### Defined in

[src/types/account.ts:12](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/account.ts#L12)
[src/types/account.ts:16](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/account.ts#L16)

___

Expand All @@ -65,7 +65,7 @@ ___

#### Defined in

[src/types/account.ts:10](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/account.ts#L10)
[src/types/account.ts:14](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/account.ts#L14)

___

Expand All @@ -75,7 +75,7 @@ ___

#### Defined in

[src/types/account.ts:13](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/account.ts#L13)
[src/types/account.ts:17](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/account.ts#L17)

___

Expand All @@ -85,7 +85,7 @@ ___

#### Defined in

[src/types/account.ts:11](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/account.ts#L11)
[src/types/account.ts:15](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/account.ts#L15)

## Accessors

Expand All @@ -101,7 +101,7 @@ The address of the multisig account

#### Defined in

[src/types/account.ts:26](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/account.ts#L26)
[src/types/account.ts:30](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/account.ts#L30)

___

Expand All @@ -117,7 +117,7 @@ The parameters for the multisig account

#### Defined in

[src/types/account.ts:16](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/account.ts#L16)
[src/types/account.ts:20](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/account.ts#L20)

___

Expand All @@ -131,7 +131,7 @@ ___

#### Defined in

[src/types/account.ts:30](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/account.ts#L30)
[src/types/account.ts:34](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/account.ts#L34)

___

Expand All @@ -147,7 +147,7 @@ readonly (`default` \| [`SigningAccount`](types_account.SigningAccount.md))[]

#### Defined in

[src/types/account.ts:21](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/account.ts#L21)
[src/types/account.ts:25](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/account.ts#L25)

## Methods

Expand All @@ -171,4 +171,4 @@ The transaction signed by the present signers

#### Defined in

[src/types/account.ts:49](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/account.ts#L49)
[src/types/account.ts:53](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/account.ts#L53)
16 changes: 8 additions & 8 deletions docs/code/classes/types_account.SigningAccount.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Account wrapper that supports a rekeyed account

#### Defined in

[src/types/account.ts:100](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/account.ts#L100)
[src/types/account.ts:104](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/account.ts#L104)

## Properties

Expand All @@ -54,7 +54,7 @@ Account wrapper that supports a rekeyed account

#### Defined in

[src/types/account.ts:65](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/account.ts#L65)
[src/types/account.ts:69](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/account.ts#L69)

___

Expand All @@ -64,7 +64,7 @@ ___

#### Defined in

[src/types/account.ts:67](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/account.ts#L67)
[src/types/account.ts:71](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/account.ts#L71)

___

Expand All @@ -74,7 +74,7 @@ ___

#### Defined in

[src/types/account.ts:66](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/account.ts#L66)
[src/types/account.ts:70](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/account.ts#L70)

## Accessors

Expand All @@ -94,7 +94,7 @@ Account.addr

#### Defined in

[src/types/account.ts:72](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/account.ts#L72)
[src/types/account.ts:76](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/account.ts#L76)

___

Expand All @@ -110,7 +110,7 @@ Algorand account of the sender address and signer private key

#### Defined in

[src/types/account.ts:93](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/account.ts#L93)
[src/types/account.ts:97](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/account.ts#L97)

___

Expand All @@ -126,7 +126,7 @@ Transaction signer for the underlying signing account

#### Defined in

[src/types/account.ts:86](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/account.ts#L86)
[src/types/account.ts:90](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/account.ts#L90)

___

Expand All @@ -146,4 +146,4 @@ Account.sk

#### Defined in

[src/types/account.ts:79](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/account.ts#L79)
[src/types/account.ts:83](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/account.ts#L83)
Loading

0 comments on commit fefc859

Please sign in to comment.