Closed oBusk closed 4 years ago
I guess an option to making @angular/core
a peerDependency would be to make the dependency a bit more open like ^6.0.1
rather than specifying a specific version. This would mean less of a breaking change, but inconsistency compared to the other uirouter/*
packages.
The only top level uirouter project on peerDependencies today is the @uirouter/angular
. I agree it's probably best to switch to all projects to peerDependencies
. I'd like to coordinate switching all projects (angular-hybrid, react, react-hybrid) at the same time. This is a breaking change for every package which is why I haven't pulled the trigger yet.
If changing to peerdep is a breaking change, thus major release, should there be a patch/minor that makes the dependency to core non-exact ^6.0.1
so that installing @uirouter/angular-hybrid
and @uirouter/angular
doesn't end up with the mismatch?
The current recommendation for angular-hybrid (until all packages are peerDeps) is to only install @uirouter/angular-hybrid
at the top level which should pick out exact versions of /angular
, /angularjs
, and /core
which should be compatible
How do you mean by that? @uirouter/angular-hybrid
has no direct dependencies, only peerDependencies?
https://unpkg.com/browse/@uirouter/angular-hybrid@10.0.1/package.json
So to correctly install @uirouter/angular-hybrid
, you'll have to install both @uirouter/angular
and @uirouter/angularjs
, causing the issue.
Sorry, you are right. I didn't remember that I had also switched angular-hybrid
to peerDependencies
.
Now that I've released @uirouter/angularjs@1.0.25
which directly depends on @uirouter/core@6.0.4
, you should have a valid combination of packages to install.
In the future I will switch all these to peerDependencies
and do major releases of all the packages.
This issue tracker is for Bug Reports and Feature Requests only.
Please direct requests for help to StackOverflow. See http://bit.ly/UIR-SOF for details.
This is a (check one box):
My version of UI-Router is: (type version)
Bug Report
Current Behavior:
Hard to debug type errors regarding
StateDeclaration
mismatches.Basically a lot of properties and interfaces do not match which seems weird because no related typing has changed between
@uirouter/core@6.0.3
and@uirouter/core@6.0.4
.However looking at the lockfile, we can see that we have a duplication;
And my suspicion is that the mismatching of types is because the types I've imported from
@uirouter/angularjs
is not the same as the ones I import from@uirouter/angular
.Expected Behavior:
@uirouter/angularjs
should have@uirouter/core
as a peerDependency, just like the otheruirouter
packages, therefore ensuring that I use the same version of@uirouter/core
.Link to Plunker or stackblitz that reproduces the issue:
( if you want a response to your issue, provide a way to reproduce it ) ( http://bit.ly/UIR-Plunk1 ) ( https://stackblitz.com/edit/ui-router-angularjs )