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

promisify node-gcm #264

Merged
merged 1 commit into from
Aug 8, 2016
Merged

promisify node-gcm #264

merged 1 commit into from
Aug 8, 2016

Conversation

dan-perron
Copy link

No description provided.

@eladnava
Copy link
Collaborator

Lots of changes here. I'm not entirely familiar with the v1 code, @hypesystem what do you think?

@hypesystem
Copy link
Collaborator

I think this is a lot of changes. I would like for the code in the lib to keep using callback style, and the promise part being as small as possible, preferably an isolated part.

This should be possible by wrapping send's internal call in new Promise if no callback is given.

@dan-perron I'm sorry you got so far and did so much before I mentioned this! I should have said it before. While I think it is a nice benefit to add promise support, it should not be the way the internals are written.

Do you want to take another stab at it? I would like to hear your thoughts on the possibility of using new Promise instead, as well 😄

@dan-perron
Copy link
Author

I'm fine with that.

I have a strong bias to using promises over callbacks everywhere, but this is your code. I'll update shortly.

@hypesystem
Copy link
Collaborator

This looks great :)

Could I get you to squash the commits to a single one (seeing as the first three contain changes that were basically reverted), so our history looks a bit nicer?

Other than that, I think this is good to merge. Any input, @eladnava?

@eladnava
Copy link
Collaborator

eladnava commented Jul 26, 2016

@dan-perron Nice, clean solution! I prefer it this way as well. Excellent work.

@hypesystem LGTM.

@dan-perron
Copy link
Author

Squashed.

@hypesystem
Copy link
Collaborator

Neat! Sorry for the long wait --- have you added yourself as a contributor in the README? I can't seem to find it :-) As soon as you let me know on that point, I'll merge it!

@dan-perron
Copy link
Author

I don't see a section of the README for contributors. What am I missing?

@dan-perron
Copy link
Author

Ping?

@hypesystem
Copy link
Collaborator

Wait, that was an error on my part. I meant in the package.json.

https://github.com/ToothlessGear/node-gcm/blob/master/package.json#L6-L41

@dan-perron
Copy link
Author

Done!

Hmmm... merge conflict. Guess I'll rebase quick.

@dan-perron
Copy link
Author

Ok, should be ready now.

@hypesystem hypesystem merged commit c829e37 into ToothlessGear:v1 Aug 8, 2016
@hypesystem
Copy link
Collaborator

Cool! Thank you so much for the time you put into this 😄 this will be out with the next release candidate of v1.

@dan-perron dan-perron deleted the v1-promises branch August 11, 2016 21:48
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.

None yet

3 participants