chore: remove dead code and unused dependencies - #16840
Conversation
`sveltekit_server` was removed as an unused module ID in sveltejs#16465, then reintroduced by sveltejs#16450 without a consumer. `noop_tracer` has been unused since it was added in sveltejs#13899, and `remove_optional_params` since sveltejs#9571. Removing `remove_optional_params` also orphans `optional_param_regex`, and removing `noop_tracer` orphans the `Tracer` type import; both go with them. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
`dropcss` was only ever used by the AMP docs example. sveltejs#16657 removed `@sveltejs/amp` and those docs, but left the catalog entry behind, and carried the ambient module declaration over unchanged when it renamed the `amp` test app to `no-csr`. Nothing imports it, and it was never in any package.json, so the declaration could not have resolved anyway. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Added by sveltejs#14509 when everything moved to catalog dependencies, but no workspace ever declared it. The only other mention in the repo is prose linking to publint.dev in the FAQ. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
`sirv` is declared by adapter-static but never imported; its test apps run their preview servers off the `sirv` binary from `sirv-cli`, which they declare themselves. `valibot` is declared by the basics test app and the basic playground but used by neither. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
The app uses it for an inline type import in a remote-function route but never declared it, so it resolved only through hoisting. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
Install the latest version of pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/63433a23fe0f7a738ad42d5b74ce70ac69d49427Open in Note This PR is from a fork. A maintainer must approve approve each commit before it can be built and installed. |
|
There was a problem hiding this comment.
Thank you! Really appreciate this. I think we talked about wanting to add some knip or fallow CI check at some point but just never looked into how to get it set up. This kind of shows how effective it was
I removed the changeset because there's no real user facing change from the deleted dead code and restored the unused dependency in the playground (we may use it when testing out stuff there but those aren't committed). Other than that, it's a good PR!
|
@teemingc I opened up an issue for v3 support in Fallow which maintainer now is handling. |
I let Claude had a go with Fallow to find unused code and dependencies. Feel free to close.
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm testand lint the project withpnpm lintandpnpm checkChangesets
pnpm changesetand following the prompts. Changesets that add features should beminorand those that fix bugs should bepatch. Please prefix changeset messages withfeat:,fix:, orchore:.Edits