Skip to content

Commit 20b326d

Browse files
committed
test(deps): update jest versions + snapshots
the snapshots just had some escape-sequence changes on visual inspection, updated with `yarn tests:jest -u`
1 parent 29447aa commit 20b326d

File tree

7 files changed

+476
-475
lines changed

7 files changed

+476
-475
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
"@types/react-native": "^0.67.12",
5959
"@typescript-eslint/eslint-plugin": "^5.40.1",
6060
"@typescript-eslint/parser": "^5.40.1",
61-
"babel-jest": "^28.1.3",
61+
"babel-jest": "^29.2.0",
6262
"clang-format": "^1.8.0",
6363
"codecov": "^3.8.3",
6464
"conventional-changelog-cli": "^2.2.2",
@@ -71,13 +71,13 @@
7171
"genversion": "^3.1.1",
7272
"google-java-format": "^1.1.0",
7373
"inquirer": "^8.2.4",
74-
"jest": "^28.1.1",
74+
"jest": "^29.2.0",
7575
"lerna": "^6.0.1",
7676
"prettier": "^2.7.1",
7777
"regenerator-transform": "^0.15.0",
7878
"rimraf": "^3.0.2",
7979
"shelljs": "^0.8.5",
80-
"ts-jest": "^28.0.8",
80+
"ts-jest": "^29.0.3",
8181
"typescript": "^4.7.4"
8282
},
8383
"resolutions": {

packages/app/plugin/__tests__/__snapshots__/androidPlugin.test.ts.snap

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
exports[`Config Plugin Android Tests applies changes to app/build.gradle 1`] = `
44
"/* Example build.gradle file from https://github.com/expo/expo/blob/6ab0274b5cb9a9c223e0d453787a522b438b4fcb/templates/expo-template-bare-minimum/android/app/build.gradle */
55
6-
apply plugin: \\"com.android.application\\"
6+
apply plugin: "com.android.application"
77
88
import com.android.build.OutputFile
99
@@ -13,17 +13,17 @@ project.ext.react = [
1313
]
1414
1515
apply from: '../../node_modules/react-native-unimodules/gradle.groovy'
16-
apply from: \\"../../node_modules/react-native/react.gradle\\"
17-
apply from: \\"../../node_modules/expo-constants/scripts/get-app-config-android.gradle\\"
18-
apply from: \\"../../node_modules/expo-updates/scripts/create-manifest-android.gradle\\"
16+
apply from: "../../node_modules/react-native/react.gradle"
17+
apply from: "../../node_modules/expo-constants/scripts/get-app-config-android.gradle"
18+
apply from: "../../node_modules/expo-updates/scripts/create-manifest-android.gradle"
1919
2020
def enableSeparateBuildPerCPUArchitecture = false
2121
2222
def enableProguardInReleaseBuilds = false
2323
2424
def jscFlavor = 'org.webkit:android-jsc:+'
2525
26-
def enableHermes = project.ext.react.get(\\"enableHermes\\", false);
26+
def enableHermes = project.ext.react.get("enableHermes", false);
2727
2828
android {
2929
compileSdkVersion rootProject.ext.compileSdkVersion
@@ -34,18 +34,18 @@ android {
3434
}
3535
3636
defaultConfig {
37-
applicationId \\"com.helloworld\\"
37+
applicationId "com.helloworld"
3838
minSdkVersion rootProject.ext.minSdkVersion
3939
targetSdkVersion rootProject.ext.targetSdkVersion
4040
versionCode 1
41-
versionName \\"1.0\\"
41+
versionName "1.0"
4242
}
4343
splits {
4444
abi {
4545
reset()
4646
enable enableSeparateBuildPerCPUArchitecture
4747
universalApk false // If true, also generate a universal APK
48-
include \\"armeabi-v7a\\", \\"x86\\", \\"arm64-v8a\\", \\"x86_64\\"
48+
include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
4949
}
5050
}
5151
signingConfigs {
@@ -65,7 +65,7 @@ android {
6565
// see https://reactnative.dev/docs/signed-apk-android.
6666
signingConfig signingConfigs.debug
6767
minifyEnabled enableProguardInReleaseBuilds
68-
proguardFiles getDefaultProguardFile(\\"proguard-android.txt\\"), \\"proguard-rules.pro\\"
68+
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
6969
}
7070
}
7171
@@ -74,7 +74,7 @@ android {
7474
variant.outputs.each { output ->
7575
// For each separate APK per architecture, set a unique version code as described here:
7676
// https://developer.android.com/studio/build/configure-apk-splits.html
77-
def versionCodes = [\\"armeabi-v7a\\": 1, \\"x86\\": 2, \\"arm64-v8a\\": 3, \\"x86_64\\": 4]
77+
def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
7878
def abi = output.getFilter(OutputFile.ABI)
7979
if (abi != null) { // null for the universal-debug, universal-release variants
8080
output.versionCodeOverride =
@@ -86,26 +86,26 @@ android {
8686
}
8787
8888
dependencies {
89-
implementation fileTree(dir: \\"libs\\", include: [\\"*.jar\\"])
89+
implementation fileTree(dir: "libs", include: ["*.jar"])
9090
//noinspection GradleDynamicVersion
91-
implementation \\"com.facebook.react:react-native:+\\" // From node_modules
92-
implementation \\"androidx.swiperefreshlayout:swiperefreshlayout:1.0.0\\"
93-
debugImplementation(\\"com.facebook.flipper:flipper:\${FLIPPER_VERSION}\\") {
91+
implementation "com.facebook.react:react-native:+" // From node_modules
92+
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
93+
debugImplementation("com.facebook.flipper:flipper:\${FLIPPER_VERSION}") {
9494
exclude group:'com.facebook.fbjni'
9595
}
96-
debugImplementation(\\"com.facebook.flipper:flipper-network-plugin:\${FLIPPER_VERSION}\\") {
96+
debugImplementation("com.facebook.flipper:flipper-network-plugin:\${FLIPPER_VERSION}") {
9797
exclude group:'com.facebook.flipper'
9898
exclude group:'com.squareup.okhttp3', module:'okhttp'
9999
}
100-
debugImplementation(\\"com.facebook.flipper:flipper-fresco-plugin:\${FLIPPER_VERSION}\\") {
100+
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:\${FLIPPER_VERSION}") {
101101
exclude group:'com.facebook.flipper'
102102
}
103103
addUnimodulesDependencies()
104104
105105
if (enableHermes) {
106-
def hermesPath = \\"../../node_modules/hermes-engine/android/\\";
107-
debugImplementation files(hermesPath + \\"hermes-debug.aar\\")
108-
releaseImplementation files(hermesPath + \\"hermes-release.aar\\")
106+
def hermesPath = "../../node_modules/hermes-engine/android/";
107+
debugImplementation files(hermesPath + "hermes-debug.aar")
108+
releaseImplementation files(hermesPath + "hermes-release.aar")
109109
} else {
110110
implementation jscFlavor
111111
}
@@ -118,7 +118,7 @@ task copyDownloadableDepsToLibs(type: Copy) {
118118
into 'libs'
119119
}
120120
121-
apply from: file(\\"../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle\\"); applyNativeModulesAppBuildGradle(project)
121+
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
122122
123123
apply plugin: 'com.google.gms.google-services'"
124124
`;
@@ -128,7 +128,7 @@ exports[`Config Plugin Android Tests applies changes to project build.gradle 1`]
128128
129129
buildscript {
130130
ext {
131-
buildToolsVersion = \\"29.0.3\\"
131+
buildToolsVersion = "29.0.3"
132132
minSdkVersion = 21
133133
compileSdkVersion = 30
134134
targetSdkVersion = 30
@@ -139,7 +139,7 @@ buildscript {
139139
}
140140
dependencies {
141141
classpath 'com.google.gms:google-services:4.3.14'
142-
classpath(\\"com.android.tools.build:gradle:4.1.0\\")
142+
classpath("com.android.tools.build:gradle:4.1.0")
143143
144144
// NOTE: Do not place your application dependencies here; they belong
145145
// in the individual module build.gradle files
@@ -151,11 +151,11 @@ allprojects {
151151
mavenLocal()
152152
maven {
153153
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
154-
url(\\"$rootDir/../node_modules/react-native/android\\")
154+
url("$rootDir/../node_modules/react-native/android")
155155
}
156156
maven {
157157
// Android JSC is installed from npm
158-
url(\\"$rootDir/../node_modules/jsc-android/dist\\")
158+
url("$rootDir/../node_modules/jsc-android/dist")
159159
}
160160
161161
google()

packages/app/plugin/__tests__/__snapshots__/iosPlugin.test.ts.snap

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ exports[`Config Plugin iOS Tests tests changes made to AppDelegate.m (SDK 43) 1`
55
// It is (nearly) identical to the pure template used when
66
// creating a bare React Native app (without Expo)
77
8-
#import \\"AppDelegate.h\\"
8+
#import "AppDelegate.h"
99
#import <Firebase/Firebase.h>
1010
1111
#import <React/RCTBridge.h>
@@ -45,8 +45,8 @@ static void InitializeFlipper(UIApplication *application) {
4545
[FIRApp configure];
4646
// @generated end @react-native-firebase/app-didFinishLaunchingWithOptions
4747
RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
48-
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge moduleName:@\\"main\\" initialProperties:nil];
49-
id rootViewBackgroundColor = [[NSBundle mainBundle] objectForInfoDictionaryKey:@\\"RCTRootViewBackgroundColor\\"];
48+
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge moduleName:@"main" initialProperties:nil];
49+
id rootViewBackgroundColor = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"RCTRootViewBackgroundColor"];
5050
if (rootViewBackgroundColor != nil) {
5151
rootView.backgroundColor = [RCTConvert UIColor:rootViewBackgroundColor];
5252
} else {
@@ -72,9 +72,9 @@ static void InitializeFlipper(UIApplication *application) {
7272
7373
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge {
7474
#ifdef DEBUG
75-
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@\\"index\\" fallbackResource:nil];
75+
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
7676
#else
77-
return [[NSBundle mainBundle] URLForResource:@\\"main\\" withExtension:@\\"jsbundle\\"];
77+
return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
7878
#endif
7979
}
8080
@@ -98,7 +98,7 @@ exports[`Config Plugin iOS Tests tests changes made to AppDelegate.m with Expo R
9898
"// This AppDelegate prebuild template is used in Expo SDK 44+
9999
// It has the RCTBridge to be created by Expo ReactDelegate
100100
101-
#import \\"AppDelegate.h\\"
101+
#import "AppDelegate.h"
102102
#import <Firebase/Firebase.h>
103103
104104
#import <React/RCTBridge.h>
@@ -138,7 +138,7 @@ static void InitializeFlipper(UIApplication *application) {
138138
[FIRApp configure];
139139
// @generated end @react-native-firebase/app-didFinishLaunchingWithOptions
140140
RCTBridge *bridge = [self.reactDelegate createBridgeWithDelegate:self launchOptions:launchOptions];
141-
RCTRootView *rootView = [self.reactDelegate createRootViewWithBridge:bridge moduleName:@\\"main\\" initialProperties:nil];
141+
RCTRootView *rootView = [self.reactDelegate createRootViewWithBridge:bridge moduleName:@"main" initialProperties:nil];
142142
rootView.backgroundColor = [UIColor whiteColor];
143143
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
144144
UIViewController *rootViewController = [self.reactDelegate createRootViewController];
@@ -159,9 +159,9 @@ static void InitializeFlipper(UIApplication *application) {
159159
160160
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge {
161161
#ifdef DEBUG
162-
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@\\"index\\" fallbackResource:nil];
162+
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
163163
#else
164-
return [[NSBundle mainBundle] URLForResource:@\\"main\\" withExtension:@\\"jsbundle\\"];
164+
return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
165165
#endif
166166
}
167167
@@ -188,7 +188,7 @@ exports[`Config Plugin iOS Tests tests changes made to AppDelegate.m with fallba
188188
189189
// some parts omitted to be short
190190
191-
#import \\"AppDelegate.h\\"
191+
#import "AppDelegate.h"
192192
#import <Firebase/Firebase.h>
193193
194194
#import <React/RCTBridge.h>
@@ -212,8 +212,8 @@ exports[`Config Plugin iOS Tests tests changes made to AppDelegate.m with fallba
212212
213213
// the line below is malfolmed not to be matched by the Expo plugin regex
214214
// RCTBridge* briddge = [RCTBridge new];
215-
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:briddge moduleName:@\\"main\\" initialProperties:nil];
216-
id rootViewBackgroundColor = [[NSBundle mainBundle] objectForInfoDictionaryKey:@\\"RCTRootViewBackgroundColor\\"];
215+
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:briddge moduleName:@"main" initialProperties:nil];
216+
id rootViewBackgroundColor = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"RCTRootViewBackgroundColor"];
217217
if (rootViewBackgroundColor != nil) {
218218
rootView.backgroundColor = [RCTConvert UIColor:rootViewBackgroundColor];
219219
} else {
@@ -239,7 +239,7 @@ exports[`Config Plugin iOS Tests tests changes made to old AppDelegate.m (SDK 42
239239
"// This AppDelegate prebuild template is used in Expo SDK 42 and older
240240
// It expects the old react-native-unimodules architecture (UM* prefix)
241241
242-
#import \\"AppDelegate.h\\"
242+
#import "AppDelegate.h"
243243
#import <Firebase/Firebase.h>
244244
245245
#import <React/RCTBridge.h>
@@ -309,7 +309,7 @@ static void InitializeFlipper(UIApplication *application) {
309309
- (RCTBridge *)initializeReactNativeApp
310310
{
311311
RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:self.launchOptions];
312-
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge moduleName:@\\"main\\" initialProperties:nil];
312+
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge moduleName:@"main" initialProperties:nil];
313313
rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
314314
315315
UIViewController *rootViewController = [UIViewController new];
@@ -329,7 +329,7 @@ static void InitializeFlipper(UIApplication *application) {
329329
330330
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge {
331331
#ifdef DEBUG
332-
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@\\"index\\" fallbackResource:nil];
332+
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
333333
#else
334334
return [[EXUpdatesAppController sharedInstance] launchAssetUrl];
335335
#endif
@@ -350,7 +350,7 @@ exports[`Config Plugin iOS Tests works with AppDelegate.mm (RN 0.68+) 1`] = `
350350
// The main difference between this and the SDK 44 one is that this is
351351
// using React Native 0.68 and is written in Objective-C++
352352
353-
#import \\"AppDelegate.h\\"
353+
#import "AppDelegate.h"
354354
#import <Firebase/Firebase.h>
355355
356356
#import <React/RCTBridge.h>
@@ -394,12 +394,12 @@ exports[`Config Plugin iOS Tests works with AppDelegate.mm (RN 0.68+) 1`] = `
394394
#if RCT_NEW_ARCH_ENABLED
395395
_contextContainer = std::make_shared<facebook::react::ContextContainer const>();
396396
_reactNativeConfig = std::make_shared<facebook::react::EmptyReactNativeConfig const>();
397-
_contextContainer->insert(\\"ReactNativeConfig\\", _reactNativeConfig);
397+
_contextContainer->insert("ReactNativeConfig", _reactNativeConfig);
398398
_bridgeAdapter = [[RCTSurfacePresenterBridgeAdapter alloc] initWithBridge:bridge contextContainer:_contextContainer];
399399
bridge.surfacePresenter = _bridgeAdapter.surfacePresenter;
400400
#endif
401401
402-
UIView *rootView = [self.reactDelegate createRootViewWithBridge:bridge moduleName:@\\"main\\" initialProperties:nil];
402+
UIView *rootView = [self.reactDelegate createRootViewWithBridge:bridge moduleName:@"main" initialProperties:nil];
403403
404404
rootView.backgroundColor = [UIColor whiteColor];
405405
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
@@ -422,9 +422,9 @@ exports[`Config Plugin iOS Tests works with AppDelegate.mm (RN 0.68+) 1`] = `
422422
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
423423
{
424424
#if DEBUG
425-
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@\\"index\\"];
425+
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
426426
#else
427-
return [[NSBundle mainBundle] URLForResource:@\\"main\\" withExtension:@\\"jsbundle\\"];
427+
return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
428428
#endif
429429
}
430430

0 commit comments

Comments
 (0)