Skip to content

Commit

Permalink
feat: move to tsx (#194)
Browse files Browse the repository at this point in the history
Doing this because couple of folks (including myself) have faced issues
running `pnpm run test` on our local machines. `ts-node` has an open
issue on this, where it occasionally won't execute ESM files with the
new Typescript version (post v5.5)
TypeStrong/ts-node#2086
  • Loading branch information
thearyanag authored Jan 11, 2025
2 parents dca508b + 338cc41 commit eb25c6b
Show file tree
Hide file tree
Showing 6 changed files with 364 additions and 95 deletions.
8 changes: 0 additions & 8 deletions examples/agent-kit-langgraph/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
"test": "echo \"Error: no test specified\" && exit 1",
"dev": "tsx"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@langchain/community": "^0.3.20",
"@langchain/core": "^0.3.26",
Expand All @@ -20,12 +17,7 @@
"zod": "^3.24.1"
},
"devDependencies": {
"ts-node": "^10.9.2",
"tsx": "^4.19.2",
"typescript": "^5.0.0"
},
"ts-node": {
"esm": true,
"experimentalSpecifierResolution": "node"
}
}
3 changes: 0 additions & 3 deletions examples/market-making-agent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
"scripts": {
"main": "ts-node index.ts"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@langchain/langgraph-checkpoint-postgres": "^0.0.2",
"solana-agent-kit": "^1.3.6"
Expand Down
4 changes: 2 additions & 2 deletions examples/persistent-agent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Starting chat mode... Type 'exit' to end.
Prompt: i am arpit
Hello Arpit! How can I assist you today?
Prompt: ^С
® arpitsingh Mac persistent-agent & ts-node index.ts
$ ts-node index.ts
Starting Agent...
Available modes:
1. chat
Expand All @@ -51,7 +51,7 @@ Starting chat mode... Type 'exit' to end.
Prompt: i am arpit
Hello Arpit! How can I assist you today?
Prompt: ^С
® arpitsingh Mac persistent-agent & ts-node index.ts
$ ts-node index.ts
Starting Agent...
Available modes:
1. chat
Expand Down
2 changes: 1 addition & 1 deletion guides/test_it_out.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The project includes a test script located at `test/index.ts`. To execute the te
```bash
pnpm run test
```
This will run the `test/index.ts` script using `ts-node`. Ensure that your environment variables are correctly set in the `.env` file before running the tests.
This will run the `test/index.ts` script using `tsx`. Ensure that your environment variables are correctly set in the `.env` file before running the tests.

## Interactive Modes

Expand Down
156 changes: 78 additions & 78 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,81 +1,81 @@
{
"name": "solana-agent-kit",
"version": "1.3.8",
"description": "connect any ai agents to solana protocols",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"build": "tsc",
"docs": "typedoc src --out docs",
"test": "ts-node test/index.ts",
"test:vercel-ai": "ts-node test/agent_sdks/vercel_ai.ts",
"generate": "ts-node src/utils/keypair.ts",
"lint": "eslint . --ext .ts",
"lint:fix": "eslint . --ext .ts --fix",
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
"prepare": "husky"
},
"engines": {
"node": ">=22.0.0",
"pnpm": ">=8.0.0"
},
"keywords": [],
"author": "sendaifun",
"license": "Apache-2.0",
"dependencies": {
"@3land/listings-sdk": "^0.0.4",
"@ai-sdk/openai": "^1.0.11",
"@bonfida/spl-name-service": "^3.0.7",
"@cks-systems/manifest-sdk": "0.1.59",
"@coral-xyz/anchor": "0.29",
"@langchain/core": "^0.3.26",
"@langchain/groq": "^0.1.2",
"@langchain/langgraph": "^0.2.36",
"@langchain/openai": "^0.3.16",
"@lightprotocol/compressed-token": "^0.17.1",
"@lightprotocol/stateless.js": "^0.17.1",
"@metaplex-foundation/mpl-core": "^1.1.1",
"@metaplex-foundation/mpl-token-metadata": "^3.3.0",
"@metaplex-foundation/mpl-toolbox": "^0.9.4",
"@metaplex-foundation/umi": "^0.9.2",
"@metaplex-foundation/umi-bundle-defaults": "^0.9.2",
"@metaplex-foundation/umi-web3js-adapters": "^0.9.2",
"@onsol/tldparser": "^0.6.7",
"@orca-so/common-sdk": "0.6.4",
"@orca-so/whirlpools-sdk": "^0.13.12",
"@pythnetwork/hermes-client": "^1.3.0",
"@raydium-io/raydium-sdk-v2": "0.1.95-alpha",
"@solana/spl-token": "^0.4.9",
"@solana/web3.js": "^1.98.0",
"@tensor-oss/tensorswap-sdk": "^4.5.0",
"name": "solana-agent-kit",
"version": "1.3.8",
"description": "connect any ai agents to solana protocols",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"build": "tsc",
"docs": "typedoc src --out docs",
"test": "tsx test/index.ts",
"test:vercel-ai": "tsx test/agent_sdks/vercel_ai.ts",
"generate": "tsx src/utils/keypair.ts",
"lint": "eslint . --ext .ts",
"lint:fix": "eslint . --ext .ts --fix",
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
"prepare": "husky"
},
"engines": {
"node": ">=22.0.0",
"pnpm": ">=8.0.0"
},
"keywords": [],
"author": "sendaifun",
"license": "Apache-2.0",
"dependencies": {
"@3land/listings-sdk": "^0.0.4",
"@ai-sdk/openai": "^1.0.11",
"@bonfida/spl-name-service": "^3.0.7",
"@cks-systems/manifest-sdk": "0.1.59",
"@coral-xyz/anchor": "0.29",
"@langchain/core": "^0.3.26",
"@langchain/groq": "^0.1.2",
"@langchain/langgraph": "^0.2.36",
"@langchain/openai": "^0.3.16",
"@lightprotocol/compressed-token": "^0.17.1",
"@lightprotocol/stateless.js": "^0.17.1",
"@metaplex-foundation/mpl-core": "^1.1.1",
"@metaplex-foundation/mpl-token-metadata": "^3.3.0",
"@metaplex-foundation/mpl-toolbox": "^0.9.4",
"@metaplex-foundation/umi": "^0.9.2",
"@metaplex-foundation/umi-bundle-defaults": "^0.9.2",
"@metaplex-foundation/umi-web3js-adapters": "^0.9.2",
"@onsol/tldparser": "^0.6.7",
"@orca-so/common-sdk": "0.6.4",
"@orca-so/whirlpools-sdk": "^0.13.12",
"@pythnetwork/hermes-client": "^1.3.0",
"@raydium-io/raydium-sdk-v2": "0.1.95-alpha",
"@solana/spl-token": "^0.4.9",
"@solana/web3.js": "^1.98.0",
"@sqds/multisig": "^2.1.3",
"@tiplink/api": "^0.3.1",
"ai": "^4.0.22",
"bn.js": "^5.2.1",
"bs58": "^6.0.0",
"chai": "^5.1.2",
"decimal.js": "^10.4.3",
"dotenv": "^16.4.7",
"flash-sdk": "^2.24.3",
"form-data": "^4.0.1",
"langchain": "^0.3.8",
"openai": "^4.77.0",
"typedoc": "^0.27.6",
"zod": "^3.24.1"
},
"devDependencies": {
"@types/bn.js": "^5.1.6",
"@types/chai": "^5.0.1",
"@types/node": "^22.10.2",
"@typescript-eslint/eslint-plugin": "^8.18.2",
"@typescript-eslint/parser": "^8.18.2",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"husky": "^9.1.7",
"lint-staged": "^15.3.0",
"prettier": "^3.4.2",
"ts-node": "^10.9.2",
"typescript": "^5.7.2"
}
"@tensor-oss/tensorswap-sdk": "^4.5.0",
"@tiplink/api": "^0.3.1",
"ai": "^4.0.22",
"bn.js": "^5.2.1",
"bs58": "^6.0.0",
"chai": "^5.1.2",
"decimal.js": "^10.4.3",
"dotenv": "^16.4.7",
"flash-sdk": "^2.24.3",
"form-data": "^4.0.1",
"langchain": "^0.3.8",
"openai": "^4.77.0",
"typedoc": "^0.27.6",
"zod": "^3.24.1"
},
"devDependencies": {
"@types/bn.js": "^5.1.6",
"@types/chai": "^5.0.1",
"@types/node": "^22.10.2",
"@typescript-eslint/eslint-plugin": "^8.18.2",
"@typescript-eslint/parser": "^8.18.2",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"husky": "^9.1.7",
"lint-staged": "^15.3.0",
"prettier": "^3.4.2",
"tsx": "^4.19.2",
"typescript": "^5.7.2"
}
}
Loading

0 comments on commit eb25c6b

Please sign in to comment.