Skip to content

Angular animations and router packages should be peerDependencies #478

Closed
@thw0rted

Description

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[X] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request
[ ] Other... Please describe:

Current behavior

Installing this package in a project that doesn't use @angular/animations or @angular/router will cause runtime errors during testing, until the user installs both those packages.

Expected behavior

npm install @ngneat/spectator should fail with a peer-dependency error if compatible versions of those packages are not already installed.

Minimal reproduction of the problem with instructions

I put together this repro for another issue, but if you remove the two packages described above from package.json, npm install, then try to run npm test, it will fail while trying to load them.

What is the motivation / use case for changing the behavior?

Packages should declare all their dependencies

Environment


Angular version: 12.2.2

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions