Skip to content

Commit 8dd5756

Browse files
authored
Switch to native bigint for calculations, begin migration to ESM (#774)
* Switch to native bigint for calculations * fix size-limit
1 parent 96b61a3 commit 8dd5756

File tree

39 files changed

+2163
-1488
lines changed

39 files changed

+2163
-1488
lines changed

.yarn/sdks/eslint/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eslint",
3-
"version": "8.54.0-sdk",
3+
"version": "8.57.0-sdk",
44
"main": "./lib/api.js",
55
"type": "commonjs",
66
"bin": {

.yarn/sdks/prettier/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "prettier",
3-
"version": "3.1.0-sdk",
3+
"version": "3.2.5-sdk",
44
"main": "./index.cjs",
55
"type": "commonjs",
66
"bin": "./bin/prettier.cjs"

.yarn/sdks/typescript/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "typescript",
3-
"version": "5.3.2-sdk",
3+
"version": "5.4.5-sdk",
44
"main": "./lib/typescript.js",
55
"type": "commonjs",
66
"bin": {

package.json

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -12,47 +12,47 @@
1212
"*.{md,js,jsx,json,yml,yaml,css,md}": "prettier --write"
1313
},
1414
"devDependencies": {
15-
"@babel/core": "^7.23.5",
16-
"@babel/preset-env": "^7.23.5",
17-
"@babel/preset-typescript": "^7.23.3",
15+
"@babel/core": "^7.24.4",
16+
"@babel/preset-env": "^7.24.4",
17+
"@babel/preset-typescript": "^7.24.1",
1818
"@coral-xyz/anchor": "^0.29.0",
1919
"@jest/types": "^29.6.3",
20-
"@rushstack/eslint-patch": "^1.6.0",
21-
"@saberhq/eslint-config": "^3.2.1",
22-
"@saberhq/eslint-config-react": "^3.2.1",
23-
"@saberhq/tsconfig": "^3.2.1",
20+
"@rushstack/eslint-patch": "^1.10.2",
21+
"@saberhq/eslint-config": "^3.3.1",
22+
"@saberhq/eslint-config-react": "^3.3.1",
23+
"@saberhq/tsconfig": "^3.3.1",
2424
"@saberhq/use-solana": "workspace:*",
25-
"@size-limit/file": "^11.0.0",
26-
"@size-limit/webpack": "^11.0.0",
27-
"@size-limit/webpack-why": "^11.0.0",
25+
"@size-limit/file": "^11.1.2",
26+
"@size-limit/webpack": "^11.1.2",
27+
"@size-limit/webpack-why": "^11.1.2",
2828
"@solana/web3.js": "^1.91.1",
2929
"@types/babel__core": "^7.20.5",
3030
"@types/babel__preset-env": "^7.9.6",
3131
"@types/bn.js": "^5.1.5",
32-
"@types/eslint": "^8.44.8",
33-
"@types/jest": "^29.5.10",
34-
"@types/node": "^18.18.14",
35-
"@types/react": "^18.2.39",
32+
"@types/eslint": "^8.56.9",
33+
"@types/jest": "^29.5.12",
34+
"@types/node": "^20.12.7",
35+
"@types/react": "^18.2.77",
3636
"@types/source-map-support": "^0.5.10",
3737
"@types/w3c-web-usb": "^1.0.10",
38-
"@typescript-eslint/utils": "^6.13.1",
38+
"@typescript-eslint/utils": "^7.6.0",
3939
"@yarnpkg/doctor": "^4.0.1",
4040
"bn.js": "^5.2.1",
4141
"buffer": "^6.0.3",
42-
"eslint": "^8.54.0",
43-
"husky": "^8.0.3",
42+
"eslint": "^8.57.0",
43+
"husky": "^9.0.11",
4444
"jest": "^29.7.0",
4545
"jest-runtime": "^29.7.0",
4646
"jsbi": "^4.3.0",
47-
"lint-staged": "^15.1.0",
48-
"prettier": "^3.1.0",
47+
"lint-staged": "^15.2.2",
48+
"prettier": "^3.2.5",
4949
"react": "^18.2.0",
50-
"size-limit": "^11.0.0",
50+
"size-limit": "^11.1.2",
5151
"source-map-support": "^0.5.21",
52-
"ts-jest": "^29.1.1",
53-
"ts-node": "^10.9.1",
54-
"typedoc": "^0.25.4",
55-
"typescript": "^5.3.2"
52+
"ts-jest": "^29.1.2",
53+
"ts-node": "^10.9.2",
54+
"typedoc": "^0.25.13",
55+
"typescript": "^5.4.5"
5656
},
5757
"scripts": {
5858
"build": "yarn workspaces foreach --all --exclude @saberhq/saber-common -ptv run build",

packages/anchor-contrib/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@
2828
},
2929
"devDependencies": {
3030
"@coral-xyz/anchor": "^0.29.0",
31-
"@saberhq/tsconfig": "^3.2.1",
31+
"@saberhq/tsconfig": "^3.3.1",
3232
"@solana/web3.js": "^1.91.1",
3333
"@types/lodash.camelcase": "^4.3.9",
3434
"@types/lodash.mapvalues": "^4.6.9",
3535
"bn.js": "^5.2.1",
36-
"typescript": "^5.3.2"
36+
"typescript": "^5.4.5"
3737
},
3838
"dependencies": {
3939
"@saberhq/solana-contrib": "workspace:^",

packages/chai-solana/package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"bugs": "https://github.com/saber-hq/saber-common/issues",
88
"author": "Saber Team <[email protected]>",
99
"license": "Apache-2.0",
10+
"type": "module",
1011
"scripts": {
1112
"build": "tsc && tsc --project tsconfig.cjs.json",
1213
"clean": "rm -fr dist/",
@@ -28,10 +29,10 @@
2829
"@saberhq/anchor-contrib": "workspace:^",
2930
"@saberhq/solana-contrib": "workspace:^",
3031
"@saberhq/token-utils": "workspace:^",
31-
"@types/chai": "^4.3.11",
32+
"@types/chai": "^4.3.14",
3233
"@types/chai-as-promised": "^7.1.8",
3334
"@types/promise-retry": "^1.1.6",
34-
"chai": "=4.3.4",
35+
"chai": "^5.1.0",
3536
"chai-as-promised": "^7.1.1",
3637
"chai-bn": "^0.3.1",
3738
"colors": "^1.4.0",
@@ -49,10 +50,10 @@
4950
},
5051
"devDependencies": {
5152
"@coral-xyz/anchor": "^0.29.0",
52-
"@saberhq/tsconfig": "^3.2.1",
53+
"@saberhq/tsconfig": "^3.3.1",
5354
"@solana/web3.js": "^1.91.1",
5455
"bn.js": "^5.2.1",
5556
"jsbi": "^4.3.0",
56-
"typescript": "^5.3.2"
57+
"typescript": "^5.4.5"
5758
}
5859
}

packages/chai-solana/src/index.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import type { Address } from "@coral-xyz/anchor";
99
import { BN } from "@coral-xyz/anchor";
1010
import { TokenAmount } from "@saberhq/token-utils";
1111
import { PublicKey } from "@solana/web3.js";
12-
import chaiAsPromised from "chai-as-promised";
12+
import { default as chaiAsPromised } from "chai-as-promised";
1313
import { default as chaiBN } from "chai-bn";
1414

1515
export * from "./debugAccountOwners.js";
@@ -18,7 +18,11 @@ export * from "./printInstructionLogs.js";
1818
export * from "./utils.js";
1919

2020
export const chaiSolana: Chai.ChaiPlugin = (chai) => {
21-
chai.use(chaiBN(BN) as Chai.ChaiPlugin);
21+
chai.use(
22+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
23+
// @ts-ignore
24+
chaiBN(BN) as Chai.ChaiPlugin,
25+
);
2226
chai.use(chaiAsPromised);
2327
chai.config.includeStack = true;
2428

packages/option-utils/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"tslib": "^2.6.2"
3737
},
3838
"devDependencies": {
39-
"@saberhq/tsconfig": "^3.2.1",
40-
"typescript": "^5.3.2"
39+
"@saberhq/tsconfig": "^3.3.1",
40+
"typescript": "^5.4.5"
4141
}
4242
}

packages/solana-contrib/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,22 @@
2727
],
2828
"dependencies": {
2929
"@saberhq/option-utils": "workspace:^",
30-
"@solana/buffer-layout": "^4.0.0",
30+
"@solana/buffer-layout": "^4.0.1",
3131
"@types/promise-retry": "^1.1.6",
3232
"@types/retry": "^0.12.5",
3333
"promise-retry": "^2.0.1",
3434
"retry": "^0.13.1",
35-
"tiny-invariant": "^1.3.1",
35+
"tiny-invariant": "^1.3.3",
3636
"tslib": "^2.6.2"
3737
},
3838
"devDependencies": {
39-
"@saberhq/tsconfig": "^3.2.1",
39+
"@saberhq/tsconfig": "^3.3.1",
4040
"@solana/web3.js": "^1.91.1",
4141
"@types/bn.js": "^5.1.5",
42-
"@types/jest": "^29.5.10",
43-
"@types/node": "^18.18.14",
42+
"@types/jest": "^29.5.12",
43+
"@types/node": "^20.12.7",
4444
"bn.js": "^5.2.1",
45-
"typescript": "^5.3.2"
45+
"typescript": "^5.4.5"
4646
},
4747
"peerDependencies": {
4848
"@solana/web3.js": "^1.42",
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
{
22
"extends": "@saberhq/tsconfig/tsconfig.cjs.json",
33
"compilerOptions": {
4-
"outDir": "dist/cjs/",
5-
"lib": ["ES2021.Promise", "ES2019"]
4+
"outDir": "dist/cjs/"
65
},
76
"include": ["src/"]
87
}

0 commit comments

Comments
 (0)