@computools/react-native-template-controller 1.0.19 → 1.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -10,7 +10,7 @@
10
10
 
11
11
  <img src="https://ik.imagekit.io/computools/computools-background/upload-8a50e7e4-c14e-4b55-ae17-bd0cca2f6493.webp">
12
12
 
13
- ### Latest supported RN version [0.73.8](https://github.com/facebook/react-native/releases/tag/v0.73.8) 🎯
13
+ ### Latest supported RN version [0.74.1](https://github.com/facebook/react-native/releases/tag/v0.74.1) 🎯
14
14
 
15
15
  ### Precondition: 📗
16
16
 
@@ -39,6 +39,7 @@ See the below table to find out which version of the template to use.
39
39
 
40
40
  | React Native | Template |
41
41
  | ------------ | -------- |
42
+ | 0.74 | 1.0.20 |
42
43
  | 0.73 | 1.0.11 |
43
44
  | 0.72 | 1.0.0 |
44
45
  | 0.71.11 | 0.0.7 |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@computools/react-native-template-controller",
3
- "version": "1.0.19",
3
+ "version": "1.0.20",
4
4
  "description": "Computools react native template by using mobx as controllers",
5
5
  "main": "template.config.js",
6
6
  "scripts": {
@@ -20,7 +20,7 @@ DerivedData
20
20
  *.hmap
21
21
  *.ipa
22
22
  *.xcuserstate
23
- ios/.xcode.env.local
23
+ **/.xcode.env.local
24
24
 
25
25
  # Android/IntelliJ
26
26
  #
@@ -56,7 +56,7 @@ yarn-error.log
56
56
  *.jsbundle
57
57
 
58
58
  # Ruby / CocoaPods
59
- /ios/Pods/
59
+ **/Pods/
60
60
  /vendor/bundle/
61
61
 
62
62
  # Temporary files created by Metro to check the health of the file watcher
@@ -64,3 +64,11 @@ yarn-error.log
64
64
 
65
65
  # testing
66
66
  /coverage
67
+
68
+ # Yarn
69
+ .yarn/*
70
+ !.yarn/patches
71
+ !.yarn/plugins
72
+ !.yarn/releases
73
+ !.yarn/sdks
74
+ !.yarn/versions
@@ -143,7 +143,6 @@ android {
143
143
  dependencies {
144
144
  // The version of react-native is set by the React Native Gradle Plugin
145
145
  implementation("com.facebook.react:react-android")
146
- implementation("com.facebook.react:flipper-integration")
147
146
 
148
147
  implementation("androidx.core:core-splashscreen:1.0.0")
149
148
 
@@ -17,7 +17,8 @@
17
17
  android:insetLeft="@dimen/abc_edit_text_inset_horizontal_material"
18
18
  android:insetRight="@dimen/abc_edit_text_inset_horizontal_material"
19
19
  android:insetTop="@dimen/abc_edit_text_inset_top_material"
20
- android:insetBottom="@dimen/abc_edit_text_inset_bottom_material">
20
+ android:insetBottom="@dimen/abc_edit_text_inset_bottom_material"
21
+ >
21
22
 
22
23
  <selector>
23
24
  <!--
@@ -9,7 +9,6 @@ import com.facebook.react.ReactPackage
9
9
  import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
10
10
  import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
11
11
  import com.facebook.react.defaults.DefaultReactNativeHost
12
- import com.facebook.react.flipper.ReactNativeFlipper
13
12
  import com.facebook.soloader.SoLoader
14
13
 
15
14
  class MainApplication : Application(), ReactApplication {
@@ -31,7 +30,7 @@ class MainApplication : Application(), ReactApplication {
31
30
  }
32
31
 
33
32
  override val reactHost: ReactHost
34
- get() = getDefaultReactHost(this.applicationContext, reactNativeHost)
33
+ get() = getDefaultReactHost(applicationContext, reactNativeHost)
35
34
 
36
35
  override fun onCreate() {
37
36
  super.onCreate()
@@ -40,6 +39,5 @@ class MainApplication : Application(), ReactApplication {
40
39
  // If you opted-in for the New Architecture, we load the native entry point for this app.
41
40
  load()
42
41
  }
43
- ReactNativeFlipper.initializeFlipper(this, reactNativeHost.reactInstanceManager)
44
42
  }
45
43
  }
@@ -17,7 +17,8 @@
17
17
  android:insetLeft="@dimen/abc_edit_text_inset_horizontal_material"
18
18
  android:insetRight="@dimen/abc_edit_text_inset_horizontal_material"
19
19
  android:insetTop="@dimen/abc_edit_text_inset_top_material"
20
- android:insetBottom="@dimen/abc_edit_text_inset_bottom_material">
20
+ android:insetBottom="@dimen/abc_edit_text_inset_bottom_material"
21
+ >
21
22
 
22
23
  <selector>
23
24
  <!--
@@ -17,7 +17,8 @@
17
17
  android:insetLeft="@dimen/abc_edit_text_inset_horizontal_material"
18
18
  android:insetRight="@dimen/abc_edit_text_inset_horizontal_material"
19
19
  android:insetTop="@dimen/abc_edit_text_inset_top_material"
20
- android:insetBottom="@dimen/abc_edit_text_inset_bottom_material">
20
+ android:insetBottom="@dimen/abc_edit_text_inset_bottom_material"
21
+ >
21
22
 
22
23
  <selector>
23
24
  <!--
@@ -1,11 +1,11 @@
1
1
  buildscript {
2
2
  ext {
3
3
  buildToolsVersion = "34.0.0"
4
- minSdkVersion = 21
4
+ minSdkVersion = 23
5
5
  compileSdkVersion = 34
6
6
  targetSdkVersion = 34
7
- ndkVersion = "25.1.8937393"
8
- kotlinVersion = "1.8.0"
7
+ ndkVersion = "26.1.10909125"
8
+ kotlinVersion = "1.9.22"
9
9
  }
10
10
  repositories {
11
11
  google()
@@ -1,6 +1,6 @@
1
1
  distributionBase=GRADLE_USER_HOME
2
2
  distributionPath=wrapper/dists
3
- distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip
3
+ distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip
4
4
  networkTimeout=10000
5
5
  validateDistributionUrl=true
6
6
  zipStoreBase=GRADLE_USER_HOME
@@ -145,7 +145,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
145
145
  case $MAX_FD in #(
146
146
  max*)
147
147
  # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
148
- # shellcheck disable=SC3045
148
+ # shellcheck disable=SC2039,SC3045
149
149
  MAX_FD=$( ulimit -H -n ) ||
150
150
  warn "Could not query maximum file descriptor limit"
151
151
  esac
@@ -153,7 +153,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
153
153
  '' | soft) :;; #(
154
154
  *)
155
155
  # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
156
- # shellcheck disable=SC3045
156
+ # shellcheck disable=SC2039,SC3045
157
157
  ulimit -n "$MAX_FD" ||
158
158
  warn "Could not set maximum file descriptor limit to $MAX_FD"
159
159
  esac
@@ -202,11 +202,11 @@ fi
202
202
  # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
203
203
  DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
204
204
 
205
- # Collect all arguments for the java command;
206
- # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
207
- # shell script including quotes and variable substitutions, so put them in
208
- # double quotes to make sure that they get re-expanded; and
209
- # * put everything else in single quotes, so that it's not re-expanded.
205
+ # Collect all arguments for the java command:
206
+ # * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
207
+ # and any embedded shellness will be escaped.
208
+ # * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
209
+ # treated as '${Hostname}' itself on the command line.
210
210
 
211
211
  set -- \
212
212
  "-Dorg.gradle.appname=$APP_BASE_NAME" \
@@ -43,11 +43,11 @@ set JAVA_EXE=java.exe
43
43
  %JAVA_EXE% -version >NUL 2>&1
44
44
  if %ERRORLEVEL% equ 0 goto execute
45
45
 
46
- echo.
47
- echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
48
- echo.
49
- echo Please set the JAVA_HOME variable in your environment to match the
50
- echo location of your Java installation.
46
+ echo. 1>&2
47
+ echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
48
+ echo. 1>&2
49
+ echo Please set the JAVA_HOME variable in your environment to match the 1>&2
50
+ echo location of your Java installation. 1>&2
51
51
 
52
52
  goto fail
53
53
 
@@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
57
57
 
58
58
  if exist "%JAVA_EXE%" goto execute
59
59
 
60
- echo.
61
- echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
62
- echo.
63
- echo Please set the JAVA_HOME variable in your environment to match the
64
- echo location of your Java installation.
60
+ echo. 1>&2
61
+ echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
62
+ echo. 1>&2
63
+ echo Please set the JAVA_HOME variable in your environment to match the 1>&2
64
+ echo location of your Java installation. 1>&2
65
65
 
66
66
  goto fail
67
67
 
@@ -8,17 +8,6 @@ require Pod::Executable.execute_command('node', ['-p',
8
8
  platform :ios, min_ios_version_supported
9
9
  prepare_react_native_project!
10
10
 
11
- # If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set.
12
- # because `react-native-flipper` depends on (FlipperKit,...) that will be excluded
13
- #
14
- # To fix this you can also exclude `react-native-flipper` using a `react-native.config.js`
15
- # ```js
16
- # module.exports = {
17
- # dependencies: {
18
- # ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),
19
- # ```
20
- flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled
21
-
22
11
  linkage = ENV['USE_FRAMEWORKS']
23
12
  if linkage != nil
24
13
  Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
@@ -30,11 +19,6 @@ abstract_target 'ReactNativeTemplateCommonPods' do
30
19
 
31
20
  use_react_native!(
32
21
  :path => config[:reactNativePath],
33
- # Enables Flipper.
34
- #
35
- # Note that if you have use_frameworks! enabled, Flipper will not work and
36
- # you should disable the next line.
37
- :flipper_configuration => flipper_config,
38
22
  # An absolute path to your application root.
39
23
  :app_path => "#{Pod::Config.instance.installation_root}/.."
40
24
  )
@@ -49,7 +33,8 @@ abstract_target 'ReactNativeTemplateCommonPods' do
49
33
  react_native_post_install(
50
34
  installer,
51
35
  config[:reactNativePath],
52
- :mac_catalyst_enabled => false
36
+ :mac_catalyst_enabled => false,
37
+ # :ccache_enabled => true
53
38
  )
54
39
  end
55
40
 
@@ -19,10 +19,10 @@
19
19
 
20
20
  - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
21
21
  {
22
- return [self getBundleURL];
22
+ return [self bundleURL];
23
23
  }
24
24
 
25
- - (NSURL *)getBundleURL
25
+ - (NSURL *)bundleURL
26
26
  {
27
27
  #if DEBUG
28
28
  return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
@@ -37,7 +37,7 @@
37
37
  <string>LaunchScreen</string>
38
38
  <key>UIRequiredDeviceCapabilities</key>
39
39
  <array>
40
- <string>armv7</string>
40
+ <string>arm64</string>
41
41
  </array>
42
42
  <key>UISupportedInterfaceOrientations</key>
43
43
  <array>
@@ -389,7 +389,7 @@
389
389
  );
390
390
  runOnlyForDeploymentPostprocessing = 0;
391
391
  shellPath = /bin/sh;
392
- shellScript = "set -e\n\nWITH_ENVIRONMENT=\"../node_modules/react-native/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"../node_modules/react-native/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n";
392
+ shellScript = "set -e\n\nWITH_ENVIRONMENT=\"$REACT_NATIVE_PATH/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"$REACT_NATIVE_PATH/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n";
393
393
  };
394
394
  00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */ = {
395
395
  isa = PBXShellScriptBuildPhase;
@@ -444,7 +444,7 @@
444
444
  );
445
445
  runOnlyForDeploymentPostprocessing = 0;
446
446
  shellPath = /bin/sh;
447
- shellScript = "set -e\n\nWITH_ENVIRONMENT=\"../node_modules/react-native/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"../node_modules/react-native/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n";
447
+ shellScript = "set -e\n\nWITH_ENVIRONMENT=\"$REACT_NATIVE_PATH/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"$REACT_NATIVE_PATH/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n";
448
448
  };
449
449
  9314CDC82AF3CEA200F58B73 /* [CP] Embed Pods Frameworks */ = {
450
450
  isa = PBXShellScriptBuildPhase;
@@ -516,7 +516,7 @@
516
516
  );
517
517
  runOnlyForDeploymentPostprocessing = 0;
518
518
  shellPath = /bin/sh;
519
- shellScript = "set -e\n\nWITH_ENVIRONMENT=\"../node_modules/react-native/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"../node_modules/react-native/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n";
519
+ shellScript = "set -e\n\nWITH_ENVIRONMENT=\"$REACT_NATIVE_PATH/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"$REACT_NATIVE_PATH/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n";
520
520
  };
521
521
  9314CDDB2AF3CEAA00F58B73 /* [CP] Embed Pods Frameworks */ = {
522
522
  isa = PBXShellScriptBuildPhase;
@@ -868,6 +868,7 @@
868
868
  "-DFOLLY_MOBILE=1",
869
869
  "-DFOLLY_USE_LIBCPP=1",
870
870
  "-DFOLLY_CFG_NO_COROUTINES=1",
871
+ "-DFOLLY_HAVE_CLOCK_GETTIME=1",
871
872
  );
872
873
  OTHER_LDFLAGS = "$(inherited) ";
873
874
  REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
@@ -940,6 +941,7 @@
940
941
  "-DFOLLY_MOBILE=1",
941
942
  "-DFOLLY_USE_LIBCPP=1",
942
943
  "-DFOLLY_CFG_NO_COROUTINES=1",
944
+ "-DFOLLY_HAVE_CLOCK_GETTIME=1",
943
945
  );
944
946
  OTHER_LDFLAGS = "$(inherited) ";
945
947
  REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
@@ -2,7 +2,7 @@ const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config');
2
2
 
3
3
  /**
4
4
  * Metro configuration
5
- * https://facebook.github.io/metro/docs/configuration
5
+ * https://reactnative.dev/docs/metro
6
6
  *
7
7
  * @type {import('metro-config').MetroConfig}
8
8
  */
@@ -36,12 +36,12 @@
36
36
  "react": "18.2.0",
37
37
  "react-hook-form": "7.49.2",
38
38
  "react-i18next": "14.0.0",
39
- "react-native": "0.73.8",
39
+ "react-native": "0.74.1",
40
40
  "react-native-bootsplash": "4.5.3",
41
41
  "react-native-config": "1.5.1",
42
42
  "react-native-mmkv": "2.11.0",
43
- "react-native-safe-area-context": "4.8.2",
44
- "react-native-screens": "3.29.0",
43
+ "react-native-safe-area-context": "4.10.1",
44
+ "react-native-screens": "3.31.1",
45
45
  "react-native-svg": "14.1.0",
46
46
  "yup": "1.3.3"
47
47
  },
@@ -50,10 +50,10 @@
50
50
  "@babel/preset-env": "^7.20.0",
51
51
  "@babel/runtime": "^7.20.0",
52
52
  "@computools/eslint-config-react-native": "1.1.1",
53
- "@react-native/babel-preset": "0.73.21",
54
- "@react-native/eslint-config": "0.73.2",
55
- "@react-native/metro-config": "0.73.5",
56
- "@react-native/typescript-config": "0.73.1",
53
+ "@react-native/babel-preset": "0.74.83",
54
+ "@react-native/eslint-config": "0.74.83",
55
+ "@react-native/metro-config": "0.74.83",
56
+ "@react-native/typescript-config": "0.74.83",
57
57
  "@types/jest": "^29.2.1",
58
58
  "@types/metro-config": "^0.76.3",
59
59
  "@types/react": "18.2.6",