Announcing Knip v2
Breaking changes
Section titled “Breaking changes”When coming from v1, there are no breaking changes in terms of configuration.
Changes
Section titled “Changes”There are some changes regarding CLI arguments and output:
- Knip now runs on every workspace automatically (except for the ones in
ignoreWorkspaces: []). - The “Unlisted or unresolved dependencies” is split in “Unlisted dependencies” and “Unresolved imports”.
- Bug fixes and increased correctness impact output (potentially causing CI to now succeed or fail).
New features
Section titled “New features”Rewriting a major part of Knip’s core from scratch allows for some new exciting features:
- Performance. Files are read only once, and their ASTs are traversed only once. Projects of any size will notice the difference. Total running time for some projects decreases with 90%.
- Compilers. You can now include other file types such as
.mdx,.vueand.sveltein the analysis.
Internally, the ts-morph dependency is replaced by typescript itself.
Other improvements
Section titled “Other improvements”- Improved support for workspaces.
- Improved module resolutions, self-referencing imports, and other things you don’t want to worry about.
- Configure
ignoreDependenciesandignoreBinariesat the workspace level. - Simplified plugins model: plugin dependency finder may now return any type of dependency in a single array: npm packages, local workspace packages, local files, etc. (module and path resolution are handled outside the plugin).
- Many bugfixes.
ISC License © 2026Lars Kappert