diff --git a/.gitattributes b/.gitattributes index 88706d843d..4272e5b8ab 100644 --- a/.gitattributes +++ b/.gitattributes @@ -16,3 +16,4 @@ evm/contracts/proto/** linguist-generated *.zip filter=lfs diff=lfs merge=lfs -text site/public/union-logo.zip filter=lfs diff=lfs merge=lfs -text biome.json linguist-language=JSON-with-Comments +knip.json linguist-language=JSON-with-Comments diff --git a/typescript-sdk/bun.lockb b/typescript-sdk/bun.lockb index d68c0de01e..8bfcdc5ffd 100755 Binary files a/typescript-sdk/bun.lockb and b/typescript-sdk/bun.lockb differ diff --git a/typescript-sdk/knip.json b/typescript-sdk/knip.json new file mode 100644 index 0000000000..5893b2fd6e --- /dev/null +++ b/typescript-sdk/knip.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://esm.sh/knip/schema.json", + "entry": ["src/mod.{js,ts,tsx}"], + "project": ["src/**/*.{js,ts,d.ts}"], + "ignoreDependencies": ["tsx", "jsr", "consola", "cosmjs-types"] +} diff --git a/typescript-sdk/package.json b/typescript-sdk/package.json index 9a3057d4f2..b71fa2465b 100644 --- a/typescript-sdk/package.json +++ b/typescript-sdk/package.json @@ -23,31 +23,34 @@ "test:typecheck": "vitest --typecheck.only", "check-package": "bunx publint@latest --strict && bunx @arethetypeswrong/cli --pack --ignore-rules 'cjs-resolves-to-esm'", "clean": "rm -rf dist node_modules", + "knip": "knip --config='knip.json'", "postinstall": "patch-package", "prepublish": "bun run build", "typedoc": "bun x typedoc@latest --out .docs ./src/mod.ts" }, "dependencies": { + "@scure/base": "^1.1.9", + "neverthrow": "^8.1.1", + "ofetch": "^1.4.1", + "patch-package": "^8.0.0", + "viem": "^2.21.43" + }, + "peerDependencies": { "@aptos-labs/ts-sdk": "^1.31.0", "@cosmjs/amino": "^0.32.4", "@cosmjs/cosmwasm-stargate": "0.32.4", "@cosmjs/proto-signing": "^0.32.4", "@cosmjs/stargate": "0.32.4", - "@cosmjs/tendermint-rpc": "^0.32.4", - "@scure/base": "^1.1.9", - "neverthrow": "^8.1.1", - "ofetch": "^1.4.1", - "patch-package": "^8.0.0", - "viem": "^2.21.42" + "@cosmjs/tendermint-rpc": "^0.32.4" }, "devDependencies": { - "only-allow": "^1.2.1", "@total-typescript/ts-reset": "^0.6.1", "@types/bun": "^1.1.13", "@types/node": "^22.9.0", "consola": "^3.2.3", "cosmjs-types": "^0.9.0", "jsr": "^0.13.2", + "knip": "^5.36.3", "tsup": "^8.3.5", "tsx": "^4.19.2", "typescript": "^5.6.3", diff --git a/typescript-sdk/tsconfig.json b/typescript-sdk/tsconfig.json index 2fa41900cb..07865e5a70 100644 --- a/typescript-sdk/tsconfig.json +++ b/typescript-sdk/tsconfig.json @@ -34,6 +34,6 @@ } }, "exclude": ["**/dist/**"], - "include": ["src", "test", "scripts", "playground"], + "include": ["src", "test", "scripts", "playground", "knip.json"], "files": ["reset.d.ts", "tsup.config.ts", "environment.d.ts", "vitest.config.ts"] }