Skip to content

Commit ee78273

Browse files
committed
feat: esm support
1 parent 642be41 commit ee78273

File tree

4 files changed

+280
-15
lines changed

4 files changed

+280
-15
lines changed

package.json

+12-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,15 @@
33
"version": "1.2.4",
44
"description": "Typescript SDK for the Orca protocol.",
55
"main": "dist/index.js",
6+
"module": "dist/index.mjs",
67
"types": "dist/index.d.ts",
8+
"exports": {
9+
".": {
10+
"require": "./dist/index.js",
11+
"import": "./dist/index.mjs",
12+
"types": "./dist/index.d.ts"
13+
}
14+
},
715
"license": "MIT",
816
"dependencies": {
917
"@orca-so/aquafarm": "^0.0.12",
@@ -28,14 +36,15 @@
2836
"lint-staged": ">=10",
2937
"prettier": "^2.3.2",
3038
"ts-jest": "^27.0.3",
39+
"tsup": "^5.10.0",
3140
"typescript": "^4.3.2"
3241
},
3342
"scripts": {
34-
"build": "tsc -p src",
35-
"watch": "tsc -w -p src",
43+
"build": "tsup src/index.ts --format esm,cjs --dts",
44+
"watch": "tsup src/index.ts --watch --format esm,cjs --dts",
3645
"prettier-format": "prettier --config .prettierrc 'src/**/*.ts' --write",
3746
"prepare": "husky install",
38-
"prepublishOnly": "tsc -p src",
47+
"prepublishOnly": "tsup src/index.ts --format esm,cjs --dts",
3948
"test": "jest"
4049
},
4150
"lint-staged": {

src/public/utils/numbers/u64-utils.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { u64 } from "@solana/spl-token";
22
import Decimal from "decimal.js";
3-
import { OrcaToken, OrcaU64 } from "../..";
3+
import { OrcaU64 } from ".";
4+
import { OrcaToken } from "../..";
45
import { OrcaFarmParams } from "../../../model/orca/farm/farm-types";
56
import { OrcaPoolParams } from "../../../model/orca/pool/pool-types";
67
import { DecimalUtil } from "./decimal-utils";

src/tsconfig.json

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
{
22
"extends": "../tsconfig-base.json",
3-
"compilerOptions": {
4-
"composite": true,
5-
},
6-
}
3+
"compilerOptions": {}
4+
}

0 commit comments

Comments
 (0)