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

Removed overly complex promisify function wrappers #24

Merged
merged 2 commits into from
Oct 27, 2016

Conversation

eddyystop
Copy link
Collaborator

Function signatures were parsed to get the #params in a function
and to see if the func was likely a callback func. There were
some manageable issues with signatures whose params had default
values. However the parser used does not work for params using
deconstruction, and those are common. We would have to switch to
a parser that parses signatures into an Abstract SyntaxTree to
solve this problem. That is really going too far for the small
benefits any parsing provides.

  • Removed all the promisify func except fnPromisfyCallback
  • Renamed fnPromisifyCall to the more descriptive callbackToPromise
  • Removed tests related to promisfy funcs
  • Updated test for callbackToPromise
  • Updated README.
  • Closed issue reminding us to remove hacks to get around Node 4.

Function signatures were parsed to get the #params in a function
and to see if the func was likely a callback func. There were
some manageable issues with signatures whose params had default
values. However the parser used does not work for params using
deconstruction, and those are common. We would have to switch to
a parser that parses signatures into an Abstract SyntaxTree to
solve this problem. That is really going too far for the small
benefits any parsing provides.

- Removed all the promisify func except fnPromisfyCallback
- Renamed fnPromisifyCall to the more descriptive callbackToPromise
- Removed tests related to promisfy funcs
- Updated test for callbackToPromise
- Updated README.
- Closed issue reminding us to remove hacks to get around Node 4.
@ekryski
Copy link
Member

ekryski commented Oct 27, 2016

Looks good @eddyystop! I think this is a good call. Simpler = better.

Likely will need to be a major release I guess.

:shipit:

@eddyystop eddyystop merged commit 49c7771 into master Oct 27, 2016
@eddyystop eddyystop deleted the simplify-promisify branch October 27, 2016 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants