Skip to content
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

Return ES2015 Proxy object #29

Closed
schnittstabil opened this issue Jul 12, 2016 · 14 comments · Fixed by #73
Closed

Return ES2015 Proxy object #29

schnittstabil opened this issue Jul 12, 2016 · 14 comments · Fixed by #73
Labels
enhancement 🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt help wanted

Comments

@schnittstabil
Copy link
Contributor

schnittstabil commented Jul 12, 2016

Issuehunt badges

ECMAScript6 Proxies are currently not available on node, therefore this issue is a reminder for future versions.

pify(obj) should return an ECMAScript6 Proxy object, forwarding almost all operations to obj, and promisifying only some functions, thus we almost surely get rid of most non-enumerable and inheritance issues.


IssueHunt Summary

frangio frangio has been rewarded.

Backers (Total: $70.00)

Submitted pull Requests


Tips


IssueHunt has been backed by the following sponsors. Become a sponsor

@sindresorhus
Copy link
Owner

@schnittstabil Interested in exploring this?

I'm requiring Node.js 4 in the next version, so we can safely use Proxy then.

@schnittstabil
Copy link
Contributor Author

At least v4.5.0 (LTS) and v5.12.0 don't support Proxies 😢

@sindresorhus
Copy link
Owner

Oh no. I was sure Proxy was in Node.js 4 for some reason...

@schnittstabil
Copy link
Contributor Author

@sindresorhus If you'd like to give me access rights, I'll create a proxy-branch and push some v6 code for further usage…

@sindresorhus
Copy link
Owner

Done :)

@sindresorhus
Copy link
Owner

Yes, good idea. Can at least explore it now. There might be some performance issues using Proxies.

@schnittstabil
Copy link
Contributor Author

There might be some performance issues using Proxies.

I've experienced the same issue - solved it by introducing a cache: https://github.com/sindresorhus/pify/blob/proxy/index.js#L44 :bowtie:

@sindresorhus
Copy link
Owner

@schnittstabil Nice! Already looks very good. I commented some quick feedback on the commit, but haven't tried it out yet. When that's resolved, can you open a PR? Would make it easier to review.

@sindresorhus sindresorhus changed the title return ECMAScript6 Proxy object Return ES2015 Proxy object Jun 29, 2017
@fregante
Copy link
Contributor

fregante commented Feb 4, 2018

Yes but why? The code doesn't seem much/any shorter/simpler/faster than the regular version.

@sindresorhus
Copy link
Owner

@bfred-it Some things will just work compared to now, like ES6 classes, this binding, etc.

@sindresorhus
Copy link
Owner

sindresorhus commented Mar 16, 2019

Anyone wants to step in and finish #32? Including handle my review comments. I'll put a bounty on this shortly. I think it's better now to just have the proxy interface instead of both. Proxy is pretty optimized in newer Node.js versions. This task includes adding tests to handle all the things mentioned in the open issues too.

@IssueHuntBot
Copy link

@IssueHunt has funded $70.00 to this issue.


@SamVerschueren
Copy link
Contributor

I'll take it.

@issuehunt-oss issuehunt-oss bot added the 💵 Funded on Issuehunt This issue has been funded on Issuehunt label May 10, 2019
@issuehunt-oss
Copy link

issuehunt-oss bot commented Feb 14, 2020

@sindresorhus has rewarded $63.00 to @frangio. See it on IssueHunt

  • 💰 Total deposit: $70.00
  • 🎉 Repository reward(0%): $0.00
  • 🔧 Service fee(10%): $7.00

@issuehunt-oss issuehunt-oss bot added 🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt and removed 💵 Funded on Issuehunt This issue has been funded on Issuehunt labels Feb 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt help wanted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants