Possible breaking change on @types/lodash@4.14.198 [@types/lodash] #66608
Replies: 2 comments
-
|
Thanks for the discussion about "lodash", some useful links for everyone: Pinging the DT module owners: @bczengel, @chrootsu, @aj-r, @e-cloud, @thorn0, @jtmthf, @DomiR, @WilliamChelman. |
Beta Was this translation helpful? Give feedback.
-
|
I agree this is likely finding a bug in your code - without knowing the type of your object, I'd guess that the type should be changed from
Unfortunately DefinitelyTyped does not follow SemVer in this way. Nearly every type change must be a breaking change due to the nature of how types work. We follow the major.minor version of the underlying package (which for lodash has been 4.14 for a while), and increment the patch number every time we apply a fix in DefinitelyTyped. But a "fix" to the type definitions is by definition a breaking change. As such, you'll probably want to pin any DefinitelyTyped packages to a specific patch version. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Howdy - I believe I found a breaking change on
v4.14.198for thegetmethod which was observed when updating fromv4.14.172tov4.14.198and resolved when reverting back tov4.14.172.Update: While writing up this issue, I realized that its possible that the implementation in my code likely the culprit. However, considering that I was able to resolve the problem and cause it again by reverting then updating the patch version, imo appears there is a breaking change and its worth at least bringing to your attention.
Here is one example of using the
getmethodin
.172this resolves to the following overload and satisfies the return typewhile in
.198this resolves to this overloadDue to this change, the return type of
getbecomes a large union type that fails the expected return typeUpdate: Why we are expecting a
booleanbut set the fall back toundefinedis between another dev and whatever cosmic forces in the universe you may or may not believe.So as stated, in my opinion, the real error lies in my code. However, in not expecting a patch to cause a breaking change and knowing it could be an symptom of a different problem I'm submitting this issue.
Edit: Good Bot - My apologies. updated with links and reference in title
Beta Was this translation helpful? Give feedback.
All reactions