haedal-vault-sdk 2.2.1 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,16 +1,25 @@
1
1
  {
2
2
  "name": "haedal-vault-sdk",
3
- "version": "2.2.1",
3
+ "version": "2.4.0",
4
4
  "description": "Haedal Vault SDK",
5
- "typings": "dist/index.d.ts",
6
- "main": "dist/index.js",
7
- "module": "dist/index.mjs",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.js",
12
+ "require": "./dist/index.cjs",
13
+ "default": "./dist/index.js"
14
+ }
15
+ },
8
16
  "scripts": {
9
- "test": "jest",
17
+ "test": "vitest run",
18
+ "test:watch": "vitest",
10
19
  "lint:fix": "eslint src/*.ts src/**/*.ts --fix",
11
20
  "build": "rm -rf dist/ && tsc",
12
21
  "testbuild": "tsc",
13
- "prepare": "husky install",
22
+ "prepare": "node -e \"try { require('husky').install() } catch (e) { console.warn('husky install skipped:', e.message) }\"",
14
23
  "build:tsup": "npm run build:clean && npm run _build:node",
15
24
  "build:clean": "rm -rf dist",
16
25
  "_build:node": "tsup --format cjs,esm --dts",
@@ -23,16 +32,23 @@
23
32
  "keywords": [],
24
33
  "author": "test",
25
34
  "license": "Apache-2.0",
35
+ "dependencies": {
36
+ "@suchipi/femver": "^1.0.0",
37
+ "axios": "^1.4.0",
38
+ "bn.js": "^5.2.1",
39
+ "decimal.js": "^10.4.1",
40
+ "dotenv": "^16.4.5",
41
+ "isomorphic-fetch": "^3.0.0",
42
+ "js-base64": "^3.7.4",
43
+ "js-sha3": "^0.8.0",
44
+ "superstruct": "^1.0.3",
45
+ "tiny-invariant": "^1.1.0",
46
+ "tweetnacl": "^1.0.3",
47
+ "@pythnetwork/pyth-sui-js": "2.4.0"
48
+ },
26
49
  "devDependencies": {
27
- "@cetusprotocol/aggregator-sdk": "^1.4.1",
28
- "@cetusprotocol/sui-clmm-sdk": "1.2.6",
29
- "@cetusprotocol/common-sdk": "1.2.7",
30
- "@cetusprotocol/dlmm-sdk": "1.1.0",
31
50
  "@commitlint/cli": "^17.1.2",
32
51
  "@commitlint/config-conventional": "^17.1.0",
33
- "@mysten/sui": "^1.43.1",
34
- "@pythnetwork/pyth-sui-js": "2.3.0",
35
- "@types/jest": "^29.0.0",
36
52
  "@types/lossless-json": "^1.0.1",
37
53
  "@typescript-eslint/eslint-plugin": "^5.36.1",
38
54
  "@typescript-eslint/parser": "^5.36.1",
@@ -45,39 +61,30 @@
45
61
  "eslint-plugin-import": "^2.26.0",
46
62
  "eslint-plugin-prettier": "^4.2.1",
47
63
  "husky": "^8.0.1",
48
- "jest": "^29.0.0",
49
64
  "lint-staged": "^13.0.3",
50
65
  "prettier": "^2.7.1",
51
66
  "terser": "^5.39.0",
52
- "ts-jest": "^29.0.0",
67
+ "vitest": "4.0.18",
53
68
  "@types/bn.js": "^5.1.1",
54
69
  "tsup": "^6.6.2",
55
- "typescript": "^5.7.3"
56
- },
57
- "dependencies": {
58
- "@suchipi/femver": "^1.0.0",
59
- "axios": "^1.4.0",
60
- "bn.js": "^5.2.1",
61
- "decimal.js": "^10.4.1",
62
- "dotenv": "^16.4.5",
63
- "isomorphic-fetch": "^3.0.0",
64
- "js-base64": "^3.7.4",
65
- "js-sha3": "^0.8.0",
66
- "superstruct": "^1.0.3",
67
- "tiny-invariant": "^1.1.0",
68
- "tweetnacl": "^1.0.3"
69
- },
70
- "peerDependencies": {
71
- "@cetusprotocol/aggregator-sdk": ">=1.1.6",
72
- "@cetusprotocol/sui-clmm-sdk": ">=1.0.1",
73
- "@mysten/sui": ">=1.34.0",
74
- "@pythnetwork/pyth-sui-js": ">=2.3.0",
75
- "@cetusprotocol/dlmm-sdk": ">=1.1.0"
70
+ "typescript": "^5.7.3",
71
+ "@cetusprotocol/aggregator-sdk": "1.4.6",
72
+ "@cetusprotocol/sui-clmm-sdk": "1.4.1",
73
+ "@mysten/sui": "2.6.0",
74
+ "@cetusprotocol/dlmm-sdk": "1.2.2",
75
+ "@cetusprotocol/common-sdk": "1.3.3"
76
76
  },
77
77
  "lint-staged": {
78
78
  "src/**.{ts,js}": "eslint --fix",
79
79
  "src/*/**.{ts,js}": "eslint --fix"
80
80
  },
81
+ "peerDependencies": {
82
+ "@mysten/sui": "*",
83
+ "@cetusprotocol/aggregator-sdk": "*",
84
+ "@cetusprotocol/sui-clmm-sdk": "*",
85
+ "@cetusprotocol/dlmm-sdk": "*",
86
+ "@cetusprotocol/common-sdk": "*"
87
+ },
81
88
  "commitlint": {
82
89
  "extends": [
83
90
  "@commitlint/config-conventional"
package/tsup.config.js CHANGED
@@ -6,6 +6,7 @@ export default defineConfig({
6
6
  sourcemap: false,
7
7
  minify: true,
8
8
  target: 'esnext',
9
+ format: ['esm', 'cjs'],
9
10
  esbuildOptions(options) {
10
11
  options.drop = ['console']
11
12
  },
package/version.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // Don't sync to github
2
2
 
3
- const fs = require('fs');
3
+ import fs from 'fs';
4
4
 
5
5
  const packageJsonPath = './package.json';
6
6
  const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
@@ -0,0 +1,15 @@
1
+ import { defineConfig } from 'vitest/config'
2
+ import path from 'node:path'
3
+
4
+ export default defineConfig({
5
+ test: {
6
+ include: ['tests/**/*.test.ts', 'tests/**/*.spec.ts'],
7
+ testTimeout: 180_000,
8
+ globals: true,
9
+ },
10
+ resolve: {
11
+ alias: {
12
+ '@': path.resolve(__dirname, './src'),
13
+ },
14
+ },
15
+ })