A library usually consists of two parts: the implementation, which implements the public interface people are able to use, and development, which can be anything from testing to deployment.
It is very common for the development part to have its own dependencies in addition to what the implementation part requires, things like testing frameworks and formatters.
The Problem Some package managers allow users to specify development-only dependencies, for example, Cargo (Rust’s package manager) supports this with the dev-dependencies table: