Closed ebrehault closed 6 years ago
Ok, I should have checked first, this PR is a duplicate of https://github.com/angelnikolov/ngx-cacheable/pull/2
To fix the Travis build, we need to install RxJS manually in .travis.yml
(as peerDependencies are not installed when running npm install
).
@angelnikolov regarding the comment you made to @dgaletto:
however using any version before 6.0.0 will not be possible, unless you use rxjs-compat
That's exactly why we should use peerDependencies
here. Because by using dependencies
, if the current project uses RxJS 5, npm will install RxJS 6 into ./node_modules/ngx-cacheable/node_modules
and everything will look like it works, but it won't, and our IDE will seem crazy (like complaining about Observable<any>
id not Observable<any>
) because we will have 2 different version of RxJS in the path.
Using peerDependencies
, we will get meaningful errors about the RxJS import.
Thanks for the contribution! Will publish later today
Hi,
I think it would be better if
@types/jasmine
andjasmine
were indevDependencies
andrxjs
were inpeerDependencies
(so it does not install those packages into./node_modules/ngx-cacheable/node_modules
if they are missing).