@brightlayer-ui/react-native-template-routing-typescript 3.0.1-alpha.0 → 4.0.0

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/CHANGELOG.md CHANGED
@@ -1,29 +1,38 @@
1
1
  # Changelog
2
2
 
3
+ ## v4.0.0 (July 30, 2025)
4
+
5
+ ### Changed
6
+
7
+ - Update to build with React Native 0.80.
8
+ - Upgraded the BLUI packages to use latest version.
9
+ - Package dependencies upgraded to use latest version.
10
+ - Changed cli to use latest template command of RN Community.
11
+
3
12
  ## v3.0.0 (June 5, 2024)
4
13
 
5
14
  ### Changed
6
15
 
7
- - Update to build with React Native 0.73.
8
- - Updated the templates to use React Native CLI
16
+ - Update to build with React Native 0.73.
17
+ - Updated the templates to use React Native CLI
9
18
 
10
19
  ## v2.2.0 (December 6, 2023)
11
20
 
12
21
  ### Changed
13
22
 
14
- - Update dependency package list to support latest `@react-native-reanimated` package.
23
+ - Update dependency package list to support latest `@react-native-reanimated` package.
15
24
 
16
25
  ## v2.1.0 (November 1, 2022)
17
26
 
18
27
  ### Changed
19
28
 
20
- - Update to build with React Native 0.70.
29
+ - Update to build with React Native 0.70.
21
30
 
22
31
  ## v2.0.0 (December 16, 2021)
23
32
 
24
33
  ### Changed
25
34
 
26
- - Changed package namespace from `@pxblue` to `@brightlayer-ui`.
35
+ - Changed package namespace from `@pxblue` to `@brightlayer-ui`.
27
36
 
28
37
  ## Package Migration Notice
29
38
 
@@ -46,24 +55,28 @@ Previous versions listed after this indicator refer to our deprecated `@pxblue`
46
55
  ## v1.3.0 (September 30, 2021)
47
56
 
48
57
  ### Changed
58
+
49
59
  - Upgrade PX Blue packages
50
60
  - Changed default drawer width to 300.
51
61
 
52
62
  ## v1.2.0 (July 26, 2021)
53
63
 
54
64
  ### Changed
65
+
55
66
  - Updated version of react-native-modal dependency to 12.0.2
56
67
 
57
68
  ## v1.1.0 (March 31, 2021)
58
69
 
59
70
  ### Changed
60
- - Updated dependencies to use latest packages.
71
+
72
+ - Updated dependencies to use latest packages.
61
73
 
62
74
  ### Fixed
63
- - Jest configuration allows default tests to pass.
75
+
76
+ - Jest configuration allows default tests to pass.
64
77
 
65
78
  ## v1.0.0 (March 1, 2021)
66
79
 
67
80
  ### Added
68
81
 
69
- - Initial routing template for TypeScript projects
82
+ - Initial routing template for TypeScript projects
package/README.md CHANGED
@@ -2,16 +2,18 @@
2
2
 
3
3
  ![npm (scoped)](https://img.shields.io/npm/v/@brightlayer-ui/react-native-template-routing-typescript?color=%23007bc1&label=%40brightlayer-ui%2Freact-native-template-routing-typescript)
4
4
 
5
-
6
5
  This template includes the installation and initial setup of routing using [React Navigation](https://reactnavigation.org/). It includes several placeholder routes/screens and a [Drawer](https://brightlayer-ui-components.github.io/react-native/?path=/info/components-documentation--drawer) navigator from the Brightlayer UI [React Native Component Library](https://www.npmjs.com/package/@brightlayer-ui/react-native-components).
7
6
 
8
7
  ## Usage
8
+
9
9
  To create a new project using the Routing Template simply run :
10
+
10
11
  ```sh
11
- npx react-native init MyApp --template @brightlayer-ui/react-native-template-routing-typescript
12
+ npx @react-native-community/cli@latest init MyApp --template @brightlayer-ui/react-native-template-routing-typescript
12
13
  ```
13
14
 
14
15
  ## Project Structure
16
+
15
17
  Projects created using this template will start out with the following file structure:
16
18
 
17
19
  ```
@@ -21,7 +23,7 @@ Projects created using this template will start out with the following file stru
21
23
  |── App.tsx // app entry point
22
24
  └── src
23
25
  |── /screens // sample application pages
24
- └── /Navigation
26
+ └── /Navigation
25
27
  |── index.tsx // sets up routing
26
28
  └── navigation-drawer.tsx // sets up Drawer
27
29
  ```
@@ -29,6 +31,7 @@ Projects created using this template will start out with the following file stru
29
31
  ## Clear Metro bundler cache (recommended)
30
32
 
31
33
  Run the command into the root of the created project.
34
+
32
35
  ```sh
33
36
  yarn start --reset-cache
34
37
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightlayer-ui/react-native-template-routing-typescript",
3
- "version": "3.0.1-alpha.0",
3
+ "version": "4.0.0",
4
4
  "author": "brightlayer-ui <brightlayer-ui@eaton.com>",
5
5
  "keywords": [
6
6
  "react native",
@@ -11,7 +11,7 @@
11
11
  "description": "A template with pre-configured routing for React Native projects created with the React Native CLI.",
12
12
  "repository": {
13
13
  "type": "git",
14
- "url": "https://github.com/etn-ccis/blui-react-native-cli-templates.git"
14
+ "url": "https://github.com/etn-ccis/blui-react-native/tree/master/packages/cli-templates"
15
15
  },
16
16
  "scripts": {
17
17
  "publish:package": "set npm_config_yes=true && npx -p @brightlayer-ui/publish blui-publish",
@@ -1,7 +1,5 @@
1
1
  module.exports = {
2
2
  arrowParens: 'avoid',
3
- bracketSameLine: true,
4
- bracketSpacing: false,
5
3
  singleQuote: true,
6
4
  trailingComma: 'all',
7
5
  };
package/template/Gemfile CHANGED
@@ -3,7 +3,14 @@ source 'https://rubygems.org'
3
3
  # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
4
4
  ruby ">= 2.6.10"
5
5
 
6
- # Cocoapods 1.15 introduced a bug which break the build. We will remove the upper
7
- # bound in the template on Cocoapods with next React Native release.
8
- gem 'cocoapods', '>= 1.13', '< 1.15'
9
- gem 'activesupport', '>= 6.1.7.5', '< 7.1.0'
6
+ # Exclude problematic versions of cocoapods and activesupport that causes build failures.
7
+ gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'
8
+ gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
9
+ gem 'xcodeproj', '< 1.26.0'
10
+ gem 'concurrent-ruby', '< 1.3.4'
11
+
12
+ # Ruby 3.4.0 has removed some libraries from the standard library.
13
+ gem 'bigdecimal'
14
+ gem 'logger'
15
+ gem 'benchmark'
16
+ gem 'mutex_m'
@@ -8,14 +8,14 @@ apply plugin: "com.facebook.react"
8
8
  */
9
9
  react {
10
10
  /* Folders */
11
- // The root of your project, i.e. where "package.json" lives. Default is '..'
12
- // root = file("../")
13
- // The folder where the react-native NPM package is. Default is ../node_modules/react-native
14
- // reactNativeDir = file("../node_modules/react-native")
15
- // The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen
16
- // codegenDir = file("../node_modules/@react-native/codegen")
17
- // The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
18
- // cliFile = file("../node_modules/react-native/cli.js")
11
+ // The root of your project, i.e. where "package.json" lives. Default is '../..'
12
+ // root = file("../../")
13
+ // The folder where the react-native NPM package is. Default is ../../node_modules/react-native
14
+ // reactNativeDir = file("../../node_modules/react-native")
15
+ // The folder where the react-native Codegen package is. Default is ../../node_modules/@react-native/codegen
16
+ // codegenDir = file("../../node_modules/@react-native/codegen")
17
+ // The cli.js file which is the React Native CLI entrypoint. Default is ../../node_modules/react-native/cli.js
18
+ // cliFile = file("../../node_modules/react-native/cli.js")
19
19
 
20
20
  /* Variants */
21
21
  // The list of variants to that are debuggable. For those we're going to
@@ -49,6 +49,9 @@ react {
49
49
  //
50
50
  // The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
51
51
  // hermesFlags = ["-O", "-output-source-map"]
52
+
53
+ /* Autolinking */
54
+ autolinkLibrariesWithApp()
52
55
  }
53
56
 
54
57
  /**
@@ -60,14 +63,14 @@ def enableProguardInReleaseBuilds = false
60
63
  * The preferred build flavor of JavaScriptCore (JSC)
61
64
  *
62
65
  * For example, to use the international variant, you can use:
63
- * `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
66
+ * `def jscFlavor = io.github.react-native-community:jsc-android-intl:2026004.+`
64
67
  *
65
68
  * The international variant includes ICU i18n library and necessary data
66
69
  * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
67
70
  * give correct results when using with locales other than en-US. Note that
68
71
  * this variant is about 6MiB larger per architecture than default.
69
72
  */
70
- def jscFlavor = 'org.webkit:android-jsc:+'
73
+ def jscFlavor = 'io.github.react-native-community:jsc-android:2026004.+'
71
74
 
72
75
  android {
73
76
  ndkVersion rootProject.ext.ndkVersion
@@ -115,6 +118,4 @@ dependencies {
115
118
  }
116
119
  }
117
120
 
118
- apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
119
121
  apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
120
- apply from: "../../node_modules/@brightlayer-ui/react-native-vector-icons/fonts.gradle"
@@ -8,7 +8,8 @@
8
8
  android:icon="@mipmap/ic_launcher"
9
9
  android:roundIcon="@mipmap/ic_launcher_round"
10
10
  android:allowBackup="false"
11
- android:theme="@style/AppTheme">
11
+ android:theme="@style/AppTheme"
12
+ android:supportsRtl="true">
12
13
  <activity
13
14
  android:name=".MainActivity"
14
15
  android:label="@string/app_name"
@@ -4,12 +4,11 @@ import android.app.Application
4
4
  import com.facebook.react.PackageList
5
5
  import com.facebook.react.ReactApplication
6
6
  import com.facebook.react.ReactHost
7
+ import com.facebook.react.ReactNativeApplicationEntryPoint.loadReactNative
7
8
  import com.facebook.react.ReactNativeHost
8
9
  import com.facebook.react.ReactPackage
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.soloader.SoLoader
13
12
 
14
13
  class MainApplication : Application(), ReactApplication {
15
14
 
@@ -34,10 +33,6 @@ class MainApplication : Application(), ReactApplication {
34
33
 
35
34
  override fun onCreate() {
36
35
  super.onCreate()
37
- SoLoader.init(this, false)
38
- if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
39
- // If you opted-in for the New Architecture, we load the native entry point for this app.
40
- load()
41
- }
36
+ loadReactNative(this)
42
37
  }
43
38
  }
@@ -1,11 +1,11 @@
1
1
  buildscript {
2
2
  ext {
3
- buildToolsVersion = "34.0.0"
4
- minSdkVersion = 23
5
- compileSdkVersion = 34
6
- targetSdkVersion = 34
7
- ndkVersion = "26.1.10909125"
8
- kotlinVersion = "1.9.22"
3
+ buildToolsVersion = "35.0.0"
4
+ minSdkVersion = 24
5
+ compileSdkVersion = 35
6
+ targetSdkVersion = 35
7
+ ndkVersion = "27.1.12297006"
8
+ kotlinVersion = "2.1.20"
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.6-all.zip
3
+ distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-bin.zip
4
4
  networkTimeout=10000
5
5
  validateDistributionUrl=true
6
6
  zipStoreBase=GRADLE_USER_HOME
@@ -21,8 +21,6 @@ org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m
21
21
  # Android operating system, and which are packaged with your app's APK
22
22
  # https://developer.android.com/topic/libraries/support-library/androidx-rn
23
23
  android.useAndroidX=true
24
- # Automatically convert third-party libraries to use AndroidX
25
- android.enableJetifier=true
26
24
 
27
25
  # Use this property to specify which architecture you want to build.
28
26
  # You can also override it from the CLI using
@@ -34,7 +32,7 @@ reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
34
32
  # your application. You should enable this flag either if you want
35
33
  # to write custom TurboModules/Fabric components OR use libraries that
36
34
  # are providing them.
37
- newArchEnabled=false
35
+ newArchEnabled=true
38
36
 
39
37
  # Use this property to enable or disable the Hermes JS engine.
40
38
  # If set to false, you will be using JSC instead.
@@ -15,6 +15,8 @@
15
15
  # See the License for the specific language governing permissions and
16
16
  # limitations under the License.
17
17
  #
18
+ # SPDX-License-Identifier: Apache-2.0
19
+ #
18
20
 
19
21
  ##############################################################################
20
22
  #
@@ -55,7 +57,7 @@
55
57
  # Darwin, MinGW, and NonStop.
56
58
  #
57
59
  # (3) This script is generated from the Groovy template
58
- # https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
60
+ # https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
59
61
  # within the Gradle project.
60
62
  #
61
63
  # You can find Gradle at https://github.com/gradle/gradle/.
@@ -84,7 +86,7 @@ done
84
86
  # shellcheck disable=SC2034
85
87
  APP_BASE_NAME=${0##*/}
86
88
  # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
87
- APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
89
+ APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
88
90
 
89
91
  # Use the maximum available, or set MAX_FD != -1 to use that value.
90
92
  MAX_FD=maximum
@@ -112,7 +114,7 @@ case "$( uname )" in #(
112
114
  NONSTOP* ) nonstop=true ;;
113
115
  esac
114
116
 
115
- CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
117
+ CLASSPATH="\\\"\\\""
116
118
 
117
119
 
118
120
  # Determine the Java command to use to start the JVM.
@@ -203,7 +205,7 @@ fi
203
205
  DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
204
206
 
205
207
  # Collect all arguments for the java command:
206
- # * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
208
+ # * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
207
209
  # and any embedded shellness will be escaped.
208
210
  # * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
209
211
  # treated as '${Hostname}' itself on the command line.
@@ -211,7 +213,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
211
213
  set -- \
212
214
  "-Dorg.gradle.appname=$APP_BASE_NAME" \
213
215
  -classpath "$CLASSPATH" \
214
- org.gradle.wrapper.GradleWrapperMain \
216
+ -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
215
217
  "$@"
216
218
 
217
219
  # Stop when "xargs" is not available.
@@ -1,3 +1,8 @@
1
+ @REM Copyright (c) Meta Platforms, Inc. and affiliates.
2
+ @REM
3
+ @REM This source code is licensed under the MIT license found in the
4
+ @REM LICENSE file in the root directory of this source tree.
5
+
1
6
  @rem
2
7
  @rem Copyright 2015 the original author or authors.
3
8
  @rem
@@ -13,6 +18,8 @@
13
18
  @rem See the License for the specific language governing permissions and
14
19
  @rem limitations under the License.
15
20
  @rem
21
+ @rem SPDX-License-Identifier: Apache-2.0
22
+ @rem
16
23
 
17
24
  @if "%DEBUG%"=="" @echo off
18
25
  @rem ##########################################################################
@@ -68,11 +75,11 @@ goto fail
68
75
  :execute
69
76
  @rem Setup the command line
70
77
 
71
- set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
78
+ set CLASSPATH=
72
79
 
73
80
 
74
81
  @rem Execute Gradle
75
- "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
82
+ "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
76
83
 
77
84
  :end
78
85
  @rem End local scope for the variables with windows NT shell
@@ -1,4 +1,6 @@
1
+ pluginManagement { includeBuild("../node_modules/@react-native/gradle-plugin") }
2
+ plugins { id("com.facebook.react.settings") }
3
+ extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() }
1
4
  rootProject.name = 'blankTemplate'
2
- apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
3
5
  include ':app'
4
6
  includeBuild('../node_modules/@react-native/gradle-plugin')
@@ -23,11 +23,6 @@ target 'blankTemplate' do
23
23
  :app_path => "#{Pod::Config.instance.installation_root}/.."
24
24
  )
25
25
 
26
- target 'blankTemplateTests' do
27
- inherit! :complete
28
- # Pods for testing
29
- end
30
-
31
26
  post_install do |installer|
32
27
  # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
33
28
  react_native_post_install(