Skip to content

Commit

Permalink
Merge branch 'nialexsan/ts-conversion-fixed-merge-conflicts' into nia…
Browse files Browse the repository at this point in the history
…lexsan/ts-conversion-voucher-recolve-merge-conflict
  • Loading branch information
nialexsan authored Nov 7, 2023
2 parents 9313eff + 1921cbf commit 8980a9e
Show file tree
Hide file tree
Showing 22 changed files with 13 additions and 205 deletions.
2 changes: 1 addition & 1 deletion .changeset/pre.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"mode": "pre",
"mode": "exit",
"tag": "typescript",
"initialVersions": {
"@onflow/config": "1.1.2",
Expand Down
15 changes: 0 additions & 15 deletions packages/config/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,5 @@
# @onflow/config

## 1.2.0-typescript.0

### Minor Changes

- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`86ce9f75`](https://github.com/onflow/fcl-js/commit/86ce9f75b5542a6bce76012e36a7a3d4fb6867f2) Thanks [@nialexsan](https://github.com/nialexsan)! - TS build

- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`6b81c1ff`](https://github.com/onflow/fcl-js/commit/6b81c1ffc54ed1c073d0b6581df5fb34d7a33ec5) Thanks [@nialexsan](https://github.com/nialexsan)! - Add Typescript to @onflow/config

### Patch Changes

- Updated dependencies [[`9fca84a3`](https://github.com/onflow/fcl-js/commit/9fca84a3151d7f6aeb33870a302e9793f024516b), [`86ce9f75`](https://github.com/onflow/fcl-js/commit/86ce9f75b5542a6bce76012e36a7a3d4fb6867f2), [`0960cdce`](https://github.com/onflow/fcl-js/commit/0960cdce6808b265ef92791da06a6772e9353537)]:
- @onflow/util-invariant@1.2.0-typescript.0
- @onflow/util-logger@1.3.0-typescript.0
- @onflow/util-actor@1.3.0-typescript.0

## 1.1.2

### Patch Changes
Expand Down
8 changes: 0 additions & 8 deletions packages/fcl-bundle/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
# @onflow/fcl-bundle

## 1.4.0-typescript.0

### Minor Changes

- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`9fca84a3`](https://github.com/onflow/fcl-js/commit/9fca84a3151d7f6aeb33870a302e9793f024516b) Thanks [@nialexsan](https://github.com/nialexsan)! - Switched to rollup-plugin-typescript2

- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`86ce9f75`](https://github.com/onflow/fcl-js/commit/86ce9f75b5542a6bce76012e36a7a3d4fb6867f2) Thanks [@nialexsan](https://github.com/nialexsan)! - TS build

## 1.3.1

### Patch Changes
Expand Down
14 changes: 0 additions & 14 deletions packages/fcl-wc/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,5 @@
# @onflow/fcl-wc

## 5.0.0-typescript.0

### Minor Changes

- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`86ce9f75`](https://github.com/onflow/fcl-js/commit/86ce9f75b5542a6bce76012e36a7a3d4fb6867f2) Thanks [@nialexsan](https://github.com/nialexsan)! - TS build

### Patch Changes

- Updated dependencies [[`9fca84a3`](https://github.com/onflow/fcl-js/commit/9fca84a3151d7f6aeb33870a302e9793f024516b), [`86ce9f75`](https://github.com/onflow/fcl-js/commit/86ce9f75b5542a6bce76012e36a7a3d4fb6867f2), [`6b81c1ff`](https://github.com/onflow/fcl-js/commit/6b81c1ffc54ed1c073d0b6581df5fb34d7a33ec5)]:
- @onflow/util-invariant@1.2.0-typescript.0
- @onflow/util-logger@1.3.0-typescript.0
- @onflow/config@1.2.0-typescript.0
- @onflow/fcl@1.8.0-typescript.0

## 4.0.0

### Patch Changes
Expand Down
20 changes: 0 additions & 20 deletions packages/fcl/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,5 @@
# @onflow/fcl

## 1.8.0-typescript.0

### Minor Changes

- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`86ce9f75`](https://github.com/onflow/fcl-js/commit/86ce9f75b5542a6bce76012e36a7a3d4fb6867f2) Thanks [@nialexsan](https://github.com/nialexsan)! - TS build

### Patch Changes

- Updated dependencies [[`81d4b40e`](https://github.com/onflow/fcl-js/commit/81d4b40e5b76ffb85b6185a274ae1cbce5988e7b), [`9fca84a3`](https://github.com/onflow/fcl-js/commit/9fca84a3151d7f6aeb33870a302e9793f024516b), [`86ce9f75`](https://github.com/onflow/fcl-js/commit/86ce9f75b5542a6bce76012e36a7a3d4fb6867f2), [`6b81c1ff`](https://github.com/onflow/fcl-js/commit/6b81c1ffc54ed1c073d0b6581df5fb34d7a33ec5), [`0960cdce`](https://github.com/onflow/fcl-js/commit/0960cdce6808b265ef92791da06a6772e9353537)]:
- @onflow/types@1.2.0-typescript.0
- @onflow/util-invariant@1.2.0-typescript.0
- @onflow/util-template@1.2.0-typescript.0
- @onflow/util-address@1.2.0-typescript.0
- @onflow/util-logger@1.3.0-typescript.0
- @onflow/util-uid@1.2.0-typescript.0
- @onflow/rlp@1.2.0-typescript.0
- @onflow/util-actor@1.3.0-typescript.0
- @onflow/config@1.2.0-typescript.0
- @onflow/sdk@1.3.0-typescript.0

## 1.7.0

### Minor Changes
Expand Down
8 changes: 0 additions & 8 deletions packages/rlp/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
# @onflow/rlp

## 1.2.0-typescript.0

### Minor Changes

- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`9fca84a3`](https://github.com/onflow/fcl-js/commit/9fca84a3151d7f6aeb33870a302e9793f024516b) Thanks [@nialexsan](https://github.com/nialexsan)! - Convert to Typescript

- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`86ce9f75`](https://github.com/onflow/fcl-js/commit/86ce9f75b5542a6bce76012e36a7a3d4fb6867f2) Thanks [@nialexsan](https://github.com/nialexsan)! - TS build

## 1.1.0

### Minor Changes
Expand Down
18 changes: 0 additions & 18 deletions packages/sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,5 @@
# @onflow/sdk

## 1.3.0-typescript.0

### Minor Changes

- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`86ce9f75`](https://github.com/onflow/fcl-js/commit/86ce9f75b5542a6bce76012e36a7a3d4fb6867f2) Thanks [@nialexsan](https://github.com/nialexsan)! - TS build

### Patch Changes

- Updated dependencies [[`9fca84a3`](https://github.com/onflow/fcl-js/commit/9fca84a3151d7f6aeb33870a302e9793f024516b), [`86ce9f75`](https://github.com/onflow/fcl-js/commit/86ce9f75b5542a6bce76012e36a7a3d4fb6867f2), [`6b81c1ff`](https://github.com/onflow/fcl-js/commit/6b81c1ffc54ed1c073d0b6581df5fb34d7a33ec5), [`0960cdce`](https://github.com/onflow/fcl-js/commit/0960cdce6808b265ef92791da06a6772e9353537)]:
- @onflow/util-invariant@1.2.0-typescript.0
- @onflow/util-template@1.2.0-typescript.0
- @onflow/util-address@1.2.0-typescript.0
- @onflow/util-logger@1.3.0-typescript.0
- @onflow/rlp@1.2.0-typescript.0
- @onflow/transport-http@1.8.0-typescript.0
- @onflow/util-actor@1.3.0-typescript.0
- @onflow/config@1.2.0-typescript.0

## 1.2.3

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/src/build/build-payer.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {pipe, prepAccount, PAYER} from "../interaction/interaction.js"
import {pipe, prepAccount, PAYER} from "../interaction/interaction"

export function payer(ax = []) {
if (!Array.isArray(ax)) ax = [ax]
Expand Down
6 changes: 3 additions & 3 deletions packages/sdk/src/test-utils/authz-fn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ interface IAuthzResolveMany {
}

export function authzResolveMany(opts: IAuthzResolveMany = {authorizations: []}) {
return function (account: IAcct) {
return function (account: IAcct): IAcct {
const tempId = opts.tempId || "AUTHZ_RESOLVE_MANY"
return {
...account,
Expand All @@ -79,8 +79,8 @@ export function authzResolveMany(opts: IAuthzResolveMany = {authorizations: []})
}
}

export function authzDeepResolveMany(opts = {}, depth = 1) {
return function (account) {
export function authzDeepResolveMany(opts: IAuthzResolveMany = {authorizations: []}, depth = 1) {
return function (account: IAcct): IAcct {
const tempId = opts.tempId || "AUTHZ_DEEP_RESOLVE_MANY"
return {
...account,
Expand Down
14 changes: 0 additions & 14 deletions packages/transport-grpc/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,5 @@
# @onflow/transport-grpc

## 1.3.0-typescript.0

### Minor Changes

- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`86ce9f75`](https://github.com/onflow/fcl-js/commit/86ce9f75b5542a6bce76012e36a7a3d4fb6867f2) Thanks [@nialexsan](https://github.com/nialexsan)! - TS build

### Patch Changes

- Updated dependencies [[`9fca84a3`](https://github.com/onflow/fcl-js/commit/9fca84a3151d7f6aeb33870a302e9793f024516b), [`86ce9f75`](https://github.com/onflow/fcl-js/commit/86ce9f75b5542a6bce76012e36a7a3d4fb6867f2)]:
- @onflow/util-invariant@1.2.0-typescript.0
- @onflow/util-template@1.2.0-typescript.0
- @onflow/util-address@1.2.0-typescript.0
- @onflow/rlp@1.2.0-typescript.0

## 1.2.2

### Patch Changes
Expand Down
14 changes: 0 additions & 14 deletions packages/transport-http/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,5 @@
# @onflow/transport-http

## 1.8.0-typescript.0

### Minor Changes

- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`86ce9f75`](https://github.com/onflow/fcl-js/commit/86ce9f75b5542a6bce76012e36a7a3d4fb6867f2) Thanks [@nialexsan](https://github.com/nialexsan)! - TS build

### Patch Changes

- Updated dependencies [[`9fca84a3`](https://github.com/onflow/fcl-js/commit/9fca84a3151d7f6aeb33870a302e9793f024516b), [`86ce9f75`](https://github.com/onflow/fcl-js/commit/86ce9f75b5542a6bce76012e36a7a3d4fb6867f2)]:
- @onflow/util-invariant@1.2.0-typescript.0
- @onflow/util-template@1.2.0-typescript.0
- @onflow/util-address@1.2.0-typescript.0
- @onflow/util-logger@1.3.0-typescript.0

## 1.7.2

### Patch Changes
Expand Down
6 changes: 0 additions & 6 deletions packages/typedefs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
# @onflow/typedefs

## 1.2.0-typescript.0

### Minor Changes

- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`86ce9f75`](https://github.com/onflow/fcl-js/commit/86ce9f75b5542a6bce76012e36a7a3d4fb6867f2) Thanks [@nialexsan](https://github.com/nialexsan)! - TS build

## 1.1.1

### Patch Changes
Expand Down
13 changes: 0 additions & 13 deletions packages/types/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
# @onflow/types

## 1.2.0-typescript.0

### Minor Changes

- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`81d4b40e`](https://github.com/onflow/fcl-js/commit/81d4b40e5b76ffb85b6185a274ae1cbce5988e7b) Thanks [@nialexsan](https://github.com/nialexsan)! - Convert @onflow/types to TypeScript

- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`86ce9f75`](https://github.com/onflow/fcl-js/commit/86ce9f75b5542a6bce76012e36a7a3d4fb6867f2) Thanks [@nialexsan](https://github.com/nialexsan)! - TS build

### Patch Changes

- Updated dependencies [[`9fca84a3`](https://github.com/onflow/fcl-js/commit/9fca84a3151d7f6aeb33870a302e9793f024516b), [`86ce9f75`](https://github.com/onflow/fcl-js/commit/86ce9f75b5542a6bce76012e36a7a3d4fb6867f2)]:
- @onflow/util-logger@1.3.0-typescript.0

## 1.1.0

### Minor Changes
Expand Down
8 changes: 0 additions & 8 deletions packages/util-actor/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
# @onflow/util-actor

## 1.3.0-typescript.0

### Minor Changes

- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`86ce9f75`](https://github.com/onflow/fcl-js/commit/86ce9f75b5542a6bce76012e36a7a3d4fb6867f2) Thanks [@nialexsan](https://github.com/nialexsan)! - TS build

- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`0960cdce`](https://github.com/onflow/fcl-js/commit/0960cdce6808b265ef92791da06a6772e9353537) Thanks [@nialexsan](https://github.com/nialexsan)! - Enhance TS support for @onflow/util-actor

## 1.2.0

### Minor Changes
Expand Down
8 changes: 0 additions & 8 deletions packages/util-address/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
# @onflow/util-address

## 1.2.0-typescript.0

### Minor Changes

- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`9fca84a3`](https://github.com/onflow/fcl-js/commit/9fca84a3151d7f6aeb33870a302e9793f024516b) Thanks [@nialexsan](https://github.com/nialexsan)! - Convert to Typescript

- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`86ce9f75`](https://github.com/onflow/fcl-js/commit/86ce9f75b5542a6bce76012e36a7a3d4fb6867f2) Thanks [@nialexsan](https://github.com/nialexsan)! - TS build

## 1.1.0

### Minor Changes
Expand Down
14 changes: 0 additions & 14 deletions packages/util-encode-key/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,5 @@
# @onflow/util-encode-key

## 1.2.0-typescript.0

### Minor Changes

- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`9fca84a3`](https://github.com/onflow/fcl-js/commit/9fca84a3151d7f6aeb33870a302e9793f024516b) Thanks [@nialexsan](https://github.com/nialexsan)! - Convert to Typescript

- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`86ce9f75`](https://github.com/onflow/fcl-js/commit/86ce9f75b5542a6bce76012e36a7a3d4fb6867f2) Thanks [@nialexsan](https://github.com/nialexsan)! - TS build

### Patch Changes

- Updated dependencies [[`9fca84a3`](https://github.com/onflow/fcl-js/commit/9fca84a3151d7f6aeb33870a302e9793f024516b), [`86ce9f75`](https://github.com/onflow/fcl-js/commit/86ce9f75b5542a6bce76012e36a7a3d4fb6867f2)]:
- @onflow/util-invariant@1.2.0-typescript.0
- @onflow/rlp@1.2.0-typescript.0

## 1.1.0

### Minor Changes
Expand Down
1 change: 0 additions & 1 deletion packages/util-encode-key/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ const VALID_HASHINGS = new Set([SHA2_256, SHA3_256])

/**
* Encodes a key into a hex string
*
* @param key - The key to encode (DER Hex)
* @param curve - The curve Flow needs to use with your key [ECDSA_P256|ECDSA_secp256k1]
* @param hash - The hashing algorythm Flow needs to use with your key [SHA2_256|SHA3_256]
Expand Down
8 changes: 0 additions & 8 deletions packages/util-invariant/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
# @onflow/util-invariant

## 1.2.0-typescript.0

### Minor Changes

- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`9fca84a3`](https://github.com/onflow/fcl-js/commit/9fca84a3151d7f6aeb33870a302e9793f024516b) Thanks [@nialexsan](https://github.com/nialexsan)! - Convert to Typescript

- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`86ce9f75`](https://github.com/onflow/fcl-js/commit/86ce9f75b5542a6bce76012e36a7a3d4fb6867f2) Thanks [@nialexsan](https://github.com/nialexsan)! - TS build

## 1.1.0

### Minor Changes
Expand Down
8 changes: 0 additions & 8 deletions packages/util-logger/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
# @onflow/util-logger

## 1.3.0-typescript.0

### Minor Changes

- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`9fca84a3`](https://github.com/onflow/fcl-js/commit/9fca84a3151d7f6aeb33870a302e9793f024516b) Thanks [@nialexsan](https://github.com/nialexsan)! - Convert to Typescript

- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`86ce9f75`](https://github.com/onflow/fcl-js/commit/86ce9f75b5542a6bce76012e36a7a3d4fb6867f2) Thanks [@nialexsan](https://github.com/nialexsan)! - TS build

## 1.2.2

### Patch Changes
Expand Down
10 changes: 8 additions & 2 deletions packages/util-logger/src/util-logger.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
interface IConfig {
get: <T>(key: string) => T;
}

type Config = IConfig & (() => IConfig) | null

// Config dependency injected into logger to break circular dependency
let config: any = null
let config: Config = null
export const setConfig = (_config: any) => {
config = _config
}
Expand Down Expand Up @@ -61,7 +67,7 @@ export const log = async (options: {
always?: boolean
}) => {
const {title, message, level, always} = options
const configLoggerLevel = await config.get("logger.level", LEVELS.warn)
const configLoggerLevel = (await config?.()?.get<number>("logger.level")) ?? LEVELS.warn

// If config level is below message level then don't show it
if (!always && configLoggerLevel < level) return
Expand Down
13 changes: 0 additions & 13 deletions packages/util-template/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
# @onflow/util-template

## 1.2.0-typescript.0

### Minor Changes

- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`9fca84a3`](https://github.com/onflow/fcl-js/commit/9fca84a3151d7f6aeb33870a302e9793f024516b) Thanks [@nialexsan](https://github.com/nialexsan)! - Convert to Typescript

- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`86ce9f75`](https://github.com/onflow/fcl-js/commit/86ce9f75b5542a6bce76012e36a7a3d4fb6867f2) Thanks [@nialexsan](https://github.com/nialexsan)! - TS build

### Patch Changes

- Updated dependencies [[`9fca84a3`](https://github.com/onflow/fcl-js/commit/9fca84a3151d7f6aeb33870a302e9793f024516b), [`86ce9f75`](https://github.com/onflow/fcl-js/commit/86ce9f75b5542a6bce76012e36a7a3d4fb6867f2)]:
- @onflow/util-logger@1.3.0-typescript.0

## 1.1.0

### Minor Changes
Expand Down
8 changes: 0 additions & 8 deletions packages/util-uid/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
# @onflow/util-uid

## 1.2.0-typescript.0

### Minor Changes

- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`9fca84a3`](https://github.com/onflow/fcl-js/commit/9fca84a3151d7f6aeb33870a302e9793f024516b) Thanks [@nialexsan](https://github.com/nialexsan)! - Convert to Typescript

- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`86ce9f75`](https://github.com/onflow/fcl-js/commit/86ce9f75b5542a6bce76012e36a7a3d4fb6867f2) Thanks [@nialexsan](https://github.com/nialexsan)! - TS build

## 1.1.0

### Minor Changes
Expand Down

0 comments on commit 8980a9e

Please sign in to comment.