-
Notifications
You must be signed in to change notification settings - Fork 71
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
(fix): upgrade object-hash to support async/await syntax #203
Merged
Conversation
This file contains 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
- 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)
agilgur5
force-pushed
the
object-hash-update
branch
from
February 11, 2020 02:27
f486726
to
9afc8df
Compare
agilgur5
changed the title
(feat): upgrade object-hash to support async/await syntax
(fix): upgrade object-hash to support async/await syntax
Feb 11, 2020
Thanks, I'll check it out |
This is to support pointing npm directly to github, committed version is always higher than last released. |
In 0.26.0 now |
Big thanks for the super fast turnaround @ezolenko !! Hopefully this ends a lot of hackiness 😄 |
This was referenced Feb 12, 2020
agilgur5
added
kind: bug
Something isn't working properly
scope: dependencies
Issues or PRs about updating a dependency
labels
May 7, 2022
Repository owner
locked as resolved and limited conversation to collaborators
May 7, 2022
agilgur5
added
scope: integration
Related to an integration, not necessarily to core (but could influence core)
scope: cache
Related to the cache
labels
May 7, 2022
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
kind: bug
Something isn't working properly
scope: cache
Related to the cache
scope: dependencies
Issues or PRs about updating a dependency
scope: integration
Related to an integration, not necessarily to core (but could influence core)
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.json
as 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-hash
upgrade (which is a very tiny diff).I also noticed that
package.json
is 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
objectHashIgnoreUnknownHack
either makes the cache stale or withclean
makes for no caching, both of which are very suboptimal workarounds. Would be great to actually fix the main problemobjectHashIgnoreUnknownHack
addresses (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-ts
in jaredpalmer/tsdx#200