Skip to content
Open
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 0 additions & 3 deletions .editorconfig

This file was deleted.

46 changes: 0 additions & 46 deletions .eslintignore

This file was deleted.

28 changes: 3 additions & 25 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,5 @@
module.exports = {
env: {
node: true,
jest: true,
},
extends: 'eslint:recommended',
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
},
parser: '@babel/eslint-parser',
parserOptions: {
requireConfigFile: false,
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2018,
sourceType: 'module',
},
plugins: ['react'],
ignorePatterns: ['!.*', 'dist', 'node_modules'],
rules: {
'react/jsx-uses-react': 2,
'react/jsx-uses-vars': 2,
'react/react-in-jsx-scope': 2,
},
root: true,
extends: ['universe/native', 'universe/web'],
ignorePatterns: ['build'],
};
99 changes: 99 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL Advanced"

on:
push:
branches: [ "master", "develop-v13" ]
pull_request:
branches: [ "master", "develop-v13" ]
schedule:
- cron: '24 7 * * 5'

jobs:
analyze:
name: Analyze (${{ matrix.language }})
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners (GitHub.com only)
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
runs-on: ubuntu-latest
permissions:
# required for all workflows
security-events: write

# required to fetch internal or private CodeQL packs
packages: read

# only required for workflows in private repositories
actions: read
contents: read

strategy:
fail-fast: false
matrix:
include:
- language: javascript-typescript
build-mode: none
# CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'rust', 'swift'
# Use `c-cpp` to analyze code written in C, C++ or both
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Checkout repository
uses: actions/checkout@v4

# Add any setup steps before running the `github/codeql-action/init` action.
# This includes steps like installing compilers or runtimes (`actions/setup-node`
# or others). This is typically only required for manual builds.
# - name: Setup runtime (example)
# uses: actions/setup-example@v1

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality

# If the analyze step fails for one of the languages you are analyzing with
# "We were unable to automatically build your code", modify the matrix above
# to set the build mode to "manual" for that language. Then modify this step
# to build your code.
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
- name: Run manual build steps
if: matrix.build-mode == 'manual'
shell: bash
run: |
echo 'If you are using a "manual" build mode for one or more of the' \
'languages you are analyzing, replace this with the commands to build' \
'your code, for example:'
echo ' make bootstrap'
echo ' make release'
exit 1

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
with:
category: "/language:${{matrix.language}}"
116 changes: 106 additions & 10 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
name: Pull Request into Develop
name: Test and Coverage Check
permissions:
contents: read
pull-requests: write

on:
# Triggers the workflow on a pull request pointed at develop.
pull_request:
branches:
- "develop"

- "master"
- "develop-v13"

# Allows you to run this workflow manually from the Actions tab.
workflow_dispatch:

Expand All @@ -15,19 +18,112 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Use Node.js 19
uses: actions/setup-node@v3
- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: 19
node-version: 22
cache: "npm"

- name: Install Node modules
run: npm ci
env:
NPM_CONFIG_REGISTRY: https://registry.npmjs.org/

- name: Linting
run: npm run lint

- name: Unit & Integration tests
run: npm test
- name: Unit & Integration tests with coverage
run: npm test -- --coverage --no-watch --passWithNoTests
env:
NPM_CONFIG_REGISTRY: https://registry.npmjs.org/

- name: Upload coverage artifacts
uses: actions/upload-artifact@v4
if: always()
with:
name: coverage-report
path: coverage/
retention-days: 30

- name: Generate coverage summary
if: always()
run: |
echo "## Test Coverage Report" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
if [ -f coverage/coverage-summary.json ]; then
echo "\`\`\`json" >> $GITHUB_STEP_SUMMARY
cat coverage/coverage-summary.json >> $GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
else
echo "No coverage summary available" >> $GITHUB_STEP_SUMMARY
fi

- name: Comment coverage on PR
uses: romeovs/lcov-reporter-action@v0.3.1
if: github.event_name == 'pull_request'
with:
lcov-file: ./coverage/lcov.info
github-token: ${{ secrets.GITHUB_TOKEN }}
delete-old-comments: true

build-ios-example:
runs-on: macos-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: 22
cache: "npm"

- name: Install root dependencies
run: npm install
env:
NPM_CONFIG_REGISTRY: https://registry.npmjs.org/

- name: Install example dependencies
working-directory: example
run: npm install
env:
NPM_CONFIG_REGISTRY: https://registry.npmjs.org/

- name: Cache CocoaPods
uses: actions/cache@v4
with:
path: |
~/Library/Caches/CocoaPods
example/ios/Pods
key: ${{ runner.os }}-pods-${{ hashFiles('example/ios/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-

- name: Generate iOS project with Expo
working-directory: example
run: npx expo prebuild --platform ios --clean
env:
NPM_CONFIG_REGISTRY: https://registry.npmjs.org/

- name: Build iOS app for Simulator
working-directory: example
run: |
xcodebuild -workspace ios/reactnativeplaidlinksdkexample.xcworkspace \
-scheme reactnativeplaidlinksdkexample \
-sdk iphonesimulator \
-configuration Release \
-destination 'platform=iOS Simulator,name=iPhone 16,OS=latest' \
clean build \
CODE_SIGNING_ALLOWED=NO \
| tee xcodebuild.log

- name: Upload build logs
uses: actions/upload-artifact@v4
if: failure()
with:
name: ios-build-logs
path: example/xcodebuild.log
retention-days: 7
Comment thread Fixed
56 changes: 30 additions & 26 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@

# OSX
#
.DS_Store

# node.js
#
node_modules/
npm-debug.log
yarn-error.log
# VSCode
.vscode/
jsconfig.json

# Xcode
#
Expand All @@ -28,31 +25,38 @@ DerivedData
*.ipa
*.xcuserstate
project.xcworkspace


# Android/IntelliJ
# Android/IJ
#
build/
.idea
.classpath
.cxx
.gradle
.idea
.project
.settings
local.properties
*.iml
*.hprof
android/build/
android.iml
android/app/libs
android/keystores/debug.keystore

# BUCK
buck-out/
\.buckd/
*.keystore
# Cocoapods
#
example/ios/Pods

# React Native ts
dist/
# Ruby
example/vendor/

.vscode
example/android/build/
example/.yalc
example/yalc.lock
# node.js
#
node_modules/
npm-debug.log
yarn-debug.log
yarn-error.log

# Testing
#
coverage/

exampleReactNative76/android/build/
exampleReactNative76/.yalc
exampleReactNative76/yalc.lock
# Expo
.expo/*
dist/
Loading
Loading