Skip to content

Commit e38cb3a

Browse files
AlexKushnir1AlexKushnir1
AlexKushnir1
authored and
AlexKushnir1
committed
Merge branch 'typescript-updating' into remove-bnjs-and-near-units
2 parents 0eda006 + 7220b30 commit e38cb3a

File tree

94 files changed

+77
-3384
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+77
-3384
lines changed

.github/workflows/lint.yml

+1
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,5 @@ jobs:
2121
cache: 'pnpm'
2222

2323
- run: pnpm install
24+
- run: pnpm build
2425
- run: pnpm lint

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ near-vm-*.tar.gz
22
node_modules/
33
.near-credentials/
44
coverage
5-
**/dist/tsconfig.tsbuildinfo
65
.idea
76
package-lock.json
7+
**/dist/

.husky/pre-commit

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/sh
22
. "$(dirname "$0")/_/husky.sh"
33

4-
pnpm lint && pnpm build && git add packages/*/dist
4+
pnpm lint && pnpm build

__tests__/01.basic-transactions.ava.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* package.json.
99
*/
1010
import anyTest, {type TestFn} from 'ava';
11-
import {Worker, type NearAccount, parseNEAR} from '../packages/js';
11+
import {Worker, type NearAccount, parseNEAR} from 'near-workspaces';
1212

1313
const test = anyTest as TestFn<{
1414
worker: Worker;

__tests__/03.single-use-access-keys-with-linkdrop.ava.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import anyTest, {type TestFn} from 'ava';
1515
import {
1616
DEFAULT_FUNCTION_CALL_GAS,
1717
Worker, createKeyPair, parseNEAR, type NearAccount,
18-
} from '../packages/js';
18+
} from 'near-workspaces';
1919

2020
/* Contract API for reference
2121
impl Linkdrop {

__tests__/04.cross-contract-calls-with-fungible-token.ava.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import {
1818
Worker, type NearAccount, captureError,
1919
parseNEAR,
2020
DEFAULT_FUNCTION_CALL_GAS,
21-
} from '../packages/js';
21+
} from 'near-workspaces';
2222

2323
const STORAGE_BYTE_COST = BigInt(parseNEAR('0.0015'));
2424

__tests__/05.spoon-contract-to-sandbox.ava.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import {
2424
Worker,
2525
captureError,
2626
parseNEAR,
27-
} from '../packages/js';
27+
} from 'near-workspaces';
2828

2929
const REF_FINANCE_ACCOUNT = 'v2.ref-finance.near';
3030

__tests__/06.init-config.ava.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import anyTest, {type TestFn} from 'ava';
2-
import {getNetworkFromEnv, type NearAccount, Worker} from '../packages/js';
2+
import {getNetworkFromEnv, type NearAccount, Worker} from 'near-workspaces';
33

44
if (getNetworkFromEnv() === 'testnet') {
55
const test = anyTest as TestFn<{

__tests__/07.resue-worker.ava.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* It means that they should not depend on each other.
77
*/
88
import anyTest, {type TestFn} from 'ava';
9-
import {Worker, type NearAccount, parseNEAR} from '../packages/js';
9+
import {Worker, type NearAccount, parseNEAR} from 'near-workspaces';
1010

1111
const test = anyTest as TestFn<{
1212
worker: Worker;

__tests__/08.custom-network.ava.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import process from 'process';
22
import anyTest, {type TestFn} from 'ava';
3-
import {Worker, getNetworkFromEnv} from '../packages/js';
3+
import {Worker, getNetworkFromEnv} from 'near-workspaces';
44

55
// To run this test, you need to set the NEAR_RPC_API_KEY environment variable tied the Pagoda testnet network.
66
// And the NEAR_WORKSPACES_NETWORK environment variable to 'custom'.

__tests__/09.fast-forward.ava.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import anyTest, {type TestFn} from 'ava';
2-
import {type NearAccount, Worker, getNetworkFromEnv} from '../packages/js';
2+
import {type NearAccount, Worker, getNetworkFromEnv} from 'near-workspaces';
33

44
// The contract provided contains only one view call, returning the
55
// block_timestamp and epoch_height of the current block as a tuple.

package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,14 @@
2727
"@types/fs-extra": "^9.0.12",
2828
"@types/node": "20.0.0",
2929
"@types/rimraf": "^3.0.1",
30+
"borsh": "^0.5.0",
3031
"ava": "^6.2.0",
3132
"husky": "^7.0.1",
3233
"ts-node": "^10.9.1",
3334
"typedoc": "^0.24",
3435
"typescript": "5.4.5",
35-
"xo": "^0.60.0"
36+
"xo": "^0.60.0",
37+
"near-workspaces": "workspace:*"
3638
},
3739
"engines": {
3840
"node": ">=20.15.0",

packages/js/dist/account/account-manager.d.ts

-98
This file was deleted.

packages/js/dist/account/account-manager.d.ts.map

-1
This file was deleted.

0 commit comments

Comments
 (0)