Skip to content

Commit 7220b30

Browse files
AlexKushnir1AlexKushnir1
AlexKushnir1
authored and
AlexKushnir1
committed
fix: importing around packages & github linting workflow
use near-workspaces dep againts importing by relative path & add building as dist/ was excluded and linter doesnt see imported deps
1 parent 6bf4f69 commit 7220b30

12 files changed

+39
-30
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

__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, NEAR, type NearAccount} from '../packages/js';
11+
import {Worker, NEAR, type NearAccount} 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
@@ -14,7 +14,7 @@
1414
import anyTest, {type TestFn} from 'ava';
1515
import {
1616
Worker, createKeyPair, NEAR, type NearAccount,
17-
} from '../packages/js';
17+
} from 'near-workspaces';
1818

1919
/* Contract API for reference
2020
impl Linkdrop {

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import anyTest, {type TestFn} from 'ava';
1717
import {
1818
Worker, type NearAccount, captureError, BN, NEAR,
19-
} from '../packages/js';
19+
} from 'near-workspaces';
2020

2121
const STORAGE_BYTE_COST = '1.5 mN';
2222

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import {
2525
type NearAccount,
2626
Worker,
2727
captureError,
28-
} from '../packages/js';
28+
} from 'near-workspaces';
2929

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

__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, NEAR, type NearAccount} from '../packages/js';
9+
import {Worker, NEAR, type NearAccount} 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",

pnpm-lock.yaml

+26-20
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-workspace.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
packages:
2-
- "packages/js/**"
2+
- "packages/*"

0 commit comments

Comments
 (0)