chore: remove unused dependencies from non-Anchor example packages - #678
Open
amilz wants to merge 1 commit into
Open
chore: remove unused dependencies from non-Anchor example packages#678amilz wants to merge 1 commit into
amilz wants to merge 1 commit into
Conversation
Drop dependencies declared in package.json but imported nowhere in their package, across the non-Anchor examples. Regenerate the affected lockfiles.
Contributor
Greptile SummaryRemoves unused dependencies from several non-Anchor example packages and regenerates their lockfiles.
Confidence Score: 5/5The PR appears safe to merge because the removed dependencies have no identified package-owned imports or required generated-client usage. The dependency removals match the affected packages’ source and generation boundaries, and the commit contains an SSH signature as required. Important Files Changed
Reviews (1): Last reviewed commit: "chore: remove unused dependencies from n..." | Re-trigger Greptile |
dev-jodee
approved these changes
Aug 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes dependencies that are declared in
package.jsonbut imported nowhere in that package. Non-Anchor packages only — Anchor packages were left untouched.Every candidate was re-verified by hand (grep across all
.ts/.tsx/.js/.mjs/.json/.cssplus config files, subpath imports, CSS@import, andpnpm whyfor peer/transitive requirements). Three of the original candidates turned out to be in use and were kept — see below.Removed
basics/hello-solana/native@solana-program/systemtests/index.test.ts; it imports@solana/kit,chai,litesvmonly.pnpm build-and-test(cargo build-sbf + mocha) passes.games/gacha/pinocchio/clients/typescript@solana/kit-plugin-rpc,@solana/kit-plugin-signersrc/,test/,tsup.config.ts, or the Codama-generatedsrc/generated/(generated fresh and re-grepped).pnpm build(incl. DTS emit) +pnpm test(8 pass).games/world-cup/pinocchio/clients/typescript@solana/kit-plugin-rpc,@solana/kit-plugin-signer@solana/kitand@solana/program-client-core.pnpm build(incl. DTS emit) +pnpm test(54 pass).games/world-cup/pinocchio/webapp/api@solana-program/systemserver.ts,lib/bpf-loader.ts,lib/deploy-builder.ts,lib/program-status.tsimport@solana/kitand node builtins only. Typechecks clean.games/world-cup/pinocchio/webapp/scripts@solana-program/system,@solana-program/token,@solana-program/token-2022@solana/kitand node builtins; token operations shell out viaspawn. Typechecks clean.games/world-cup/pinocchio/webappnext-themesvite.config.ts, or tsconfigs.pnpm why -r next-themesshows no other dependent — nothing peer-requires it (sonnerpeers only React).pnpm build+pnpm testpass.Deliberately left in
tokens/token-2022/transfer-hook/block-list/pinocchio@solana/kitpnpm generate-sdksrenders a Codama TS client intosdk/ts/src(gitignored), andbuild-and-testthen runstsc --noEmitover**/*.ts, which includes that generated code. Confirmed by runninggenerate-sdks— the emitted files import@solana/kit. Removing it would breakbuild-and-test.games/world-cup/pinocchio/webapp@vercel/ogwebapp/api/og.tsximportsImageResponsefrom@vercel/og. The file lives underapi/but imports../src/..., so it resolves against the webapp'spackage.json.games/world-cup/pinocchio/webapp@base-ui/react@solana/design-system("@base-ui/react": "^1.1.0"), which the app uses. Not a bare-specifier import, but removing it would leave the peer unmet.Note on the world-cup lockfile diff
games/world-cup/pinocchio/pnpm-lock.yamlgrows more than the removals alone suggest. Cause:webapp/scriptspins every dep with"latest". The removed@solana-program/*packages peer-ranged@solana/kitto^6.x, which was transitively holding"@solana/kit": "latest"at 6.10.0. With them gone,latestre-resolves to@solana/kit7.0.0 for that package, and@solana/sysvarsshifts to 7.0.0 for the webapp's@solana-program/token-2022@0.9.0peer.I confirmed the baseline is otherwise stable (regenerating the lockfile with no
package.jsonchanges produces a zero-line diff), so this is entirely downstream of the removals. All builds and tests pass on the new tree. I deliberately did not pin the"latest"specifiers, since changing version ranges is outside this PR's scope — but replacing"latest"inwebapp/scripts/package.jsonwith real ranges is worth a follow-up, as that workspace's lockfile will otherwise drift on any future dependency change.Verification run
basics/hello-solana/native—pnpm build-and-test(1 passing) +tsc --noEmitgames/gacha/pinocchio/clients/typescript—pnpm build+pnpm test(8 pass)games/world-cup/pinocchio/clients/typescript—pnpm build+pnpm test(54 pass)games/world-cup/pinocchio/webapp—pnpm build(tsc -b + vite build) +pnpm test(5 pass)games/world-cup/pinocchio/webapp/{api,scripts}— no test or build script exists; verified with an ad-hoctsc --noEmitover their sources (clean)tokens/token-2022/transfer-hook/block-list/pinocchio— unchangedLockfiles regenerated with
pnpm install --lockfile-onlyfollowed bypnpm installin each touched workspace.Part of DEV-838