-
Notifications
You must be signed in to change notification settings - Fork 206
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
2.0.0 (aka 1.0.0) #238
base: master
Are you sure you want to change the base?
2.0.0 (aka 1.0.0) #238
Conversation
It validates and everything internally
What they covered before is now covered by sender
This makes for a significantly smaller dependency tree (lodash is 2Mb, lodash.defaultsdeep is around 250kb)
V1: remove Message
V1: Depend only on lodash.defaultsdeep (instead of all lodash)
@hypesystem what do you say about removing Seems kind of unnecessary to require 2 empty files on the way as it is today: require('node-gcm') -> index.js -> lib/node-gcm.js -> lib/sender.js |
@eladnava I think we are probably going to split the Sender file at some point, so it will make more sense. You are right: right now it is very silly. I would rather wait and see exactly what happens with the Sender, before deciding on the file hierachy 😄 |
@hypesystem Isn't that 'some point' now since we are basically cleaning everything we think should be cleaned up? Or would you rather wait till the end of everything else? |
@eladnava haha yeah, I'm not saying "let's wait for a long time" --- just until we are a bit further with the new v1 interface 😄 We have eliminated a lot of abstractions, and plan to add some more functionality to the Sender -- so it will grow quite big, and then it should be split into smaller files. After that, we can figure out how our index.js should look 😄 |
This required some major changes to how the tests are structured, as I didnt want to be listening on what used to be "sendNoRetry". requestStub is now a sinon spy. it is reset before EVERY test (woops, before we only cleared state before each test CATEGORY) and how we expect some things has changed as a result of these structural changes
They used the registration_ids key, which we will no longer support. They passed because state was NOT reset before every test (fixed this in earlier commit)
Published |
Awesome! 😄 |
How will we handle users warning to send to topics fitting a condition? |
@hypesystem How do you currently detect a topic versus a registration token passed in via the second argument? |
@eladnava Currently we do not have to. Topics are passed to the |
We could instead change the interface to allow passing in an object (but the same exact object later passed into the request, e.g. |
That would definitely be one option 😄 it's quite verbose, but I guess that the simple string and array options will be the common cases, and they will still be supported... 👍 |
⭐ should not be merged ⭐
This is a long-running branch that will exist while we are figuring out the exact interface of version 1.0.0 of this project.
New changes to the
v1
branch should be made as separate PRs merging into v1.The current latest alpha of 1.0.0 is
1.0.0-alpha.1
. It is not recommended in production. Use instead0.14.2
, which lives on the master branch of this repository.Preliminary TODO for 1.0.0:
to
fieldregistration_ids
fieldComments, feedback, etc. on this process are very welcome 😄