From 28ff33324ee2f8c13695f76aa03d271e5b33794e Mon Sep 17 00:00:00 2001 From: Enrico Portolan Date: Fri, 14 Oct 2022 11:32:46 +0100 Subject: [PATCH] 0.21.1 (#619) * - add flow support - add OTSession deprecated-react-native-prop-types package * - fix double import * - remove eventEmitter warnings * - update ios dependency with XCFramework * - update minimum target * 0.21.1 * - update changelog --- .flowconfig | 11 ++++ CHANGELOG.md | 6 +++ android/build.gradle | 2 +- .../opentokreactnative/OTSessionManager.java | 12 +++++ opentok-react-native.podspec | 4 +- package-lock.json | 51 ++++++++++++++++--- package.json | 5 +- src/OTSession.js | 3 +- 8 files changed, 81 insertions(+), 13 deletions(-) create mode 100644 .flowconfig diff --git a/.flowconfig b/.flowconfig new file mode 100644 index 00000000..1fed4453 --- /dev/null +++ b/.flowconfig @@ -0,0 +1,11 @@ +[ignore] + +[include] + +[libs] + +[lints] + +[options] + +[strict] diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a4bc88c..7bb5c170 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# 0.21.1 (Oct 14, 2022) + +- [Update]: iOS SDK to 2.23.1 and Android to 2.23.1 +- [Update]: min target for iOS is now 12.0 + + # 0.21.0 (June 14, 2022) - [Update]: Add DTX Option for Publisher diff --git a/android/build.gradle b/android/build.gradle index 5b35a713..a8f2fb88 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -27,5 +27,5 @@ android { dependencies { implementation fileTree(dir: "libs", include: ["*.jar"]) implementation "com.facebook.react:react-native:${_reactNativeVersion}" // From node_modules - implementation 'com.opentok.android:opentok-android-sdk:2.22.3' + implementation 'com.opentok.android:opentok-android-sdk:2.23.1' } diff --git a/android/src/main/java/com/opentokreactnative/OTSessionManager.java b/android/src/main/java/com/opentokreactnative/OTSessionManager.java index adff45ef..6b468d7a 100644 --- a/android/src/main/java/com/opentokreactnative/OTSessionManager.java +++ b/android/src/main/java/com/opentokreactnative/OTSessionManager.java @@ -412,6 +412,18 @@ public void removeJSComponentEvents(ReadableArray events) { } } + // Required for rn built in EventEmitter Calls. + @ReactMethod + public void addListener(String eventName) { + + } + + @ReactMethod + public void removeListeners(Integer count) { + + } + + @ReactMethod public void sendSignal(String sessionId, ReadableMap signal, Callback callback) { ConcurrentHashMap mSessions = sharedState.getSessions(); diff --git a/opentok-react-native.podspec b/opentok-react-native.podspec index 4d3c80af..0e65b99d 100644 --- a/opentok-react-native.podspec +++ b/opentok-react-native.podspec @@ -10,12 +10,12 @@ Pod::Spec.new do |s| s.authors = package['author'] s.homepage = package['homepage'] - s.platform = :ios, "9.0" + s.platform = :ios, "12.0" s.swift_version = "4.2" s.source = { :git => "https://github.com/opentok/opentok-react-native.git", :tag => "v#{s.version}" } s.source_files = "ios/**/*.{h,m,swift}" s.dependency 'React' - s.dependency 'OpenTok','~> 2.22.3' + s.dependency 'OTXCFramework','2.23.1' end diff --git a/package-lock.json b/package-lock.json index ead825b6..8aa94ac5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,14 +1,17 @@ { "name": "opentok-react-native", - "version": "0.21.0", + "version": "0.21.1", "lockfileVersion": 2, "requires": true, "packages": { "": { - "version": "0.21.0", + "name": "opentok-react-native", + "version": "0.21.1", "license": "MIT", "dependencies": { "axios": "^0.21.1", + "deprecated-react-native-prop-types": "^2.3.0", + "flow-bin": "^0.180.0", "prop-types": "^15.7.2", "underscore": "^1.13.0", "uuid": "^3.4.0" @@ -2521,8 +2524,7 @@ "node_modules/@react-native/normalize-color": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@react-native/normalize-color/-/normalize-color-1.0.0.tgz", - "integrity": "sha512-xUNRvNmCl3UGCPbbHvfyFMnpvLPoOjDCcp5bT9m2k+TF/ZBklEQwhPZlkrxRx2NhgFh1X3a5uL7mJ7ZR+8G7Qg==", - "dev": true + "integrity": "sha512-xUNRvNmCl3UGCPbbHvfyFMnpvLPoOjDCcp5bT9m2k+TF/ZBklEQwhPZlkrxRx2NhgFh1X3a5uL7mJ7ZR+8G7Qg==" }, "node_modules/@react-native/polyfills": { "version": "1.0.0", @@ -4309,6 +4311,16 @@ "node": ">= 0.6" } }, + "node_modules/deprecated-react-native-prop-types": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/deprecated-react-native-prop-types/-/deprecated-react-native-prop-types-2.3.0.tgz", + "integrity": "sha512-pWD0voFtNYxrVqvBMYf5gq3NA2GCpfodS1yNynTPc93AYA/KEMGeWDqqeUB6R2Z9ZofVhks2aeJXiuQqKNpesA==", + "dependencies": { + "@react-native/normalize-color": "*", + "invariant": "*", + "prop-types": "*" + } + }, "node_modules/destroy": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", @@ -5605,6 +5617,17 @@ "integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==", "dev": true }, + "node_modules/flow-bin": { + "version": "0.180.0", + "resolved": "https://registry.npmjs.org/flow-bin/-/flow-bin-0.180.0.tgz", + "integrity": "sha512-jEZoIwOxzrtQ0erUu94nEzlqUoX7OAMeVs0CjO0rN6b7SDBhI5IysVRvGSQkkFWBJpy5VQ9lvzBYzq5Sq9vcmg==", + "bin": { + "flow": "cli.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/flow-parser": { "version": "0.121.0", "resolved": "https://registry.npmjs.org/flow-parser/-/flow-parser-0.121.0.tgz", @@ -6208,7 +6231,6 @@ "version": "2.2.4", "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", - "dev": true, "dependencies": { "loose-envify": "^1.0.0" } @@ -14646,8 +14668,7 @@ "@react-native/normalize-color": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@react-native/normalize-color/-/normalize-color-1.0.0.tgz", - "integrity": "sha512-xUNRvNmCl3UGCPbbHvfyFMnpvLPoOjDCcp5bT9m2k+TF/ZBklEQwhPZlkrxRx2NhgFh1X3a5uL7mJ7ZR+8G7Qg==", - "dev": true + "integrity": "sha512-xUNRvNmCl3UGCPbbHvfyFMnpvLPoOjDCcp5bT9m2k+TF/ZBklEQwhPZlkrxRx2NhgFh1X3a5uL7mJ7ZR+8G7Qg==" }, "@react-native/polyfills": { "version": "1.0.0", @@ -16112,6 +16133,16 @@ "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", "dev": true }, + "deprecated-react-native-prop-types": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/deprecated-react-native-prop-types/-/deprecated-react-native-prop-types-2.3.0.tgz", + "integrity": "sha512-pWD0voFtNYxrVqvBMYf5gq3NA2GCpfodS1yNynTPc93AYA/KEMGeWDqqeUB6R2Z9ZofVhks2aeJXiuQqKNpesA==", + "requires": { + "@react-native/normalize-color": "*", + "invariant": "*", + "prop-types": "*" + } + }, "destroy": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", @@ -17134,6 +17165,11 @@ "integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==", "dev": true }, + "flow-bin": { + "version": "0.180.0", + "resolved": "https://registry.npmjs.org/flow-bin/-/flow-bin-0.180.0.tgz", + "integrity": "sha512-jEZoIwOxzrtQ0erUu94nEzlqUoX7OAMeVs0CjO0rN6b7SDBhI5IysVRvGSQkkFWBJpy5VQ9lvzBYzq5Sq9vcmg==" + }, "flow-parser": { "version": "0.121.0", "resolved": "https://registry.npmjs.org/flow-parser/-/flow-parser-0.121.0.tgz", @@ -17578,7 +17614,6 @@ "version": "2.2.4", "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", - "dev": true, "requires": { "loose-envify": "^1.0.0" } diff --git a/package.json b/package.json index efa4f918..cf0bc239 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,11 @@ { "name": "opentok-react-native", - "version": "0.21.0", + "version": "0.21.1", "description": "React Native components for OpenTok iOS and Android SDKs", "main": "src/index.js", "homepage": "https://www.tokbox.com", "scripts": { + "flow": "flow", "test": "echo \"Error: no test specified\" && exit 1" }, "keywords": [ @@ -26,6 +27,8 @@ }, "dependencies": { "axios": "^0.21.1", + "deprecated-react-native-prop-types": "^2.3.0", + "flow-bin": "^0.180.0", "prop-types": "^15.7.2", "underscore": "^1.13.0", "uuid": "^3.4.0" diff --git a/src/OTSession.js b/src/OTSession.js index d3b83370..b0e4b3f6 100644 --- a/src/OTSession.js +++ b/src/OTSession.js @@ -1,5 +1,6 @@ import React, { Component, Children, cloneElement } from 'react'; -import { View, ViewPropTypes } from 'react-native'; +import { View } from 'react-native'; +import { ViewPropTypes } from 'deprecated-react-native-prop-types'; import PropTypes from 'prop-types'; import { pick, isNull } from 'underscore'; import { setNativeEvents, removeNativeEvents, OT } from './OT';