Skip to content
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

chore(SDK-2472): update RN to 0.72 #1006

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/gate-keeper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Gate Keeper
on:
push:
env:
NODE_VERSION: 16
NODE_VERSION: 18

jobs:
test-lint:
Expand Down
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
source "https://rubygems.org"

gem "cocoapods", "~> 1.9"
ruby ">= 2.6.10"
gem 'cocoapods', '~> 1.12'

11 changes: 11 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const rnx = require("@rnx-kit/eslint-plugin");
module.exports = [
...rnx.configs.recommended,
{
rules: {
"@rnx-kit/no-const-enum": "error",
"@rnx-kit/no-export-all": "error",
"@typescript-eslint/no-explicit-any": "off"
},
},
];
14,975 changes: 7,173 additions & 7,802 deletions package-lock.json

Large diffs are not rendered by default.

13 changes: 9 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,17 @@
"@babel/core": "^7.20.0",
"@babel/preset-env": "^7.20.0",
"@babel/runtime": "^7.20.0",
"@react-native-community/eslint-config": "^3.0.0",
"@react-native/eslint-config": "^0.72.2",
"@react-native/metro-config": "^0.72.6",
"@rnx-kit/eslint-plugin": "^0.7.2",
"@tsconfig/react-native": "^3.0.0",
"@types/metro-config": "^0.76.3",
"@types/react": "^18.0.24",
"babel-jest": "^29.2.1",
"eslint": "^8.19.0",
"eslint-config-rackt": "^1.1.1",
"eslint": "^9.7.0",
"jest": "^29.2.1",
"metro-react-native-babel-preset": "^0.76.5",
"react": "18.2.0",
"react-native": "0.71.4"
"react-native": "^0.72.0"
}
}
24 changes: 12 additions & 12 deletions test/BranchSubscriber.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ test('will check cached events by default', () => {
test('subscribes to init session start events', () => {
const subscriber = new BranchSubscriber({
checkCachedEvents: false,
onOpenStart: ({uri}) => {},
onOpenStart: () => {},
})
subscriber._nativeEventEmitter.addListener = jest.fn((eventType, listener) => {})
subscriber._nativeEventEmitter.addListener = jest.fn(() => {})
subscriber.subscribe()

expect(subscriber._nativeEventEmitter.addListener.mock.calls.length).toBe(1)
Expand All @@ -36,9 +36,9 @@ test('subscribes to init session start events', () => {
test('subscribes to init session success & error events', () => {
const subscriber = new BranchSubscriber({
checkCachedEvents: false,
onOpenComplete: ({params, error, uri}) => {},
onOpenComplete: () => {},
})
subscriber._nativeEventEmitter.addListener = jest.fn((eventType, listener) => {})
subscriber._nativeEventEmitter.addListener = jest.fn(() => {})
subscriber.subscribe()

expect(subscriber._nativeEventEmitter.addListener.mock.calls.length).toBe(2)
Expand Down Expand Up @@ -80,13 +80,13 @@ test('will return a cached event when appropriate', done => {
// Set up subscriber, mocking the callbacks
const subscriber = new BranchSubscriber({
checkCachedEvents: true,
onOpenStart: jest.fn(({uri}) => {}),
onOpenComplete: jest.fn(({params, error, uri}) => {}),
onOpenStart: jest.fn(() => {}),
onOpenComplete: jest.fn(() => {}),
})

// mock subscriber._nativeEventEmitter.addListener. Expect this to be called three times.
let addListenerCount = 0
subscriber._nativeEventEmitter.addListener = (eventType, listener) => {
subscriber._nativeEventEmitter.addListener = () => {
if (++addListenerCount < 3) return

// --- Check results ---
Expand Down Expand Up @@ -133,11 +133,11 @@ test('passes a non-null uri to onOpenStart when available', done => {
// Set up subscriber, mocking the callbacks
const subscriber = new BranchSubscriber({
checkCachedEvents: true,
onOpenStart: jest.fn(({uri}) => {}),
onOpenStart: jest.fn(() => {}),
})

// mock subscriber._nativeEventEmitter.addListener.
subscriber._nativeEventEmitter.addListener = (eventType, listener) => {
subscriber._nativeEventEmitter.addListener = () => {
// --- Check results ---

try {
Expand All @@ -163,13 +163,13 @@ test('does not return a cached result when none available', done => {
// Set up subscriber, mocking the callbacks
const subscriber = new BranchSubscriber({
checkCachedEvents: true,
onOpenStart: jest.fn(({uri}) => {}),
onOpenComplete: jest.fn(({params, error, uri}) => {}),
onOpenStart: jest.fn(() => {}),
onOpenComplete: jest.fn(() => {}),
})

// mock subscriber._nativeEventEmitter.addListener. Expect this to be called three times.
let addListenerCount = 0
subscriber._nativeEventEmitter.addListener = (eventType, listener) => {
subscriber._nativeEventEmitter.addListener = () => {
if (++addListenerCount < 3) return

// --- Check results ---
Expand Down
4 changes: 2 additions & 2 deletions test/RNBranchMock.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ NativeModules.RNBranch = {
}

NativeModules.RNBranchEventEmitter = {
addListener: jest.fn(eventType => {}),
removeListener: jest.fn(count => {}),
addListener: jest.fn(() => {}),
removeListener: jest.fn(() => {}),
}
Loading