Comments (3)
Hey, thank you for a very politely worded question! The reason why it's a peer dependency and not a direct dependency is that historically some people needed v5 to support older browsers, while some people wanted v6 to work with newer features. I couldn't get the "you choose your version" to work while listing it as a direct dependency, so I let people choose. I do hope in a new version to make this more obvious / use something like the built-in URLSearchParams as a default, but I need to investigate it more still.
from serialize-query-params.
Addressed via #33 by throwing an exception when the wrong version is present. Available in v1.2.3
from serialize-query-params.
Hey @pbeshai, would you mind explaining your rationale for throwing an exception instead of setting query-string
to be a dependency? If this library needs query-string
to function, then it should be added to its dependencies. If it doesn't, why is it listed as a peerDependency
and/or why would you throw an exception?
I'm not quite sure I understand why the responsibility of installing this supporting library is pushed to the consumers.
Appreciate your work. 🙏
from serialize-query-params.
Related Issues (18)
- Add in date time param HOT 1
- updateLocation does not update href property HOT 3
- Updated locations have methods that don't work
- how to compose encoding/decoding params? HOT 2
- Allow null and empty string values
- UpdateInLocation does not remove Nully parameters HOT 1
- withDefault excludes equals property
- Example shows import with stringify yet no exported member exists
- withDefaults does not work if the property does not exist in the encodedQuery HOT 2
- ESM build breaks with snowpack since query-string version check uses require which is undefined
- React router uses stale query params due to `query` in location
- createEnumParam with withDefault gives null in types HOT 3
- Update query-string dependency to v 6.8.3 HOT 1
- Question: Why do empty array is returned empty string in encodeDelimitedArray? HOT 1
- Update query-string HOT 1
- Skipped query-string version in check function in "Development" mode HOT 1
- Delimited array params break when storing strings with '_' characters HOT 3
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 serialize-query-params.