Skip to content
Merged
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
65 changes: 29 additions & 36 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,86 +6,79 @@ module.exports = {
'airbnb/hooks',
'airbnb-typescript',
'prettier',
"plugin:@typescript-eslint/recommended"
'plugin:@typescript-eslint/recommended',
],
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json'
project: './tsconfig.json',
},
plugins: [
'@typescript-eslint',
'prettier',
'prefer-arrow',
'autofix',
'unused-imports'
'unused-imports',
],
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
paths: ['./']
}
}
paths: ['./'],
},
},
},
env: {
es6: true
es6: true,
},
rules: {
"no-console": "off",
"@typescript-eslint/lines-between-class-members": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-useless-constructor": "off",
"@typescript-eslint/no-throw-literal": "off",
'no-console': 'off',
'@typescript-eslint/lines-between-class-members': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-useless-constructor': 'off',
'@typescript-eslint/no-throw-literal': 'off',
'unused-imports/no-unused-vars-ts': [
'warn',
{
vars: 'all',
varsIgnorePattern: '^_',
args: 'after-used',
argsIgnorePattern: '^_'
}
argsIgnorePattern: '^_',
},
],
'autofix/no-debugger': 'error',
'prefer-destructuring': [
'error',
{
array: false,
object: true
object: true,
},
{
enforceForRenamedProperties: false
}
enforceForRenamedProperties: false,
},
],
'prefer-arrow/prefer-arrow-functions': [
"warn",
'warn',
{
"disallowPrototype": true,
"singleReturnOnly": false,
"classPropertiesAllowed": false
}
disallowPrototype: true,
singleReturnOnly: false,
classPropertiesAllowed: false,
},
],
'import/prefer-default-export': 0,
'react/jsx-props-no-spreading': 0,
'@typescript-eslint/no-use-before-define': [
'error',
{ variables: false, classes: true, functions: true }
{ variables: false, classes: true, functions: true },
],
'no-param-reassign': 0,
'no-underscore-dangle': [
'error',
{ allowAfterThis: true, allow: ['_id'] }
],
quotes: [2, 'single', { avoidEscape: true }],
'no-underscore-dangle': ['error', { allowAfterThis: true, allow: ['_id'] }],
'quotes': [2, 'single', { avoidEscape: true }],
'no-use-before-define': 0,
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: [
'storybook/**',
'storybook/**/**/**',
'stories/**'
]
}
devDependencies: ['storybook/**', 'storybook/**/**/**', 'stories/**'],
},
],
'global-require': 0,
'react/require-default-props': 'off',
Expand All @@ -98,6 +91,6 @@ module.exports = {
'no-promise-executor-return': 'off',
'@typescript-eslint/default-param-last': 'off',
'@typescript-eslint/naming-convention': 'off',
'@typescript-eslint/return-await': 'off'
}
'@typescript-eslint/return-await': 'off',
},
};
10 changes: 5 additions & 5 deletions .github/workflows/react-native-sdk.tests.workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ env:
RC_SUFFIX: 'rc'
jobs:
test-react-sdk:
runs-on: macos-15
runs-on: macos-26
steps:
# Git clone repository
- name: Git clone repository
Expand All @@ -25,15 +25,15 @@ jobs:
node-version: ${{ env.NODE_VERSION }}
# Install dependencies
- name: Install dependencies
run: corepack enable && yarn set version 3.6.1 && yarn
run: corepack enable && yarn set version 3.6.1 && yarn install --frozen-lockfile
# Check licenses
- name: Check licenses
run: corepack enable && yarn set version 1.22.22 && yarn check-licenses
# - name: Check licenses
# run: corepack enable && yarn set version 1.22.22 && yarn check-licenses
# Run lint
- name: Run lint
run: corepack enable && yarn set version 3.6.1 && yarn lint
continue-on-error: false
# Run test
- name: Run Test
run: corepack enable && yarn set version 3.6.1 && yarn test
run: yarn test
continue-on-error: true
4 changes: 2 additions & 2 deletions .github/workflows/react-native-sdk.workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ env:
GLOBAL_ENV: ${{ github.event_name == 'push' && format('{0}', 'dev') || inputs.environment }}
jobs:
build-react-native-sdk:
runs-on: macos-15
runs-on: macos-26
steps:
- name: Git clone repository
uses: actions/checkout@v4
Expand All @@ -46,7 +46,7 @@ jobs:
run: git add .npmrc && git commit -am "Prepare to release"
# Install dependencies
- name: Install dependencies
run: corepack enable && yarn set version 3.6.1 && yarn
run: corepack enable && yarn set version 3.6.1 && yarn install --frozen-lockfile
# Build and Publish SDK
- name: Build and Publish SDK
if: ${{ env.GLOBAL_ENV == 'prod' || env.GLOBAL_ENV == 'rc' }}
Expand Down
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ example/android/app/src/main/assets/index.android.bundle
example/ios/.xcode.env
.pnp.loader.mjs
.pnp.cjs
.yarn/*
example/ios/.xcode.env
example/ios/.xcode.env.local
/example/android/.idea
/android/.idea
/example/android/.idea
example/android/java_pid80455.hprof
/.yarn/cache
/example/android/app/.cxx
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v20
v22
541 changes: 541 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

Large diffs are not rendered by default.

874 changes: 874 additions & 0 deletions .yarn/releases/yarn-3.6.1.cjs

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
nodeLinker: node-modules
nmHoistingLimits: workspaces

nodeLinker: node-modules
plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: "@yarnpkg/plugin-workspace-tools"

yarnPath: .yarn/releases/yarn-3.6.1.cjs
20 changes: 15 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,23 @@ This project is a monorepo managed using [Yarn workspaces](https://yarnpkg.com/f
- The library package in the root directory.
- An example app in the `example/` directory.

To get started with the project, run `yarn` in the root directory to install the required dependencies for each package:
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.

Run `yarn` in the root directory to install the required dependencies for each package:

```sh
yarn
```

> Since the project relies on Yarn workspaces, you cannot use [`npm`](https://github.com/npm/cli) for development.
> Since the project relies on Yarn workspaces, you cannot use [`npm`](https://github.com/npm/cli) for development without manually migrating.

The [example app](/example/) demonstrates usage of the library. You need to run it to test any changes you make.

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.

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`.
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`.

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`.
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`.

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

Expand All @@ -47,6 +49,14 @@ To run the example app on iOS:
yarn example ios
```

To confirm that the app is running with the new architecture, you can check the Metro logs for a message like this:

```sh
Running "VclReactNativeExample" with {"fabric":true,"initialProps":{"concurrentRoot":true},"rootTag":1}
```

Note the `"fabric":true` and `"concurrentRoot":true` properties.

Make sure your code passes TypeScript and ESLint. Run the following to verify:

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ require "json"
package = JSON.parse(File.read(File.join(__dir__, "package.json")))

Pod::Spec.new do |s|
s.name = "velocitycareerlabs-vcl-react-native"
s.name = "VclReactNative"
s.version = package["version"]
s.summary = package["description"]
s.homepage = package["homepage"]
Expand All @@ -13,15 +13,12 @@ Pod::Spec.new do |s|
s.platforms = { :ios => min_ios_version_supported }
s.source = { :git => "https://github.com/velocitycareerlabs/vcl-react-native.git", :tag => "#{s.version}" }

s.source_files = "ios/**/*.{h,m,mm,swift}"
s.source_files = "ios/**/*.{h,m,mm,cpp,swift}"
s.private_header_files = "ios/**/*.h"

s.dependency "VCL", "2.7.7"
s.swift_version = "5.0"

s.dependency "VCL", "2.8.1"

# Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
# See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
if respond_to?(:install_modules_dependencies, true)
install_modules_dependencies(s)
else
s.dependency "React-Core"
end
end
Loading