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

Cordova events singleton object #60

Merged
merged 2 commits into from Dec 20, 2018

Conversation

2 participants
@brodybits
Copy link
Contributor

brodybits commented Dec 19, 2018

Using a real singleton object means that we would no longer have to follow the cordova-common singleton rule when publishing tools releases.

We may need to increase the minor version number if this change is included in cordova-common@3.

I would love to get this into the Cordova 9 release as discussed in apache/cordova#10, if possible.

brodybits and others added some commits Dec 19, 2018

Refactor Cordova events into ES6 class
and replace var with const & let

Co-authored-by: Christopher J. Brody <chris.brody@gmail.com>
Co-authored-by: Darryl Pogue <darryl@dpogue.ca>
Update Cordova events to use a real singleton
Co-authored-by: Christopher J. Brody <chris.brody@gmail.com>
Co-authored-by: Darryl Pogue <darryl@dpogue.ca>

@brodybits brodybits requested review from dpogue and erisu Dec 19, 2018

@project-bot project-bot bot added this to 🐣 New PR / Untriaged in Apache Cordova: Tooling Pull Requests Dec 19, 2018

@dpogue

This comment has been minimized.

Copy link
Member

dpogue commented Dec 19, 2018

Does EVENTS_RECEIVER also need to make sure there is only ever one instance?

@brodybits

This comment has been minimized.

Copy link
Contributor

brodybits commented Dec 19, 2018

Whichever CordovaEventEmitter instance is used should always use the same EVENTS_RECEIVER variable, from the same events.js module.

Apache Cordova: Tooling Pull Requests automation moved this from 🐣 New PR / Untriaged to ✅ Approved, waiting for Merge Dec 19, 2018

@dpogue

dpogue approved these changes Dec 19, 2018

@brodybits brodybits merged commit 1bbc93d into apache:master Dec 20, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

Apache Cordova: Tooling Pull Requests automation moved this from ✅ Approved, waiting for Merge to 🏆 Merged, waiting for Release Dec 20, 2018

@brodybits brodybits deleted the brodybits:events-singleton branch Dec 20, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment