Skip to content

Commit 9033c51

Browse files
Merge pull request #365 from velocitycareerlabs/VL-8870-upgrade-rn-to-v0.81.4
chore: react-native v0.81.4; vcl v2.8.1
2 parents 1419c13 + df7b71e commit 9033c51

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+6439
-6366
lines changed

.eslintrc.js

Lines changed: 29 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -6,86 +6,79 @@ module.exports = {
66
'airbnb/hooks',
77
'airbnb-typescript',
88
'prettier',
9-
"plugin:@typescript-eslint/recommended"
9+
'plugin:@typescript-eslint/recommended',
1010
],
1111
parser: '@typescript-eslint/parser',
1212
parserOptions: {
13-
project: './tsconfig.json'
13+
project: './tsconfig.json',
1414
},
1515
plugins: [
1616
'@typescript-eslint',
1717
'prettier',
1818
'prefer-arrow',
1919
'autofix',
20-
'unused-imports'
20+
'unused-imports',
2121
],
2222
settings: {
2323
'import/resolver': {
2424
node: {
2525
extensions: ['.js', '.jsx', '.ts', '.tsx'],
26-
paths: ['./']
27-
}
28-
}
26+
paths: ['./'],
27+
},
28+
},
2929
},
3030
env: {
31-
es6: true
31+
es6: true,
3232
},
3333
rules: {
34-
"no-console": "off",
35-
"@typescript-eslint/lines-between-class-members": "off",
36-
"@typescript-eslint/no-explicit-any": "off",
37-
"@typescript-eslint/no-useless-constructor": "off",
38-
"@typescript-eslint/no-throw-literal": "off",
34+
'no-console': 'off',
35+
'@typescript-eslint/lines-between-class-members': 'off',
36+
'@typescript-eslint/no-explicit-any': 'off',
37+
'@typescript-eslint/no-useless-constructor': 'off',
38+
'@typescript-eslint/no-throw-literal': 'off',
3939
'unused-imports/no-unused-vars-ts': [
4040
'warn',
4141
{
4242
vars: 'all',
4343
varsIgnorePattern: '^_',
4444
args: 'after-used',
45-
argsIgnorePattern: '^_'
46-
}
45+
argsIgnorePattern: '^_',
46+
},
4747
],
4848
'autofix/no-debugger': 'error',
4949
'prefer-destructuring': [
5050
'error',
5151
{
5252
array: false,
53-
object: true
53+
object: true,
5454
},
5555
{
56-
enforceForRenamedProperties: false
57-
}
56+
enforceForRenamedProperties: false,
57+
},
5858
],
5959
'prefer-arrow/prefer-arrow-functions': [
60-
"warn",
60+
'warn',
6161
{
62-
"disallowPrototype": true,
63-
"singleReturnOnly": false,
64-
"classPropertiesAllowed": false
65-
}
62+
disallowPrototype: true,
63+
singleReturnOnly: false,
64+
classPropertiesAllowed: false,
65+
},
6666
],
6767
'import/prefer-default-export': 0,
6868
'react/jsx-props-no-spreading': 0,
6969
'@typescript-eslint/no-use-before-define': [
7070
'error',
71-
{ variables: false, classes: true, functions: true }
71+
{ variables: false, classes: true, functions: true },
7272
],
7373
'no-param-reassign': 0,
74-
'no-underscore-dangle': [
75-
'error',
76-
{ allowAfterThis: true, allow: ['_id'] }
77-
],
78-
quotes: [2, 'single', { avoidEscape: true }],
74+
'no-underscore-dangle': ['error', { allowAfterThis: true, allow: ['_id'] }],
75+
'quotes': [2, 'single', { avoidEscape: true }],
7976
'no-use-before-define': 0,
8077
'import/no-extraneous-dependencies': [
8178
'error',
8279
{
83-
devDependencies: [
84-
'storybook/**',
85-
'storybook/**/**/**',
86-
'stories/**'
87-
]
88-
}
80+
devDependencies: ['storybook/**', 'storybook/**/**/**', 'stories/**'],
81+
},
8982
],
9083
'global-require': 0,
9184
'react/require-default-props': 'off',
@@ -98,6 +91,6 @@ module.exports = {
9891
'no-promise-executor-return': 'off',
9992
'@typescript-eslint/default-param-last': 'off',
10093
'@typescript-eslint/naming-convention': 'off',
101-
'@typescript-eslint/return-await': 'off'
102-
}
94+
'@typescript-eslint/return-await': 'off',
95+
},
10396
};

.github/workflows/react-native-sdk.tests.workflow.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ env:
1313
RC_SUFFIX: 'rc'
1414
jobs:
1515
test-react-sdk:
16-
runs-on: macos-15
16+
runs-on: macos-26
1717
steps:
1818
# Git clone repository
1919
- name: Git clone repository
@@ -25,15 +25,15 @@ jobs:
2525
node-version: ${{ env.NODE_VERSION }}
2626
# Install dependencies
2727
- name: Install dependencies
28-
run: corepack enable && yarn set version 3.6.1 && yarn
28+
run: corepack enable && yarn set version 3.6.1 && yarn install --frozen-lockfile
2929
# Check licenses
30-
- name: Check licenses
31-
run: corepack enable && yarn set version 1.22.22 && yarn check-licenses
30+
# - name: Check licenses
31+
# run: corepack enable && yarn set version 1.22.22 && yarn check-licenses
3232
# Run lint
3333
- name: Run lint
3434
run: corepack enable && yarn set version 3.6.1 && yarn lint
3535
continue-on-error: false
3636
# Run test
3737
- name: Run Test
38-
run: corepack enable && yarn set version 3.6.1 && yarn test
38+
run: yarn test
3939
continue-on-error: true

.github/workflows/react-native-sdk.workflow.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ env:
2424
GLOBAL_ENV: ${{ github.event_name == 'push' && format('{0}', 'dev') || inputs.environment }}
2525
jobs:
2626
build-react-native-sdk:
27-
runs-on: macos-15
27+
runs-on: macos-26
2828
steps:
2929
- name: Git clone repository
3030
uses: actions/checkout@v4
@@ -46,7 +46,7 @@ jobs:
4646
run: git add .npmrc && git commit -am "Prepare to release"
4747
# Install dependencies
4848
- name: Install dependencies
49-
run: corepack enable && yarn set version 3.6.1 && yarn
49+
run: corepack enable && yarn set version 3.6.1 && yarn install --frozen-lockfile
5050
# Build and Publish SDK
5151
- name: Build and Publish SDK
5252
if: ${{ env.GLOBAL_ENV == 'prod' || env.GLOBAL_ENV == 'rc' }}

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ example/android/app/src/main/assets/index.android.bundle
8484
example/ios/.xcode.env
8585
.pnp.loader.mjs
8686
.pnp.cjs
87-
.yarn/*
88-
example/ios/.xcode.env
8987
example/ios/.xcode.env.local
9088
/example/android/.idea
9189
/android/.idea
92-
/example/android/.idea
90+
example/android/java_pid80455.hprof
91+
/.yarn/cache
92+
/example/android/app/.cxx

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v20
1+
v22

.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

Lines changed: 541 additions & 0 deletions
Large diffs are not rendered by default.

.yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

Lines changed: 28 additions & 0 deletions
Large diffs are not rendered by default.

.yarn/releases/yarn-3.6.1.cjs

Lines changed: 874 additions & 0 deletions
Large diffs are not rendered by default.

.yarnrc.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1+
nodeLinker: node-modules
12
nmHoistingLimits: workspaces
23

3-
nodeLinker: node-modules
4+
plugins:
5+
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
6+
spec: "@yarnpkg/plugin-interactive-tools"
7+
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
8+
spec: "@yarnpkg/plugin-workspace-tools"
49

10+
yarnPath: .yarn/releases/yarn-3.6.1.cjs

CONTRIBUTING.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,23 @@ This project is a monorepo managed using [Yarn workspaces](https://yarnpkg.com/f
1111
- The library package in the root directory.
1212
- An example app in the `example/` directory.
1313

14-
To get started with the project, run `yarn` in the root directory to install the required dependencies for each package:
14+
To get started with the project, make sure you have the correct version of [Node.js](https://nodejs.org/) installed. See the [`.nvmrc`](./.nvmrc) file for the version used in this project.
15+
16+
Run `yarn` in the root directory to install the required dependencies for each package:
1517

1618
```sh
1719
yarn
1820
```
1921

20-
> Since the project relies on Yarn workspaces, you cannot use [`npm`](https://github.com/npm/cli) for development.
22+
> Since the project relies on Yarn workspaces, you cannot use [`npm`](https://github.com/npm/cli) for development without manually migrating.
2123
2224
The [example app](/example/) demonstrates usage of the library. You need to run it to test any changes you make.
2325

2426
It is configured to use the local version of the library, so any changes you make to the library's source code will be reflected in the example app. Changes to the library's JavaScript code will be reflected in the example app without a rebuild, but native code changes will require a rebuild of the example app.
2527

26-
If you want to use Android Studio or XCode to edit the native code, you can open the `example/android` or `example/ios` directories respectively in those editors. To edit the Objective-C or Swift files, open `example/ios/VclReactNativeExample.xcworkspace` in XCode and find the source files at `Pods > Development Pods > @velocitycareerlabs/vcl-react-native`.
28+
If you want to use Android Studio or Xcode to edit the native code, you can open the `example/android` or `example/ios` directories respectively in those editors. To edit the Objective-C or Swift files, open `example/ios/VclReactNativeExample.xcworkspace` in Xcode and find the source files at `Pods > Development Pods > @velocitycareerlabs/vcl-react-native`.
2729

28-
To edit the Java or Kotlin files, open `example/android` in Android studio and find the source files at `@velocitycareerlabs/vcl-react-native` under `Android`.
30+
To edit the Java or Kotlin files, open `example/android` in Android studio and find the source files at `velocitycareerlabs-vcl-react-native` under `Android`.
2931

3032
You can use various commands from the root directory to work with the project.
3133

@@ -47,6 +49,14 @@ To run the example app on iOS:
4749
yarn example ios
4850
```
4951

52+
To confirm that the app is running with the new architecture, you can check the Metro logs for a message like this:
53+
54+
```sh
55+
Running "VclReactNativeExample" with {"fabric":true,"initialProps":{"concurrentRoot":true},"rootTag":1}
56+
```
57+
58+
Note the `"fabric":true` and `"concurrentRoot":true` properties.
59+
5060
Make sure your code passes TypeScript and ESLint. Run the following to verify:
5161

5262
```sh
@@ -73,7 +83,7 @@ We follow the [conventional commits specification](https://www.conventionalcommi
7383
- `fix`: bug fixes, e.g. fix crash due to deprecated method.
7484
- `feat`: new features, e.g. add new method to the module.
7585
- `refactor`: code refactor, e.g. migrate from class components to hooks.
76-
- `docs`: changes into documentation, e.g. add usage example for the module..
86+
- `docs`: changes into documentation, e.g. add usage example for the module.
7787
- `test`: adding or updating tests, e.g. add integration tests using detox.
7888
- `chore`: tooling changes, e.g. change CI config.
7989

0 commit comments

Comments
 (0)