opentok-react-native
Advanced tools
Comparing version 0.16.0 to 0.17.0
@@ -0,1 +1,7 @@ | ||
# 0.17.0 (Apr 29, 2021) | ||
- **[Feature]**: Updated to react-native 0.64.0 | ||
- **[Fix]**: Updated npm dependencies | ||
- **[Fix]**: Fixed react-native 0.64.0 `nativeEvents.listeners()` crash [PR493](https://github.com/opentok/opentok-react-native/pull/493) | ||
# 0.16.0 (Apr 19, 2021) | ||
@@ -50,2 +56,2 @@ | ||
# 0.x.x (todo) | ||
# 0.x.x (todo) |
{ | ||
"name": "opentok-react-native", | ||
"version": "0.16.0", | ||
"version": "0.17.0", | ||
"description": "React Native components for OpenTok iOS and Android SDKs", | ||
@@ -21,3 +21,3 @@ "main": "src/index.js", | ||
], | ||
"author": "Manik Sachdeva <msach22gmail.com>", | ||
"author": "Vonage <devrel@vonage.com>", | ||
"license": "MIT", | ||
@@ -29,22 +29,22 @@ "repository": { | ||
"dependencies": { | ||
"axios": "^0.19.0", | ||
"axios": "^0.21.1", | ||
"prop-types": "^15.7.2", | ||
"underscore": "^1.9.1", | ||
"uuid": "^3.3.3" | ||
"underscore": "^1.13.0", | ||
"uuid": "^8.3.2" | ||
}, | ||
"devDependencies": { | ||
"babel-jest": "24.9.0", | ||
"eslint": "^6.2.2", | ||
"eslint-config-airbnb": "^18.0.1", | ||
"eslint-plugin-import": "^2.18.2", | ||
"eslint-plugin-jsx-a11y": "^6.2.3", | ||
"eslint-plugin-react": "^7.14.3", | ||
"eslint-plugin-react-hooks": "^1.7.0", | ||
"jest": "24.9.0", | ||
"metro-react-native-babel-preset": "0.56.0", | ||
"react": "^16.8.6", | ||
"react-native": "^0.60.5", | ||
"react-test-renderer": "^16.9.0" | ||
"babel-jest": "26.6.3", | ||
"eslint": "^7.24.0", | ||
"eslint-config-airbnb": "^18.2.1", | ||
"eslint-plugin-import": "^2.22.1", | ||
"eslint-plugin-jsx-a11y": "^6.4.1", | ||
"eslint-plugin-react": "^7.23.2", | ||
"eslint-plugin-react-hooks": "^4.2.0", | ||
"jest": "26.6.3", | ||
"metro-react-native-babel-preset": "0.65.2", | ||
"react": "^17.0.1", | ||
"react-native": "^0.64.0", | ||
"react-test-renderer": "^16.0.9" | ||
}, | ||
"types": "@types/index.d.ts" | ||
} |
@@ -34,5 +34,13 @@ import { NativeModules, NativeEventEmitter, PermissionsAndroid } from 'react-native'; | ||
OT.setNativeEvents(eventNames); | ||
let hasRegisteredEvents; | ||
if (nativeEvents.listeners) { | ||
const allEvents = nativeEvents.listeners(); | ||
hasRegisteredEvents = (eventType) => allEvents.includes(eventType); | ||
} else { | ||
hasRegisteredEvents = (eventType) => nativeEvents.listenerCount(eventType) > 0; | ||
} | ||
each(events, (eventHandler, eventType) => { | ||
const allEvents = nativeEvents.listeners(); | ||
if (!allEvents.includes(eventType)) { | ||
if (!hasRegisteredEvents(eventType)) { | ||
nativeEvents.addListener(eventType, eventHandler); | ||
@@ -39,0 +47,0 @@ } |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
325970
1320
+ Addedaxios@0.21.4(transitive)
+ Addedfollow-redirects@1.15.9(transitive)
+ Addeduuid@8.3.2(transitive)
- Removedaxios@0.19.2(transitive)
- Removedfollow-redirects@1.5.10(transitive)
- Removeduuid@3.4.0(transitive)
Updatedaxios@^0.21.1
Updatedunderscore@^1.13.0
Updateduuid@^8.3.2