Skip to content

Commit b75ec2d

Browse files
committed
fix(crank_executor): fixed build
1 parent 029f1f3 commit b75ec2d

File tree

4 files changed

+27
-8
lines changed

4 files changed

+27
-8
lines changed

governance/xc_admin/packages/crank_executor/package.json

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"author": "",
77
"homepage": "https://github.com/pyth-network/pyth-crosschain",
88
"license": "ISC",
9-
"main": "src/index.ts",
9+
"main": "./dist/index.js",
1010
"repository": {
1111
"type": "git",
1212
"url": "git+https://github.com/pyth-network/pyth-crosschain.git"
@@ -15,8 +15,8 @@
1515
"url": "https://github.com/pyth-network/pyth-crosschain/issues"
1616
},
1717
"scripts": {
18-
"build": "ts-duality",
19-
"start": "node lib/index.js",
18+
"build": "ts-duality --noEsm",
19+
"start": "node dist/index.js",
2020
"fix:format": "prettier --write \"src/**/*.ts\"",
2121
"test:format": "prettier --check \"src/**/*.ts\"",
2222
"clean": "rm -rf ./dist"
@@ -38,5 +38,14 @@
3838
"pnpm": ">=10.19.0"
3939
},
4040
"packageManager": "[email protected]",
41-
"type": "module"
41+
"type": "module",
42+
"exports": {
43+
".": {
44+
"default": "./dist/index.js",
45+
"types": "./dist/index.d.ts"
46+
},
47+
"./package.json": "./package.json"
48+
},
49+
"module": "./dist/esm/index.js",
50+
"types": "./dist/index.d.ts"
4251
}

governance/xc_admin/packages/crank_executor/src/index.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
import { Commitment, Connection, Keypair, PublicKey } from "@solana/web3.js";
1+
import {
2+
type Commitment,
3+
Connection,
4+
Keypair,
5+
PublicKey,
6+
} from "@solana/web3.js";
27
import SquadsMesh, { DEFAULT_MULTISIG_PROGRAM_ID } from "@sqds/mesh";
38
import * as fs from "fs";
49
import NodeWallet from "@project-serum/anchor/dist/cjs/nodewallet";
@@ -9,7 +14,7 @@ import {
914
} from "@pythnetwork/xc-admin-common";
1015
import {
1116
getPythClusterApiUrl,
12-
PythCluster,
17+
type PythCluster,
1318
} from "@pythnetwork/client/lib/cluster";
1419

1520
const CLUSTER: PythCluster = envOrErr("CLUSTER") as PythCluster;
@@ -42,7 +47,7 @@ async function run() {
4247
// If we have previously cancelled because the proposal was failing, don't attempt
4348
if (proposal.cancelled.length == 0) {
4449
await executeProposal(proposal, squad, CLUSTER, COMMITMENT, {
45-
computeUnitPriceMicroLamports: COMPUTE_UNIT_PRICE_MICROLAMPORTS,
50+
computeUnitPriceMicroLamports: COMPUTE_UNIT_PRICE_MICROLAMPORTS!,
4651
});
4752
} else {
4853
console.log("Skipping: ", proposal.publicKey.toBase58());

governance/xc_admin/packages/crank_executor/tsconfig.build.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
"compilerOptions": {
44
"noEmit": false,
55
"incremental": false,
6-
"declaration": true
6+
"declaration": true,
7+
"isolatedModules": false
78
},
89
"exclude": [
910
"node_modules",
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
{
22
"extends": "@cprussin/tsconfig/base.json",
33
"include": ["src"],
4+
"compilerOptions": {
5+
"module": "preserve",
6+
"moduleResolution": "node"
7+
},
48
"exclude": ["dist", "node_modules", "**/__tests__/*"]
59
}

0 commit comments

Comments
 (0)