Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nialexsan/ts conversion fixed merge conflicts #1802

Merged
merged 38 commits into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
b4b3bcc
Nialexsan/add types (#1710)
nialexsan Aug 4, 2023
9fca84a
Implement typescript for several branches & adjust configuration (#1750)
jribbink Aug 15, 2023
81d4b40
Convert @onflow/types to TS (#1760)
jribbink Aug 25, 2023
0960cdc
PKG -- [util-actor] Enhance TS support (#1761)
jribbink Sep 1, 2023
9554e0b
PKG -- [types] Simplify generics for @onflow/types (#1772)
jribbink Sep 8, 2023
6b81c1f
PKG -- [config] Convert @onflow/config to TS (#1731)
jribbink Sep 12, 2023
60d4b35
Fix JSDoc type generation (#1780)
jribbink Sep 14, 2023
86ce9f7
restore changeset
nialexsan Nov 1, 2023
a381814
align packages
nialexsan Nov 1, 2023
ac4e161
pre typescript
nialexsan Nov 1, 2023
04bd73e
any type for config
nialexsan Nov 1, 2023
da3bc15
update package lock
nialexsan Nov 1, 2023
df3dbac
PKG -- [util-encode-key] eslint ts config
nialexsan Aug 9, 2023
e04367c
more ts
nialexsan Aug 15, 2023
869ab99
move interaction types
nialexsan Aug 25, 2023
d1d5e5e
fix types
nialexsan Aug 25, 2023
dbf6bf8
more types
nialexsan Aug 25, 2023
0d47959
authz types
nialexsan Aug 25, 2023
fbb91f7
fix export
nialexsan Aug 25, 2023
6c4ecba
fix imports
nialexsan Aug 25, 2023
ac04e6b
fixed tests
nialexsan Aug 25, 2023
8662e4a
fix paths
nialexsan Aug 26, 2023
9783a33
fix path
nialexsan Aug 26, 2023
e111013
fix some tests
nialexsan Aug 30, 2023
503aded
clean console log
nialexsan Sep 12, 2023
7c28b15
fix logic
nialexsan Sep 12, 2023
3ce27e2
addressing PR comments
nialexsan Sep 25, 2023
3aca2d3
fix build arguments
nialexsan Sep 25, 2023
79a34d5
shallow copy acct
nialexsan Sep 25, 2023
b73afdf
fixed types
nialexsan Nov 2, 2023
ffe5d30
fix path to interactions
nialexsan Nov 2, 2023
fa3db8c
Merge remote-tracking branch 'origin/master' into nialexsan/ts-conver…
nialexsan Nov 7, 2023
1921cbf
revert changes to changelogs
nialexsan Nov 7, 2023
e0d0d5d
Merge branch 'master' into nialexsan/ts-conversion-fixed-merge-conflicts
nialexsan Nov 8, 2023
03600db
Merge remote-tracking branch 'origin/master' into nialexsan/ts-conver…
nialexsan Nov 16, 2023
103a4ff
address comments
nialexsan Nov 27, 2023
e50b20d
changeset
nialexsan Nov 27, 2023
d6bab84
Merge branch 'master' into nialexsan/ts-conversion-fixed-merge-conflicts
nialexsan Nov 27, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .changeset/brown-dingos-taste.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@onflow/transport-http": minor
"@onflow/typedefs": minor
"@onflow/types": minor
"@onflow/fcl": minor
"@onflow/sdk": minor
---

TS conversion
87 changes: 37 additions & 50 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,14 @@
"@changesets/cli": "^2.21.1",
"@types/jest": "^29.5.3",
"@types/node": "^18.11.18",
"@typescript-eslint/eslint-plugin": "^6.3.0",
"@typescript-eslint/parser": "^6.3.0",
"eslint": "^8.46.0",
"jest": "^29.5.0",
"jest-environment-jsdom": "^29.5.0",
"lerna": "^6.6.2",
"prettier": "^2.6.2",
"ts-jest": "^29.1.1"
"ts-jest": "^29.1.1",
"typescript": "^5.1.6"
}
}
17 changes: 17 additions & 0 deletions packages/sdk/TRANSITIONS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# Transitions

## 0010 Deprecate interaction

- **Date:** Sept 25th 2023
- **Type:** Deprecation of interaction method

The "interaction" method has been deprecated and will be removed in future versions.

Please update your code to use the "initInteraction" method for improved functionality and compatibility.

```javascript
// Deprecated:
const result = interaction();

// Recommended:
const result = initInteraction();
```

## 0009 Deprecate default compute limit

- **Date:** Jun 7th 2022
Expand Down
1 change: 1 addition & 0 deletions packages/sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"devDependencies": {
"@onflow/fcl-bundle": "^1.4.1",
"@onflow/typedefs": "^1.2.1",
"@types/uuid": "^9.0.6",
"eslint": "^8.35.0",
"eslint-plugin-jsdoc": "^40.0.1",
"jest": "^29.5.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ const response = await sdk.send(await sdk.build([

- [Builders](./src/build)

- [`sdk.args` & `sdk.arg`](./src/build/build-arguments.js)
- [`sdk.args` & `sdk.arg`](./src/build/build-arguments.ts)
- [`sdk.atBlockHeight`](./src/build/build-at-block-height.js)
- [`sdk.atBlockId`](./src/build/build-at-block-id.js)
- [`sdk.authorizations` & `authorization`](./src/build/build-authorizations.js)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {pipe, makeArgument} from "../interaction/interaction.js"
import {pipe, makeArgument} from "../interaction/interaction"
import {TypeDescriptorInput, TypeDescriptor} from "@onflow/types"

/**
* @description - A utility builder to be used with other builders to pass in arguments with a value and supported type
Expand All @@ -15,6 +16,9 @@ export function args(ax = []) {
* @param {Function} xform - A function to transform the value
* @returns {object} - An argument object
*/
export function arg(value, xform) {
export function arg<T extends TypeDescriptor<any, {
type: string;
value: string;
}>>(value: TypeDescriptorInput<T>, xform: T) {
return {value, xform}
}
2 changes: 1 addition & 1 deletion packages/sdk/src/build/build-at-block-height.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {pipe} from "../interaction/interaction.js"
import {pipe} from "../interaction/interaction"
import {validator} from "./build-validator.js"

/**
Expand Down
4 changes: 2 additions & 2 deletions packages/sdk/src/build/build-at-block-height.test.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import {interaction} from "../interaction/interaction.js"
import {initInteraction} from "../interaction/interaction"
import {atBlockHeight} from "./build-at-block-height.js"

describe("Build At Block ID", () => {
test("At Block ID", async () => {
const blockHeight = 123

const ix = await atBlockHeight(blockHeight)(interaction())
const ix = await atBlockHeight(blockHeight)(initInteraction())

expect(ix.block.height).toBe(blockHeight)
})
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/src/build/build-at-block-id.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {isGetAccount, pipe, Ok} from "../interaction/interaction.js"
import {isGetAccount, pipe, Ok} from "../interaction/interaction"
import {validator} from "./build-validator.js"

export function atBlockId(id) {
Expand Down
Loading
Loading