(fix): upgrade object-hash to support async/await syntax#203
Merged
ezolenko merged 2 commits intoezolenko:masterfrom Feb 11, 2020
Merged
(fix): upgrade object-hash to support async/await syntax#203ezolenko merged 2 commits intoezolenko:masterfrom
ezolenko merged 2 commits intoezolenko:masterfrom
Conversation
- these are just the changes an `npm install` made - it hadn't been changed since at least v0.25.2
- object-hash v2.0.2 adds/fixes support for async functions
- object-hash v2 has no breaking changes, just drops testing of
Node < 6
- Node 5 was EOL April 2018, and on top of that Node 6
was EOL April 2019, and Node 8 was EOL December 2019, so this is
still more tested support than is necessary
- objectHashIgnoreUnknownHack isn't useful for its original purpose to
workaround this, but is still useful for other types of
objects/syntaxes that object-hash may not handle yet
(e.g. async generator functions), so leave the hack in
- might be good to add a warning though? so that those who used this
option for async/await can upgrade and remove it (and have a
stable cache again)
f486726 to
9afc8df
Compare
Owner
|
Thanks, I'll check it out |
Owner
This is to support pointing npm directly to github, committed version is always higher than last released. |
Owner
|
In 0.26.0 now |
Collaborator
Author
|
Big thanks for the super fast turnaround @ezolenko !! Hopefully this ends a lot of hackiness 😄 |
This was referenced Feb 12, 2020
Repository owner
locked as resolved and limited conversation to collaborators
May 7, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
object-hash v2.0.2 adds/fixes support for async functions
Node < 6
was EOL April 2019, and Node 8 was EOL December 2019, so this is
still more tested support than is necessary
objectHashIgnoreUnknownHack isn't useful for its original purpose to
workaround this, but is still useful for other types of
objects/syntaxes that object-hash may not handle yet
(e.g. async generator functions), so leave the hack in
option for async/await can upgrade and remove it (and have a
stable cache again)
Note: I added an initial commit in here that auto-updates the
package-lock.jsonas it hadn't been updated since at least v0.25.2, and I didn't want that to be part of the diff for the actualobject-hashupgrade (which is a very tiny diff).I also noticed that
package.jsonis set to v0.25.4, but v0.25.4 was never released.Fixes #105 with no need for a hack.
This was just fixed in puleos/object-hash#90 , which is a very similar fix to the one originally referenced in #105 (puleos/object-hash#68).
Like I mentioned in puleos/object-hash#90 , we're currently facing this problem in TSDX in several issues: jaredpalmer/tsdx#294 , jaredpalmer/tsdx#358 (comment) , jaredpalmer/tsdx#278 (comment) , jaredpalmer/tsdx#496 (comment), and a few in jaredpalmer/tsdx#379 , so it's one of the top issues.
The current
objectHashIgnoreUnknownHackeither makes the cache stale or withcleanmakes for no caching, both of which are very suboptimal workarounds. Would be great to actually fix the main problemobjectHashIgnoreUnknownHackaddresses (it may still be used for future syntax, other object types, etc) instead of having hacky workarounds for the most common case of async functions!The bundling of dependencies (#80, #70) also means there's no way for TSDX to internally change
rollup-plugin-typescript2's dependencies. This means we don't really have a way of fixing this without waiting for for a new release from this library, which is also suboptimal IMO.This issue was also one of the main reasons behind TSDX temporarily switching to
@wessberg/rollup-plugin-tsin jaredpalmer/tsdx#200