From acae0aaf4f6d476f608af6cf21150759b7789828 Mon Sep 17 00:00:00 2001 From: Ari Lazier Date: Mon, 21 Nov 2016 17:47:17 -0800 Subject: [PATCH 1/3] don't require node analytics for rn --- lib/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/index.js b/lib/index.js index 7c2273a8..549a363a 100644 --- a/lib/index.js +++ b/lib/index.js @@ -22,6 +22,7 @@ function node_require(module) { return require(module); } +// If process is defined, we're running in node. function isNode() { return typeof process == 'object' && (('' + process) == '[object process]' || typeof jest == 'object') } @@ -32,8 +33,7 @@ function isNode() { var realmConstructor; if (isNode()) { - // If process is defined, we're running in node. - require('./submit-analytics')('Run'); + node_require('./submit-analytics')('Run'); // Prevent React Native packager from seeing this module. var binary = node_require('node-pre-gyp'); From cdcefa5cfa5c805138e445504e8bfa5cf4b95891 Mon Sep 17 00:00:00 2001 From: Ari Lazier Date: Tue, 22 Nov 2016 07:07:52 -0800 Subject: [PATCH 2/3] use newer node version --- scripts/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/test.sh b/scripts/test.sh index 58e764d1..cefadf02 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -108,7 +108,7 @@ trap cleanup EXIT # Use a consistent version of Node if possible. if [ -s "${HOME}/.nvm/nvm.sh" ]; then . "${HOME}/.nvm/nvm.sh" - nvm use 4.4.7 || true + nvm use 5.12 || true fi # Remove cached packages From fcf04bf7f59241428ddd9560489677bdff7e88a0 Mon Sep 17 00:00:00 2001 From: Ari Lazier Date: Tue, 22 Nov 2016 07:27:58 -0800 Subject: [PATCH 3/3] add non-working listener methods --- lib/browser/lists.js | 5 ++++- lib/browser/results.js | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/browser/lists.js b/lib/browser/lists.js index af90250e..df4e63c7 100644 --- a/lib/browser/lists.js +++ b/lib/browser/lists.js @@ -30,7 +30,10 @@ createMethods(List.prototype, objectTypes.LIST, [ 'filtered', 'sorted', 'snapshot', - 'isValid', + 'isValid', + 'addListener', + 'removeListener', + 'removeAllListeners', ]); // Mutating methods: diff --git a/lib/browser/results.js b/lib/browser/results.js index 887a7dd1..6dd4e6b0 100644 --- a/lib/browser/results.js +++ b/lib/browser/results.js @@ -30,6 +30,9 @@ createMethods(Results.prototype, objectTypes.RESULTS, [ 'sorted', 'snapshot', 'isValid', + 'addListener', + 'removeListener', + 'removeAllListeners', ]); export function createResults(realmId, info) {