File tree Expand file tree Collapse file tree 5 files changed +7
-7
lines changed
template/clients/js/clients/js Expand file tree Collapse file tree 5 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ import {
23
23
setTransactionLifetimeUsingBlockhash ,
24
24
signTransactionWithSigners ,
25
25
} from '@solana/web3.js' ;
26
- import { findCounterPda , getCreateInstructionAsync } from '../src' ;
26
+ import { findCounterPda , getCreateInstructionAsync } from '../src/index.js ' ;
27
27
28
28
type Client = {
29
29
rpc : Rpc < SolanaRpcApi > ;
Original file line number Diff line number Diff line change @@ -4,13 +4,13 @@ import {
4
4
Counter ,
5
5
fetchCounterFromSeeds ,
6
6
getCreateInstructionAsync ,
7
- } from '../src' ;
7
+ } from '../src/index.js ' ;
8
8
import {
9
9
createDefaultSolanaClient ,
10
10
createDefaultTransaction ,
11
11
generateKeyPairSignerWithSol ,
12
12
signAndSendTransaction ,
13
- } from './_setup' ;
13
+ } from './_setup.js ' ;
14
14
15
15
test ( 'it creates a new counter account' , async ( t ) => {
16
16
// Given an authority key pair with some SOL.
Original file line number Diff line number Diff line change @@ -5,15 +5,15 @@ import {
5
5
findCounterPda,
6
6
getIncrementInstruction,
7
7
getIncrementInstructionAsync,
8
- } from '../src';
8
+ } from '../src/index.js ';
9
9
import {
10
10
createCounterForAuthority,
11
11
createDefaultSolanaClient,
12
12
createDefaultTransaction,
13
13
generateKeyPairSignerWithSol,
14
14
getBalance,
15
15
signAndSendTransaction,
16
- } from './_setup';
16
+ } from './_setup.js ';
17
17
18
18
test('it increments an existing counter by 1 by default', async (t) => {
19
19
// Given an authority key pair with an associated counter account of value 0.
Original file line number Diff line number Diff line change 8
8
"forceConsistentCasingInFileNames" : true ,
9
9
"inlineSources" : false ,
10
10
"isolatedModules" : true ,
11
- "module" : " commonjs " ,
11
+ "module" : " ESNext " ,
12
12
"moduleResolution" : " node" ,
13
13
"noFallthroughCasesInSwitch" : true ,
14
14
"noUnusedLocals" : true ,
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ export default defineConfig(() => [
21
21
...SHARED_OPTIONS ,
22
22
bundle : false ,
23
23
entry : [ './test/*.ts' ] ,
24
- format : 'cjs ' ,
24
+ format : 'esm ' ,
25
25
outDir : './dist/test' ,
26
26
} ,
27
27
] ) ;
You can’t perform that action at this time.
0 commit comments