phenomnomnominal / angular-2-local-storage

LocalStorageService for Angular 2 with the same API as angular-local-storage
MIT License
93 stars 49 forks source link

Update to support Angular 6 and RxJS 6 #54

Closed jaredtbates closed 6 years ago

jaredtbates commented 6 years ago

Upgrading a project to Angular 6 RC and encountered errors relating to the new breaking RxJS 6 changes, this should fix. Feel free to wait to merge until Angular 6 is fully released, this is just a stop-gap for our project.

Should also resolve #52

colas74 commented 6 years ago

this fix is available since " 14 days ago" and still not merged, what are you waiting for. every times i run "npm i" in my project i need fix it manually. annoying me please accept

jaredtbates commented 6 years ago

@colas74 Please respect that the maintainer of this project likely has other commitments, as well as no obligation to keep it maintained.

If you’d like, you may head over to the fork, clone it, then run npm install and npm run build, then cd into the dist directory and run npm link ..

Also keep in mind that I developed my changes based off of an older RC release of angular and have not tested them with the most recent release, so your results may vary. Odds are that the maintainer would like to wait until angular 6 is fully released to merge the pull request.

elvisbegovic commented 6 years ago

@computerwizjared afaik current errors aren't related to angular but rxjs (which is v6 released!)

@colas74 yes npm link could be solution or simply copy service file into your project or you can too use this one Efficient local storage module for Angular apps and PWA: simple API + performance + Observables + validation

jaredtbates commented 6 years ago

@istiti My apologies, I didn't realize RxJS 6 came out 3 days ago. I am referencing an RC release in my PR, and haven't tested the stable release with my code yet.

elwynelwyn commented 6 years ago

Sorry for the delay - we're super busy over here at the moment!

I've merged the PR but reverted Angular back from v6 RC to the stable v5. The pipeable changes should be enough to get things going in ng6 on their own - please let me know if that is not the case! (you'll have to ignore peer dep warnings for a while longer sorry!).

I also removed the rxjs compat dependency - since the lib uses all pipeable operators now it should not be needed.

Published at 1.0.2

Thanks very much for the PR @computerwizjared!

elwynelwyn commented 6 years ago

...aaaand ng6 is out.

I've updated the deps (angular and rxjs) to 6.0.0 and published as a breaking change at v2.0.0

colas74 commented 6 years ago

Good job, great thanks!