Comments (5)
Thanks so much for this quick release! 🎉 👏
Can confirm it fixed the issue.
from next-redux-cookie-wrapper.
Hi Niels,
thanks for the kind words, and I'm glad to hear the lib helps you!
Your guess is right about lz-string – I added the dependency according to pieroxy/lz-string#147, hoping that a new version would be released soon. Since I was wrong about that, and since it causes trouble for you, I think it's best to just use v1.4.4 from NPM.
I'm not sure how this can be resolved now that dependents of this library use this unreleased version of lz-string. The only idea I had was keeping the lz-string dep as-is but change it to an optional dependency so people who don't need it can opt to exclude it (https://docs.npmjs.com/cli/v8/configuring-npm/package-json#optionaldependencies).
I'm not sure if I get your point with this – I would simply do a patch release with the dependency definition changed to "lz-string": "^1.4.4"
. Users who update next-redux-cookie-wrapper
will automatically be provided with lz-string v1.4.4 from the NPM registry then. I can't think of a scenario where the dependency change would break anything, unless someone is concerned about licenses, but then again, the WTFPL license in the NPM package is just false information. Am I missing an edge case?
I've turned compression off which effectively makes lz-string an optional dependency I think.
You may be right about not needing lz-string, though I don't know if next-redux-cookie-wrapper
would currently work without it. The way to go about optional dependencies would most likely be using peerDependencies
. Anyway, since compression is the default behavior, I'd like to keep lz-string
a non-optional dependency for simplicity, given that it is quite slim.
Let me know what you think about a patch release :)
Cheers!
from next-redux-cookie-wrapper.
Hi @bjoluc
I'd like to keep lz-string a non-optional dependency for simplicity, given that it is quite slim.
Fair enough, it would indeed add complexity.
I'm not sure how this can be resolved now that dependents of this library use this unreleased version of lz-string.
I'm not sure if I get your point with this
Sorry, the only reason I said that was I hadn't looked at all commits that got merged in lz-string since the release of 1.4.4 and commit b2e0b27
used in this lib.
My concern was that the compression format might have changed in some subtle way that would break if you'd downgraded the lib. I.e. upgrade v1.4.4 -> #b2e0b27
is fine, but the reverse #b2e0b27 -> v1.4.4
wouldn't. For example if #b2e0b27
would introduce something new to the compression format that v1.4.4
doesn't understand yet. It's a bit far-fetched but that's the only reason I said that.
I walked through the commits in lz-string, most seem to be about documentation and superficial changes. Found two commits that had some code in them:
I think these are non-consequential as long as this lib can work with it.
After scanning those commits I'd think it's fine to patch-release to 1.4.4. It would definitely solve my issue 👏
from next-redux-cookie-wrapper.
My concern was that the compression format might have changed in some subtle way that would break if you'd downgraded the lib.
Oh, right, makes sense. I assumed that there were no breaking changes on main, which (luckily) seems to be right, according to your research – thanks!
from next-redux-cookie-wrapper.
🎉 This issue has been resolved in version 2.1.1 🎉
The release is available on:
Your semantic-release bot 📦🚀
from next-redux-cookie-wrapper.
Related Issues (20)
- Hydrate state from cookies without server side rendering HOT 6
- Changing compress config to false throws 'SyntaxError: Unexpected token N in JSON at position 0' error HOT 1
- how set refresh token in cookie HOT 10
- how to add redux-logger in diff env HOT 1
- Ability to hydrate all pages without getServerSideProps and connect. HOT 4
- __NEXT_REDUX_WRAPPER_HYDRATE__ cookie bug HOT 15
- State from Cookies not set back after browser reload HOT 2
- Getting error: TypeError: store.getState is not a function HOT 1
- Question: Authentication HOT 1
- Error: Text content does not match server-rendered HTML in newer NextJS version HOT 9
- middleware sometime can't get subtrees HOT 3
- Bug: "Cannot set headers after they are sent to the client" HOT 1
- Expose functions to manually parse cookies HOT 1
- Store Value Stored In Cookies Defaulting To Store Initial Value When Redirected From An External Url HOT 4
- SSR store missing cookie data in Next 13 HOT 7
- Error: Unexpected token "=", on Safari (=< 13.1) HOT 12
- What happens if we store subtrees in cookie whose size exceeds 4096 bytes ? HOT 1
- Error: Hydration failed because the initial UI does not match what was rendered on the server. HOT 1
- Problem of hydration from the cookie data HOT 1
- Sync client state with cookies HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from next-redux-cookie-wrapper.