-
-
Notifications
You must be signed in to change notification settings - Fork 164
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
Unexplained change to decode
return type causing 1.0 migration difficulty
#216
Comments
The built-in default |
@benmccann This is a function passed in to
Any missing keys are
This method doesn't return As @Conduitry mentions, the default function used for
It allows someone to override the behavior of parsing to skip invalid cookies. For example, Ref: Lines 128 to 134 in e739f41
It is worth noting that there are actual breaking changes with moving from pre-1.0 to 1.0 mentioned in https://github.com/jshttp/cookie/releases/tag/v1.0.0 (e.g. the removed |
Worth linking to what @Conduitry mentions, the default Version 1: Lines 362 to 370 in e739f41
Version 0: Lines 304 to 308 in d19eaa1
Lines 329 to 335 in d19eaa1
|
Pre-1.0 we had:
Now we have:
This is blocking us from upgrading because it means we would potentially be passing
undefined
values to our users where we weren't before. It's very unclear to me under what circumstances this method would ever return anundefined
value and what the motivation for this change was. Was this change in type signature a mistake that can be reverted? Or can we explain in the JSDoc and changelog when anundefined
should be returned?The text was updated successfully, but these errors were encountered: