-
-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enconding: Add preferred option #37
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honestly, I'm not super comfortable with this code as-is and would like to remove the variadic hack from the library instead of going deeper into it with options too.
It was the way I found to avoid breaking compatibility and to be backward compatible. It took me a while to understand why it used arguments (it's the first time I see it), maybe it can be done in cleaner ways |
Ideally we get rid of that altogether, it's hard to understand, hard to fix, and worse for performance. I'd like to do it in a new major version. For now, I'm going to suggest you skip |
I will push to oppose a new major at this stage. This package is passed through to express and we cannot do more majors in these without incurring an unnecessary maintenance burden until we are preparing for a v6 release. I agree with the proposed breaking change from @blakeembrey, just not the timing. |
@wesleytodd Why can't we can do a major version? You can just upgrade in express v5 or v6 when you're comfortable with it. A backward incompatible API change in this package doesn't mean it changes the exposed behavior in express, and coupling them together means we can't make useful API changes and makes the idea of independent package redundant. |
Use of the preferred option in encoding
There must be a backport to version 1, as it is a feature needed for expressjs/compression#194