Skip to content

Commit

Permalink
chore: add knip to strip unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
o-az committed Nov 8, 2024
1 parent 015752c commit 96a1fc4
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -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
Binary file modified typescript-sdk/bun.lockb
Binary file not shown.
6 changes: 6 additions & 0 deletions typescript-sdk/knip.json
Original file line number Diff line number Diff line change
@@ -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"]
}
17 changes: 10 additions & 7 deletions typescript-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion typescript-sdk/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
}

0 comments on commit 96a1fc4

Please sign in to comment.