mirror of
https://github.com/selfxyz/self.git
synced 2026-02-19 02:24:25 -05:00
Bump Babel, TypeScript, React Native and assorted dependencies; refresh lockfile (#1606)
* Update dependency versions * Fix gesture handler Android dependency (#1611) * Patch screens codegen type (#1609) * Downgrade Sentry React Native (#1612) * fix patches and packages * downgrade versions for gesture handler and screens * agent feedback * fix ios building * allow ios tets to pass * formatting * make cache more resilient * Address CodeRabbitAI review comments This commit addresses all 7 unresolved CodeRabbitAI comments on PR #1606: Patch-package error handling (comments #1, #2, #3): - stderr capture already implemented in both root and workspace patch runs - Add CI warning when patches fail silently instead of exiting with 0 - Log completion status in CI mode for visibility Critical Mixpanel dependency fix (comment #5): - Add explicit Mixpanel-swift pod declaration to fix E2E build failures - Ensures Mixpanel is available even when NFCPassportReader is skipped during E2E testing React-native-web validation (comment #4): - Verified no usage of deprecated findNodeHandle, pointerEvents: 'box-none', or createPortal - Safe to upgrade from 0.19 to 0.21.2 CI workflow improvements (comments #6, #7): - Create cache-sdk-build composite action for consistent SDK build artifact caching - Replace all direct actions/cache@v4 usage with cache-yarn composite action - Replace all direct actions/cache/restore@v4 and save@v4 with cache-sdk-build - Add nested require() validation step before tests to fail fast on problematic patterns All changes follow repository coding guidelines for CI caching and test memory optimization. * Extend cache composite actions to all SDK workflows This commit extends the caching standardization from PR #1606 to include mobile-sdk-ci.yml and core-sdk-ci.yml workflows. New composite actions created: - cache-mobile-sdk-build: For mobile SDK build artifacts - cache-core-sdk-build: For core SDK build artifacts Workflow updates: - mobile-sdk-ci.yml: Replaced 5 instances of direct actions/cache with cache-mobile-sdk-build - core-sdk-ci.yml: Replaced 4 instances of direct actions/cache with cache-core-sdk-build All SDK CI workflows now use consistent caching patterns via composite actions, following the AGENTS.md guideline: "Use shared composite actions from .github/actions for CI caching instead of calling actions/cache directly." Benefits: - Consistent caching across all SDK workflows (qrcode, mobile, core) - Centralized cache configuration - easier to maintain - Follows established patterns from qrcode-sdk-ci.yml * downgrade react-native-svg * update pod lock file * sort
This commit is contained in:
47
.github/actions/cache-core-sdk-build/action.yml
vendored
Normal file
47
.github/actions/cache-core-sdk-build/action.yml
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
name: Cache Core SDK Build
|
||||
description: Cache core SDK build artifacts (common, sdk/core)
|
||||
|
||||
inputs:
|
||||
mode:
|
||||
description: "save or restore"
|
||||
required: true
|
||||
cache-version:
|
||||
description: Cache version string
|
||||
required: false
|
||||
default: v1
|
||||
fail-on-cache-miss:
|
||||
description: Fail if cache not found (restore mode only)
|
||||
required: false
|
||||
default: "false"
|
||||
|
||||
outputs:
|
||||
cache-hit:
|
||||
description: Whether cache was hit
|
||||
value: ${{ steps.restore.outputs.cache-hit }}
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- id: restore
|
||||
if: inputs.mode == 'restore'
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: |
|
||||
common/dist
|
||||
sdk/core/dist
|
||||
node_modules
|
||||
sdk/core/node_modules
|
||||
common/node_modules
|
||||
key: core-sdk-build-${{ inputs.cache-version }}-${{ github.sha }}
|
||||
fail-on-cache-miss: ${{ inputs.fail-on-cache-miss }}
|
||||
- id: save
|
||||
if: inputs.mode == 'save'
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: |
|
||||
common/dist
|
||||
sdk/core/dist
|
||||
node_modules
|
||||
sdk/core/node_modules
|
||||
common/node_modules
|
||||
key: core-sdk-build-${{ inputs.cache-version }}-${{ github.sha }}
|
||||
47
.github/actions/cache-mobile-sdk-build/action.yml
vendored
Normal file
47
.github/actions/cache-mobile-sdk-build/action.yml
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
name: Cache Mobile SDK Build
|
||||
description: Cache mobile SDK build artifacts (common, mobile-sdk-alpha)
|
||||
|
||||
inputs:
|
||||
mode:
|
||||
description: "save or restore"
|
||||
required: true
|
||||
cache-version:
|
||||
description: Cache version string
|
||||
required: false
|
||||
default: v1
|
||||
fail-on-cache-miss:
|
||||
description: Fail if cache not found (restore mode only)
|
||||
required: false
|
||||
default: "false"
|
||||
|
||||
outputs:
|
||||
cache-hit:
|
||||
description: Whether cache was hit
|
||||
value: ${{ steps.restore.outputs.cache-hit }}
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- id: restore
|
||||
if: inputs.mode == 'restore'
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: |
|
||||
common/dist
|
||||
packages/mobile-sdk-alpha/dist
|
||||
node_modules
|
||||
packages/mobile-sdk-alpha/node_modules
|
||||
common/node_modules
|
||||
key: mobile-sdk-alpha-build-${{ inputs.cache-version }}-${{ github.sha }}
|
||||
fail-on-cache-miss: ${{ inputs.fail-on-cache-miss }}
|
||||
- id: save
|
||||
if: inputs.mode == 'save'
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: |
|
||||
common/dist
|
||||
packages/mobile-sdk-alpha/dist
|
||||
node_modules
|
||||
packages/mobile-sdk-alpha/node_modules
|
||||
common/node_modules
|
||||
key: mobile-sdk-alpha-build-${{ inputs.cache-version }}-${{ github.sha }}
|
||||
43
.github/actions/cache-sdk-build/action.yml
vendored
Normal file
43
.github/actions/cache-sdk-build/action.yml
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
name: Cache SDK Build
|
||||
description: Cache SDK build artifacts (common, sdk-common, qrcode)
|
||||
|
||||
inputs:
|
||||
mode:
|
||||
description: "save or restore"
|
||||
required: true
|
||||
cache-version:
|
||||
description: Cache version string
|
||||
required: false
|
||||
default: v1
|
||||
fail-on-cache-miss:
|
||||
description: Fail if cache not found (restore mode only)
|
||||
required: false
|
||||
default: "false"
|
||||
|
||||
outputs:
|
||||
cache-hit:
|
||||
description: Whether cache was hit
|
||||
value: ${{ steps.restore.outputs.cache-hit }}
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- id: restore
|
||||
if: inputs.mode == 'restore'
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: |
|
||||
common/dist
|
||||
sdk/sdk-common/dist
|
||||
sdk/qrcode/dist
|
||||
key: qrcode-sdk-build-${{ inputs.cache-version }}-${{ github.sha }}
|
||||
fail-on-cache-miss: ${{ inputs.fail-on-cache-miss }}
|
||||
- id: save
|
||||
if: inputs.mode == 'save'
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: |
|
||||
common/dist
|
||||
sdk/sdk-common/dist
|
||||
sdk/qrcode/dist
|
||||
key: qrcode-sdk-build-${{ inputs.cache-version }}-${{ github.sha }}
|
||||
65
.github/workflows/core-sdk-ci.yml
vendored
65
.github/workflows/core-sdk-ci.yml
vendored
@@ -22,15 +22,10 @@ jobs:
|
||||
yarn workspace @selfxyz/common build
|
||||
yarn workspace @selfxyz/core build
|
||||
- name: Cache build artifacts
|
||||
uses: actions/cache/save@v4
|
||||
uses: ./.github/actions/cache-core-sdk-build
|
||||
with:
|
||||
path: |
|
||||
common/dist
|
||||
sdk/core/dist
|
||||
node_modules
|
||||
sdk/core/node_modules
|
||||
common/node_modules
|
||||
key: core-sdk-build-${{ github.sha }}
|
||||
mode: save
|
||||
cache-version: v1
|
||||
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -45,19 +40,19 @@ jobs:
|
||||
corepack prepare yarn@4.12.0 --activate
|
||||
- name: Restore build artifacts
|
||||
id: build-cache
|
||||
uses: actions/cache/restore@v4
|
||||
uses: ./.github/actions/cache-core-sdk-build
|
||||
with:
|
||||
path: |
|
||||
common/dist
|
||||
sdk/core/dist
|
||||
node_modules
|
||||
sdk/core/node_modules
|
||||
common/node_modules
|
||||
key: core-sdk-build-${{ github.sha }}
|
||||
fail-on-cache-miss: true
|
||||
mode: restore
|
||||
cache-version: v1
|
||||
fail-on-cache-miss: false
|
||||
- name: Install Dependencies
|
||||
if: steps.build-cache.outputs.cache-hit != 'true'
|
||||
uses: ./.github/actions/yarn-install
|
||||
- name: Build dependencies (fallback on cache miss)
|
||||
if: steps.build-cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
yarn workspace @selfxyz/common build
|
||||
yarn workspace @selfxyz/core build
|
||||
- name: Run linter
|
||||
run: yarn workspace @selfxyz/core lint
|
||||
|
||||
@@ -74,19 +69,19 @@ jobs:
|
||||
corepack prepare yarn@4.12.0 --activate
|
||||
- name: Restore build artifacts
|
||||
id: build-cache
|
||||
uses: actions/cache/restore@v4
|
||||
uses: ./.github/actions/cache-core-sdk-build
|
||||
with:
|
||||
path: |
|
||||
common/dist
|
||||
sdk/core/dist
|
||||
node_modules
|
||||
sdk/core/node_modules
|
||||
common/node_modules
|
||||
key: core-sdk-build-${{ github.sha }}
|
||||
fail-on-cache-miss: true
|
||||
mode: restore
|
||||
cache-version: v1
|
||||
fail-on-cache-miss: false
|
||||
- name: Install Dependencies
|
||||
if: steps.build-cache.outputs.cache-hit != 'true'
|
||||
uses: ./.github/actions/yarn-install
|
||||
- name: Build dependencies (fallback on cache miss)
|
||||
if: steps.build-cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
yarn workspace @selfxyz/common build
|
||||
yarn workspace @selfxyz/core build
|
||||
- name: Type checking
|
||||
run: yarn workspace @selfxyz/core types
|
||||
|
||||
@@ -103,18 +98,18 @@ jobs:
|
||||
corepack prepare yarn@4.12.0 --activate
|
||||
- name: Restore build artifacts
|
||||
id: build-cache
|
||||
uses: actions/cache/restore@v4
|
||||
uses: ./.github/actions/cache-core-sdk-build
|
||||
with:
|
||||
path: |
|
||||
common/dist
|
||||
sdk/core/dist
|
||||
node_modules
|
||||
sdk/core/node_modules
|
||||
common/node_modules
|
||||
key: core-sdk-build-${{ github.sha }}
|
||||
fail-on-cache-miss: true
|
||||
mode: restore
|
||||
cache-version: v1
|
||||
fail-on-cache-miss: false
|
||||
- name: Install Dependencies
|
||||
if: steps.build-cache.outputs.cache-hit != 'true'
|
||||
uses: ./.github/actions/yarn-install
|
||||
- name: Build dependencies (fallback on cache miss)
|
||||
if: steps.build-cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
yarn workspace @selfxyz/common build
|
||||
yarn workspace @selfxyz/core build
|
||||
- name: Run tests
|
||||
run: yarn workspace @selfxyz/core test
|
||||
|
||||
87
.github/workflows/mobile-sdk-ci.yml
vendored
87
.github/workflows/mobile-sdk-ci.yml
vendored
@@ -21,15 +21,10 @@ jobs:
|
||||
yarn workspace @selfxyz/common build
|
||||
yarn workspace @selfxyz/mobile-sdk-alpha build
|
||||
- name: Cache build artifacts
|
||||
uses: actions/cache/save@v4
|
||||
uses: ./.github/actions/cache-mobile-sdk-build
|
||||
with:
|
||||
path: |
|
||||
common/dist
|
||||
packages/mobile-sdk-alpha/dist
|
||||
node_modules
|
||||
packages/mobile-sdk-alpha/node_modules
|
||||
common/node_modules
|
||||
key: mobile-sdk-alpha-build-${{ github.sha }}
|
||||
mode: save
|
||||
cache-version: v1
|
||||
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -39,16 +34,17 @@ jobs:
|
||||
- name: Install Dependencies
|
||||
uses: ./.github/actions/yarn-install
|
||||
- name: Restore build artifacts
|
||||
uses: actions/cache/restore@v4
|
||||
id: restore-build
|
||||
uses: ./.github/actions/cache-mobile-sdk-build
|
||||
with:
|
||||
path: |
|
||||
common/dist
|
||||
packages/mobile-sdk-alpha/dist
|
||||
node_modules
|
||||
packages/mobile-sdk-alpha/node_modules
|
||||
common/node_modules
|
||||
key: mobile-sdk-alpha-build-${{ github.sha }}
|
||||
fail-on-cache-miss: true
|
||||
mode: restore
|
||||
cache-version: v1
|
||||
fail-on-cache-miss: false
|
||||
- name: Build dependencies (fallback on cache miss)
|
||||
if: steps.restore-build.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
yarn workspace @selfxyz/common build
|
||||
yarn workspace @selfxyz/mobile-sdk-alpha build
|
||||
- name: Run linter
|
||||
run: yarn workspace @selfxyz/mobile-sdk-alpha lint
|
||||
|
||||
@@ -60,16 +56,17 @@ jobs:
|
||||
- name: Install Dependencies
|
||||
uses: ./.github/actions/yarn-install
|
||||
- name: Restore build artifacts
|
||||
uses: actions/cache/restore@v4
|
||||
id: restore-build
|
||||
uses: ./.github/actions/cache-mobile-sdk-build
|
||||
with:
|
||||
path: |
|
||||
common/dist
|
||||
packages/mobile-sdk-alpha/dist
|
||||
node_modules
|
||||
packages/mobile-sdk-alpha/node_modules
|
||||
common/node_modules
|
||||
key: mobile-sdk-alpha-build-${{ github.sha }}
|
||||
fail-on-cache-miss: true
|
||||
mode: restore
|
||||
cache-version: v1
|
||||
fail-on-cache-miss: false
|
||||
- name: Build dependencies (fallback on cache miss)
|
||||
if: steps.restore-build.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
yarn workspace @selfxyz/common build
|
||||
yarn workspace @selfxyz/mobile-sdk-alpha build
|
||||
- name: Check Prettier formatting
|
||||
run: yarn workspace @selfxyz/mobile-sdk-alpha prettier --check .
|
||||
|
||||
@@ -81,16 +78,17 @@ jobs:
|
||||
- name: Install Dependencies
|
||||
uses: ./.github/actions/yarn-install
|
||||
- name: Restore build artifacts
|
||||
uses: actions/cache/restore@v4
|
||||
id: restore-build
|
||||
uses: ./.github/actions/cache-mobile-sdk-build
|
||||
with:
|
||||
path: |
|
||||
common/dist
|
||||
packages/mobile-sdk-alpha/dist
|
||||
node_modules
|
||||
packages/mobile-sdk-alpha/node_modules
|
||||
common/node_modules
|
||||
key: mobile-sdk-alpha-build-${{ github.sha }}
|
||||
fail-on-cache-miss: true
|
||||
mode: restore
|
||||
cache-version: v1
|
||||
fail-on-cache-miss: false
|
||||
- name: Build dependencies (fallback on cache miss)
|
||||
if: steps.restore-build.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
yarn workspace @selfxyz/common build
|
||||
yarn workspace @selfxyz/mobile-sdk-alpha build
|
||||
- name: Type checking
|
||||
run: yarn workspace @selfxyz/mobile-sdk-alpha types
|
||||
|
||||
@@ -102,15 +100,16 @@ jobs:
|
||||
- name: Install Dependencies
|
||||
uses: ./.github/actions/yarn-install
|
||||
- name: Restore build artifacts
|
||||
uses: actions/cache/restore@v4
|
||||
id: restore-build
|
||||
uses: ./.github/actions/cache-mobile-sdk-build
|
||||
with:
|
||||
path: |
|
||||
common/dist
|
||||
packages/mobile-sdk-alpha/dist
|
||||
node_modules
|
||||
packages/mobile-sdk-alpha/node_modules
|
||||
common/node_modules
|
||||
key: mobile-sdk-alpha-build-${{ github.sha }}
|
||||
fail-on-cache-miss: true
|
||||
mode: restore
|
||||
cache-version: v1
|
||||
fail-on-cache-miss: false
|
||||
- name: Build dependencies (fallback on cache miss)
|
||||
if: steps.restore-build.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
yarn workspace @selfxyz/common build
|
||||
yarn workspace @selfxyz/mobile-sdk-alpha build
|
||||
- name: Run tests
|
||||
run: yarn workspace @selfxyz/mobile-sdk-alpha test
|
||||
|
||||
99
.github/workflows/qrcode-sdk-ci.yml
vendored
99
.github/workflows/qrcode-sdk-ci.yml
vendored
@@ -50,16 +50,14 @@ jobs:
|
||||
|
||||
- name: Cache Yarn dependencies
|
||||
id: yarn-cache
|
||||
uses: actions/cache@v4
|
||||
uses: ./.github/actions/cache-yarn
|
||||
with:
|
||||
path: |
|
||||
.yarn/cache
|
||||
node_modules
|
||||
sdk/qrcode/node_modules
|
||||
common/node_modules
|
||||
key: ${{ runner.os }}-${{ env.GH_YARN_CACHE_VERSION }}-node-${{ env.NODE_VERSION_SANITIZED }}-yarn-${{ hashFiles('yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-${{ env.GH_YARN_CACHE_VERSION }}-node-${{ env.NODE_VERSION_SANITIZED }}-yarn-
|
||||
cache-version: ${{ env.GH_YARN_CACHE_VERSION }}-node-${{ env.NODE_VERSION_SANITIZED }}
|
||||
|
||||
- name: Install Dependencies
|
||||
uses: ./.github/actions/yarn-install
|
||||
@@ -72,13 +70,10 @@ jobs:
|
||||
yarn workspace @selfxyz/qrcode build
|
||||
|
||||
- name: Cache build artifacts
|
||||
uses: actions/cache/save@v4
|
||||
uses: ./.github/actions/cache-sdk-build
|
||||
with:
|
||||
path: |
|
||||
common/dist
|
||||
sdk/sdk-common/dist
|
||||
sdk/qrcode/dist
|
||||
key: qrcode-sdk-build-${{ env.GH_SDK_CACHE_VERSION }}-${{ github.sha }}
|
||||
mode: save
|
||||
cache-version: ${{ env.GH_SDK_CACHE_VERSION }}
|
||||
|
||||
# Quality checks job
|
||||
quality-checks:
|
||||
@@ -110,29 +105,32 @@ jobs:
|
||||
|
||||
- name: Cache Yarn dependencies
|
||||
id: yarn-cache
|
||||
uses: actions/cache@v4
|
||||
uses: ./.github/actions/cache-yarn
|
||||
with:
|
||||
path: |
|
||||
.yarn/cache
|
||||
node_modules
|
||||
sdk/qrcode/node_modules
|
||||
common/node_modules
|
||||
key: ${{ runner.os }}-${{ env.GH_YARN_CACHE_VERSION }}-node-${{ env.NODE_VERSION_SANITIZED }}-yarn-${{ hashFiles('yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-${{ env.GH_YARN_CACHE_VERSION }}-node-${{ env.NODE_VERSION_SANITIZED }}-yarn-
|
||||
cache-version: ${{ env.GH_YARN_CACHE_VERSION }}-node-${{ env.NODE_VERSION_SANITIZED }}
|
||||
|
||||
- name: Install Dependencies
|
||||
uses: ./.github/actions/yarn-install
|
||||
|
||||
- name: Restore build artifacts
|
||||
uses: actions/cache/restore@v4
|
||||
id: restore-build
|
||||
uses: ./.github/actions/cache-sdk-build
|
||||
with:
|
||||
path: |
|
||||
common/dist
|
||||
sdk/sdk-common/dist
|
||||
sdk/qrcode/dist
|
||||
key: qrcode-sdk-build-${{ env.GH_SDK_CACHE_VERSION }}-${{ github.sha }}
|
||||
fail-on-cache-miss: true
|
||||
mode: restore
|
||||
cache-version: ${{ env.GH_SDK_CACHE_VERSION }}
|
||||
fail-on-cache-miss: false
|
||||
|
||||
- name: Build dependencies (fallback on cache miss)
|
||||
if: steps.restore-build.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
yarn workspace @selfxyz/common build
|
||||
yarn workspace @selfxyz/sdk-common build
|
||||
yarn workspace @selfxyz/qrcode build
|
||||
|
||||
- name: Run linter
|
||||
run: yarn workspace @selfxyz/qrcode lint:imports:check
|
||||
@@ -178,29 +176,32 @@ jobs:
|
||||
|
||||
- name: Cache Yarn dependencies
|
||||
id: yarn-cache
|
||||
uses: actions/cache@v4
|
||||
uses: ./.github/actions/cache-yarn
|
||||
with:
|
||||
path: |
|
||||
.yarn/cache
|
||||
node_modules
|
||||
sdk/qrcode/node_modules
|
||||
common/node_modules
|
||||
key: ${{ runner.os }}-${{ env.GH_YARN_CACHE_VERSION }}-node-${{ env.NODE_VERSION_SANITIZED }}-yarn-${{ hashFiles('yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-${{ env.GH_YARN_CACHE_VERSION }}-node-${{ env.NODE_VERSION_SANITIZED }}-yarn-
|
||||
cache-version: ${{ env.GH_YARN_CACHE_VERSION }}-node-${{ env.NODE_VERSION_SANITIZED }}
|
||||
|
||||
- name: Install Dependencies
|
||||
uses: ./.github/actions/yarn-install
|
||||
|
||||
- name: Restore build artifacts
|
||||
uses: actions/cache/restore@v4
|
||||
id: restore-build
|
||||
uses: ./.github/actions/cache-sdk-build
|
||||
with:
|
||||
path: |
|
||||
common/dist
|
||||
sdk/sdk-common/dist
|
||||
sdk/qrcode/dist
|
||||
key: qrcode-sdk-build-${{ env.GH_SDK_CACHE_VERSION }}-${{ github.sha }}
|
||||
fail-on-cache-miss: true
|
||||
mode: restore
|
||||
cache-version: ${{ env.GH_SDK_CACHE_VERSION }}
|
||||
fail-on-cache-miss: false
|
||||
|
||||
- name: Build dependencies (fallback on cache miss)
|
||||
if: steps.restore-build.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
yarn workspace @selfxyz/common build
|
||||
yarn workspace @selfxyz/sdk-common build
|
||||
yarn workspace @selfxyz/qrcode build
|
||||
|
||||
- name: Verify build artifacts
|
||||
run: |
|
||||
@@ -240,29 +241,41 @@ jobs:
|
||||
|
||||
- name: Cache Yarn dependencies
|
||||
id: yarn-cache
|
||||
uses: actions/cache@v4
|
||||
uses: ./.github/actions/cache-yarn
|
||||
with:
|
||||
path: |
|
||||
.yarn/cache
|
||||
node_modules
|
||||
sdk/qrcode/node_modules
|
||||
common/node_modules
|
||||
key: ${{ runner.os }}-${{ env.GH_YARN_CACHE_VERSION }}-node-${{ env.NODE_VERSION_SANITIZED }}-yarn-${{ hashFiles('yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-${{ env.GH_YARN_CACHE_VERSION }}-node-${{ env.NODE_VERSION_SANITIZED }}-yarn-
|
||||
cache-version: ${{ env.GH_YARN_CACHE_VERSION }}-node-${{ env.NODE_VERSION_SANITIZED }}
|
||||
|
||||
- name: Install Dependencies
|
||||
uses: ./.github/actions/yarn-install
|
||||
|
||||
- name: Restore build artifacts
|
||||
uses: actions/cache/restore@v4
|
||||
id: restore-build
|
||||
uses: ./.github/actions/cache-sdk-build
|
||||
with:
|
||||
path: |
|
||||
common/dist
|
||||
sdk/sdk-common/dist
|
||||
sdk/qrcode/dist
|
||||
key: qrcode-sdk-build-${{ env.GH_SDK_CACHE_VERSION }}-${{ github.sha }}
|
||||
fail-on-cache-miss: true
|
||||
mode: restore
|
||||
cache-version: ${{ env.GH_SDK_CACHE_VERSION }}
|
||||
fail-on-cache-miss: false
|
||||
|
||||
- name: Build dependencies (fallback on cache miss)
|
||||
if: steps.restore-build.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
yarn workspace @selfxyz/common build
|
||||
yarn workspace @selfxyz/sdk-common build
|
||||
yarn workspace @selfxyz/qrcode build
|
||||
|
||||
- name: Check for nested require() in tests
|
||||
run: |
|
||||
# Check SDK tests for nested require patterns that cause OOM
|
||||
if grep -rE "require\(['\"]react(-native)?['\"])" sdk/qrcode/src/ sdk/qrcode/tests/ 2>/dev/null; then
|
||||
echo "❌ Found nested require() patterns that cause OOM in CI"
|
||||
exit 1
|
||||
fi
|
||||
echo "✅ No nested require() patterns found"
|
||||
|
||||
- name: Run tests
|
||||
run: yarn workspace @selfxyz/qrcode test
|
||||
|
||||
@@ -11,9 +11,9 @@ import Foundation
|
||||
import React
|
||||
#if !E2E_TESTING
|
||||
import NFCPassportReader
|
||||
import Mixpanel
|
||||
#endif
|
||||
import Security
|
||||
import Mixpanel
|
||||
import Sentry
|
||||
|
||||
#if !E2E_TESTING
|
||||
|
||||
@@ -53,8 +53,6 @@ end
|
||||
target "Self" do
|
||||
# Native module exclusion for E2E testing is handled in react-native.config.cjs
|
||||
config = use_native_modules!
|
||||
|
||||
use_frameworks!
|
||||
# Skip NFCPassportReader for e2e testing to avoid build issues
|
||||
unless ENV["E2E_TESTING"] == "1"
|
||||
# Check if we're running in a selfxyz repo or an external fork
|
||||
@@ -79,10 +77,13 @@ target "Self" do
|
||||
pod "NFCPassportReader", git: nfc_repo_url, commit: "9eff7c4e3a9037fdc1e03301584e0d5dcf14d76b"
|
||||
end
|
||||
|
||||
# Explicitly declare Mixpanel to ensure it's available even in E2E builds
|
||||
# (NFCPassportReader also includes Mixpanel, but is skipped during E2E testing)
|
||||
pod "Mixpanel-swift", :modular_headers => true
|
||||
|
||||
pod "QKMRZScanner"
|
||||
pod "lottie-ios"
|
||||
pod "SwiftQRScanner", :git => "https://github.com/vinodiOS/SwiftQRScanner"
|
||||
pod "Mixpanel-swift", "~> 5.0.0"
|
||||
# RNReactNativeHapticFeedback is handled by autolinking
|
||||
|
||||
use_react_native!(
|
||||
|
||||
@@ -1558,7 +1558,7 @@ PODS:
|
||||
- React-Core
|
||||
- react-native-netinfo (11.4.1):
|
||||
- React-Core
|
||||
- react-native-nfc-manager (3.16.3):
|
||||
- react-native-nfc-manager (3.17.2):
|
||||
- React-Core
|
||||
- react-native-passkey (3.3.1):
|
||||
- DoubleConversion
|
||||
@@ -1984,7 +1984,7 @@ PODS:
|
||||
- ReactCommon/turbomodule/bridging
|
||||
- ReactCommon/turbomodule/core
|
||||
- Yoga
|
||||
- RNDeviceInfo (14.1.1):
|
||||
- RNDeviceInfo (15.0.1):
|
||||
- React-Core
|
||||
- RNFBApp (19.3.0):
|
||||
- Firebase/CoreOnly (= 10.24.0)
|
||||
@@ -2042,7 +2042,7 @@ PODS:
|
||||
- ReactCommon/turbomodule/bridging
|
||||
- ReactCommon/turbomodule/core
|
||||
- Yoga
|
||||
- RNLocalize (3.6.0):
|
||||
- RNLocalize (3.6.1):
|
||||
- DoubleConversion
|
||||
- glog
|
||||
- hermes-engine
|
||||
@@ -2129,7 +2129,7 @@ PODS:
|
||||
- ReactCommon/turbomodule/bridging
|
||||
- ReactCommon/turbomodule/core
|
||||
- Yoga
|
||||
- RNSentry (7.0.1):
|
||||
- RNSentry (7.0.0):
|
||||
- DoubleConversion
|
||||
- glog
|
||||
- hermes-engine
|
||||
@@ -2152,7 +2152,7 @@ PODS:
|
||||
- ReactCommon/turbomodule/core
|
||||
- Sentry/HybridSDK (= 8.53.2)
|
||||
- Yoga
|
||||
- RNSVG (15.15.0):
|
||||
- RNSVG (15.12.1):
|
||||
- DoubleConversion
|
||||
- glog
|
||||
- hermes-engine
|
||||
@@ -2172,9 +2172,9 @@ PODS:
|
||||
- ReactCodegen
|
||||
- ReactCommon/turbomodule/bridging
|
||||
- ReactCommon/turbomodule/core
|
||||
- RNSVG/common (= 15.15.0)
|
||||
- RNSVG/common (= 15.12.1)
|
||||
- Yoga
|
||||
- RNSVG/common (15.15.0):
|
||||
- RNSVG/common (15.12.1):
|
||||
- DoubleConversion
|
||||
- glog
|
||||
- hermes-engine
|
||||
@@ -2223,7 +2223,7 @@ DEPENDENCIES:
|
||||
- hermes-engine (from `../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`)
|
||||
- lottie-ios
|
||||
- lottie-react-native (from `../node_modules/lottie-react-native`)
|
||||
- Mixpanel-swift (~> 5.0.0)
|
||||
- Mixpanel-swift
|
||||
- "NFCPassportReader (from `git@github.com:selfxyz/NFCPassportReader.git`, commit `9eff7c4e3a9037fdc1e03301584e0d5dcf14d76b`)"
|
||||
- QKMRZScanner
|
||||
- RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`)
|
||||
@@ -2626,7 +2626,7 @@ SPEC CHECKSUMS:
|
||||
react-native-get-random-values: d16467cf726c618e9c7a8c3c39c31faa2244bbba
|
||||
react-native-mobilesdk-module: 4770cb45fdd19dc4eed04615f0fcdab013b3dfe2
|
||||
react-native-netinfo: cec9c4e86083cb5b6aba0e0711f563e2fbbff187
|
||||
react-native-nfc-manager: 66a00e5ddab9704efebe19d605b1b8afb0bb1bd7
|
||||
react-native-nfc-manager: c8891e460b4943b695d63f7f4effc6345bbefc83
|
||||
react-native-passkey: 8853c3c635164864da68a6dbbcec7148506c3bcf
|
||||
react-native-safe-area-context: a7aad44fe544b55e2369a3086e16a01be60ce398
|
||||
react-native-sqlite-storage: 0c84826214baaa498796c7e46a5ccc9a82e114ed
|
||||
@@ -2660,18 +2660,18 @@ SPEC CHECKSUMS:
|
||||
ReactCommon: b2eb96a61b826ff327a773a74357b302cf6da678
|
||||
RNCAsyncStorage: 0003b916f1a69fe2d20b7910e0d08da3d32c7bd6
|
||||
RNCClipboard: a4827e134e4774e97fa86f7f986694dd89320f13
|
||||
RNDeviceInfo: bcce8752b5043a623fe3c26789679b473f705d3c
|
||||
RNDeviceInfo: 36d7f232bfe7c9b5c494cb7793230424ed32c388
|
||||
RNFBApp: 4097f75673f8b42a7cd1ba17e6ea85a94b45e4d1
|
||||
RNFBMessaging: 92325b0d5619ac90ef023a23cfd16fd3b91d0a88
|
||||
RNFBRemoteConfig: a569bacaa410acfcaba769370e53a787f80fd13b
|
||||
RNGestureHandler: a63b531307e5b2e6ea21d053a1a7ad4cf9695c57
|
||||
RNInAppBrowser: 6d3eb68d471b9834335c664704719b8be1bfdb20
|
||||
RNKeychain: 471ceef8c13f15a5534c3cd2674dbbd9d0680e52
|
||||
RNLocalize: 4f5e4a46d2bccd04ccb96721e438dcb9de17c2e0
|
||||
RNLocalize: 2760999d1e2fc95fb7b7e5247631feb3c08156dc
|
||||
RNReactNativeHapticFeedback: e526ac4a7ca9fb23c7843ea4fd7d823166054c73
|
||||
RNScreens: 806e1449a8ec63c2a4e4cf8a63cc80203ccda9b8
|
||||
RNSentry: 6ad982be2c8e32dab912afb4132b6a0d88484ea0
|
||||
RNSVG: 39476f26bbbe72ffe6194c6fc8f6acd588087957
|
||||
RNSentry: f79dd124cc49088445c16d23955860dd0d1db6f3
|
||||
RNSVG: 0c1fc3e7b147949dc15644845e9124947ac8c9bb
|
||||
segment-analytics-react-native: 0eae155b0e9fa560fa6b17d78941df64537c35b7
|
||||
Sentry: 59993bffde4a1ac297ba6d268dc4bbce068d7c1b
|
||||
SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748
|
||||
@@ -2681,6 +2681,6 @@ SPEC CHECKSUMS:
|
||||
TwilioVideo: 9f51085d4e4fb3aff8e168b8215b31cb0f486a2f
|
||||
Yoga: 1259c7a8cbaccf7b4c3ddf8ee36ca11be9dee407
|
||||
|
||||
PODFILE CHECKSUM: f03c12b5d96fb6e22afe20fba517840fef44e76f
|
||||
PODFILE CHECKSUM: 8cfd84595c3e826f512f5c545d232a27f1850ff3
|
||||
|
||||
COCOAPODS: 1.16.2
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// SPDX-License-Identifier: BUSL-1.1; Copyright (c) 2025 Social Connect Labs, Inc.; Licensed under BUSL-1.1 (see LICENSE); Apache-2.0 from 2029-06-11
|
||||
|
||||
import Foundation
|
||||
import Mixpanel
|
||||
|
||||
#if !E2E_TESTING
|
||||
import Mixpanel
|
||||
import NFCPassportReader
|
||||
|
||||
public class SelfAnalytics: Analytics {
|
||||
|
||||
@@ -85,13 +85,13 @@
|
||||
"react-native-webview": "13.16.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.28.3",
|
||||
"@ethersproject/shims": "^5.7.0",
|
||||
"@babel/runtime": "^7.28.6",
|
||||
"@ethersproject/shims": "^5.8.0",
|
||||
"@noble/hashes": "^1.5.0",
|
||||
"@openpassport/zk-kit-imt": "^0.0.5",
|
||||
"@openpassport/zk-kit-lean-imt": "^0.0.6",
|
||||
"@openpassport/zk-kit-smt": "^0.0.1",
|
||||
"@peculiar/x509": "^1.13.0",
|
||||
"@peculiar/x509": "^1.14.3",
|
||||
"@react-native-async-storage/async-storage": "^2.2.0",
|
||||
"@react-native-clipboard/clipboard": "1.16.3",
|
||||
"@react-native-community/blur": "^4.4.1",
|
||||
@@ -108,7 +108,7 @@
|
||||
"@selfxyz/euclid": "^0.6.1",
|
||||
"@selfxyz/mobile-sdk-alpha": "workspace:^",
|
||||
"@sentry/react": "^9.32.0",
|
||||
"@sentry/react-native": "7.0.1",
|
||||
"@sentry/react-native": "7.0.0",
|
||||
"@stablelib/cbor": "^2.0.1",
|
||||
"@sumsub/react-native-mobilesdk-module": "1.40.2",
|
||||
"@tamagui/animations-css": "1.126.14",
|
||||
@@ -122,7 +122,7 @@
|
||||
"@turnkey/react-native-wallet-kit": "1.1.5",
|
||||
"@walletconnect/react-native-compat": "^2.23.0",
|
||||
"@xstate/react": "^5.0.3",
|
||||
"asn1js": "^3.0.6",
|
||||
"asn1js": "^3.0.7",
|
||||
"axios": "^1.13.2",
|
||||
"buffer": "^6.0.3",
|
||||
"country-emoji": "^1.5.6",
|
||||
@@ -136,8 +136,8 @@
|
||||
"js-sha512": "^0.9.0",
|
||||
"lottie-react": "^2.4.1",
|
||||
"lottie-react-native": "7.2.2",
|
||||
"node-forge": "^1.3.1",
|
||||
"pkijs": "^3.2.5",
|
||||
"node-forge": "^1.3.3",
|
||||
"pkijs": "^3.3.3",
|
||||
"poseidon-lite": "^0.2.0",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
@@ -147,7 +147,7 @@
|
||||
"react-native-blur-effect": "^1.1.3",
|
||||
"react-native-check-version": "^1.3.0",
|
||||
"react-native-cloud-storage": "^2.2.2",
|
||||
"react-native-device-info": "^14.0.4",
|
||||
"react-native-device-info": "^15.0.1",
|
||||
"react-native-dotenv": "^3.4.11",
|
||||
"react-native-edge-to-edge": "^1.7.0",
|
||||
"react-native-gesture-handler": "2.19.0",
|
||||
@@ -156,18 +156,18 @@
|
||||
"react-native-inappbrowser-reborn": "^3.7.0",
|
||||
"react-native-keychain": "^10.0.0",
|
||||
"react-native-linear-gradient": "^2.8.3",
|
||||
"react-native-localize": "^3.5.2",
|
||||
"react-native-logs": "^5.3.0",
|
||||
"react-native-nfc-manager": "3.16.3",
|
||||
"react-native-passkey": "^3.3.1",
|
||||
"react-native-localize": "^3.6.1",
|
||||
"react-native-logs": "^5.5.0",
|
||||
"react-native-nfc-manager": "3.17.2",
|
||||
"react-native-passkey": "^3.3.2",
|
||||
"react-native-passport-reader": "1.0.3",
|
||||
"react-native-safe-area-context": "^5.6.1",
|
||||
"react-native-safe-area-context": "^5.6.2",
|
||||
"react-native-screens": "4.15.3",
|
||||
"react-native-sqlite-storage": "^6.0.1",
|
||||
"react-native-svg": "15.15.0",
|
||||
"react-native-svg": "15.12.1",
|
||||
"react-native-svg-web": "1.0.9",
|
||||
"react-native-url-polyfill": "^3.0.0",
|
||||
"react-native-web": "^0.19.0",
|
||||
"react-native-web": "^0.21.2",
|
||||
"react-native-webview": "^13.16.0",
|
||||
"react-qr-barcode-scanner": "^2.1.8",
|
||||
"socket.io-client": "^4.8.3",
|
||||
@@ -177,14 +177,14 @@
|
||||
"zustand": "^4.5.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.28.3",
|
||||
"@babel/plugin-syntax-flow": "^7.27.1",
|
||||
"@babel/plugin-transform-classes": "^7.27.1",
|
||||
"@babel/core": "^7.28.6",
|
||||
"@babel/plugin-syntax-flow": "^7.28.6",
|
||||
"@babel/plugin-transform-classes": "^7.28.6",
|
||||
"@babel/plugin-transform-export-namespace-from": "^7.27.1",
|
||||
"@babel/plugin-transform-flow-strip-types": "^7.27.1",
|
||||
"@babel/plugin-transform-private-methods": "^7.27.1",
|
||||
"@babel/preset-env": "^7.28.3",
|
||||
"@babel/preset-react": "^7.27.1",
|
||||
"@babel/plugin-transform-private-methods": "^7.28.6",
|
||||
"@babel/preset-env": "^7.28.6",
|
||||
"@babel/preset-react": "^7.28.5",
|
||||
"@react-native-community/cli": "^16.0.3",
|
||||
"@react-native/babel-preset": "0.76.9",
|
||||
"@react-native/eslint-config": "0.76.9",
|
||||
@@ -210,11 +210,11 @@
|
||||
"@types/react-test-renderer": "^18",
|
||||
"@typescript-eslint/eslint-plugin": "^8.39.0",
|
||||
"@typescript-eslint/parser": "^8.39.0",
|
||||
"@vitejs/plugin-react-swc": "^3.10.2",
|
||||
"@vitejs/plugin-react-swc": "^4.2.2",
|
||||
"babel-plugin-module-resolver": "^5.0.2",
|
||||
"babel-plugin-transform-remove-console": "^6.9.4",
|
||||
"constants-browserify": "^1.0.0",
|
||||
"dompurify": "^3.2.6",
|
||||
"dompurify": "^3.3.1",
|
||||
"eslint": "^8.57.0",
|
||||
"eslint-config-prettier": "10.1.8",
|
||||
"eslint-import-resolver-typescript": "^3.7.0",
|
||||
@@ -229,14 +229,15 @@
|
||||
"jest": "^30.2.0",
|
||||
"path-browserify": "^1.0.1",
|
||||
"prettier": "^3.5.3",
|
||||
"react-native-svg-transformer": "^1.5.1",
|
||||
"prop-types": "^15.8.1",
|
||||
"react-native-svg-transformer": "^1.5.2",
|
||||
"react-test-renderer": "^18.3.1",
|
||||
"rollup-plugin-visualizer": "^6.0.3",
|
||||
"rollup-plugin-visualizer": "^6.0.5",
|
||||
"stream-browserify": "^3.0.0",
|
||||
"ts-morph": "^22.0.0",
|
||||
"ts-node": "^10.9.2",
|
||||
"typescript": "^5.9.2",
|
||||
"vite": "^7.0.0",
|
||||
"typescript": "^5.9.3",
|
||||
"vite": "^7.3.1",
|
||||
"vite-plugin-svgr": "^4.5.0"
|
||||
},
|
||||
"packageManager": "yarn@4.12.0",
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
"test-custom-hasher": "yarn test-base 'tests/other_circuits/custom_hasher.test.ts' --exit",
|
||||
"test-disclose": "yarn test-base 'tests/disclose/vc_and_disclose.test.ts' --exit",
|
||||
"test-disclose-aadhaar": "yarn test-base 'tests/disclose/vc_and_disclose_aadhaar.test.ts' --exit",
|
||||
"test-disclose-kyc": "yarn test-base 'tests/disclose/vc_and_disclose_kyc.test.ts' --exit",
|
||||
"test-disclose-id": "yarn test-base 'tests/disclose/vc_and_disclose_id.test.ts' --exit",
|
||||
"test-disclose-kyc": "yarn test-base 'tests/disclose/vc_and_disclose_kyc.test.ts' --exit",
|
||||
"test-dsc": "yarn test-base --max-old-space-size=51200 'tests/dsc/dsc.test.ts' --exit",
|
||||
"test-ecdsa": "yarn test-base 'tests/utils/ecdsa.test.ts' --exit",
|
||||
"test-gcp-jwt-verifier": "yarn test-base 'tests/gcp_jwt_verifier/gcp_jwt_verifier.test.ts' --exit",
|
||||
@@ -35,8 +35,8 @@
|
||||
"test-qr-extractor": "yarn test-base 'tests/other_circuits/qrdata_extractor.test.ts' --exit",
|
||||
"test-register": "yarn test-base --max-old-space-size=40960 'tests/register/register.test.ts' --exit",
|
||||
"test-register-aadhaar": "yarn test-base 'tests/register/register_aadhaar.test.ts' --exit",
|
||||
"test-register-kyc": "yarn test-base 'tests/register/register_kyc.test.ts' --exit",
|
||||
"test-register-id": "yarn test-base --max-old-space-size=40960 'tests/register_id/register_id.test.ts' --exit",
|
||||
"test-register-kyc": "yarn test-base 'tests/register/register_kyc.test.ts' --exit",
|
||||
"test-rsa": "yarn test-base 'tests/utils/rsaPkcs1v1_5.test.ts' --exit",
|
||||
"test-rsa-pss": "yarn test-base 'tests/utils/rsapss.test.ts' --exit"
|
||||
},
|
||||
@@ -77,6 +77,7 @@
|
||||
"snarkjs": "^0.7.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.28.6",
|
||||
"@types/chai": "4.3.11",
|
||||
"@types/chai-as-promised": "^7.1.6",
|
||||
"@types/circomlibjs": "^0.1.6",
|
||||
@@ -85,6 +86,8 @@
|
||||
"@types/node-forge": "^1.3.5",
|
||||
"@yarnpkg/sdks": "^3.2.0",
|
||||
"chai": "^4.4.1",
|
||||
"eslint": "^8.57.0",
|
||||
"eslint-plugin-import": "^2.31.0",
|
||||
"mocha": "^10.7.3",
|
||||
"prettier": "^3.5.3",
|
||||
"ts-mocha": "^10.0.0",
|
||||
|
||||
@@ -685,12 +685,12 @@
|
||||
"@openpassport/zk-kit-imt": "^0.0.5",
|
||||
"@openpassport/zk-kit-lean-imt": "^0.0.6",
|
||||
"@openpassport/zk-kit-smt": "^0.0.1",
|
||||
"@peculiar/x509": "^1.12.3",
|
||||
"@peculiar/x509": "^1.14.3",
|
||||
"@stablelib/cbor": "^2.0.1",
|
||||
"@zk-kit/baby-jubjub": "^1.0.3",
|
||||
"@zk-kit/eddsa-poseidon": "^1.1.0",
|
||||
"asn1.js": "^5.4.1",
|
||||
"asn1js": "^3.0.5",
|
||||
"asn1js": "^3.0.7",
|
||||
"axios": "^1.7.2",
|
||||
"buffer": "^6.0.3",
|
||||
"country-emoji": "^1.5.6",
|
||||
@@ -706,7 +706,7 @@
|
||||
"jsrsasign": "^11.1.0",
|
||||
"node-forge": "github:remicolin/forge#17a11a632dd0e50343b3b8393245a2696f78afbb",
|
||||
"path": "^0.12.7",
|
||||
"pkijs": "^3.2.4",
|
||||
"pkijs": "^3.3.3",
|
||||
"poseidon-lite": "^0.2.0",
|
||||
"snarkjs": "^0.7.5",
|
||||
"typescript-parser": "^2.6.1",
|
||||
@@ -727,7 +727,7 @@
|
||||
"eslint-plugin-sort-exports": "^0.9.1",
|
||||
"prettier": "^3.5.3",
|
||||
"tsup": "^8.5.0",
|
||||
"typescript": "^5.9.2",
|
||||
"typescript": "^5.9.3",
|
||||
"vitest": "^2.1.8"
|
||||
},
|
||||
"packageManager": "yarn@4.12.0",
|
||||
|
||||
@@ -323,9 +323,7 @@ library CustomVerifier {
|
||||
|
||||
if (verificationConfig.forbiddenCountriesEnabled) {
|
||||
for (uint256 i = 0; i < 4; i++) {
|
||||
if (
|
||||
kycOutput.forbiddenCountriesListPacked[i] != verificationConfig.forbiddenCountriesListPacked[i]
|
||||
) {
|
||||
if (kycOutput.forbiddenCountriesListPacked[i] != verificationConfig.forbiddenCountriesListPacked[i]) {
|
||||
revert InvalidForbiddenCountries();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -375,10 +375,7 @@ export async function deploySystemFixturesV2(): Promise<DeployedActorsV2> {
|
||||
|
||||
let registryKycContract, updateKycHubTx;
|
||||
{
|
||||
registryKycContract = await ethers.getContractAt(
|
||||
"IdentityRegistryKycImplV1",
|
||||
identityRegistryKycProxy.target,
|
||||
);
|
||||
registryKycContract = await ethers.getContractAt("IdentityRegistryKycImplV1", identityRegistryKycProxy.target);
|
||||
updateKycHubTx = await registryKycContract.updateHub(identityVerificationHubV2.target);
|
||||
await updateKycHubTx.wait();
|
||||
|
||||
|
||||
@@ -589,12 +589,8 @@ export function getSMTs() {
|
||||
) as typeof SMT;
|
||||
const nameAndDob_id_smt = importSMTFromJsonFile("../circuits/tests/consts/ofac/nameAndDobSMT_ID.json") as typeof SMT;
|
||||
const nameAndYob_id_smt = importSMTFromJsonFile("../circuits/tests/consts/ofac/nameAndYobSMT_ID.json") as typeof SMT;
|
||||
const nameAndDob_kyc_smt = importSMTFromJsonFile(
|
||||
"../circuits/tests/consts/ofac/nameAndDobKycSMT.json",
|
||||
) as typeof SMT;
|
||||
const nameAndYob_kyc_smt = importSMTFromJsonFile(
|
||||
"../circuits/tests/consts/ofac/nameAndYobKycSMT.json",
|
||||
) as typeof SMT;
|
||||
const nameAndDob_kyc_smt = importSMTFromJsonFile("../circuits/tests/consts/ofac/nameAndDobKycSMT.json") as typeof SMT;
|
||||
const nameAndYob_kyc_smt = importSMTFromJsonFile("../circuits/tests/consts/ofac/nameAndYobKycSMT.json") as typeof SMT;
|
||||
|
||||
return {
|
||||
passportNo_smt,
|
||||
|
||||
@@ -145,12 +145,7 @@ describe("KYC Registration test", function () {
|
||||
});
|
||||
|
||||
it("should successfully register an identity commitment", async () => {
|
||||
await deployedActors.registryKyc.registerPubkeyCommitment(
|
||||
mockProof.a,
|
||||
mockProof.b,
|
||||
mockProof.c,
|
||||
mockPubSignals,
|
||||
);
|
||||
await deployedActors.registryKyc.registerPubkeyCommitment(mockProof.a, mockProof.b, mockProof.c, mockPubSignals);
|
||||
|
||||
await expect(deployedActors.hub.registerCommitment(attestationIdBytes32, 0n, registerProof)).to.emit(
|
||||
deployedActors.registryKyc,
|
||||
@@ -168,12 +163,7 @@ describe("KYC Registration test", function () {
|
||||
});
|
||||
|
||||
it("should not register an identity commitment if the proof is invalid", async () => {
|
||||
await deployedActors.registryKyc.registerPubkeyCommitment(
|
||||
mockProof.a,
|
||||
mockProof.b,
|
||||
mockProof.c,
|
||||
mockPubSignals,
|
||||
);
|
||||
await deployedActors.registryKyc.registerPubkeyCommitment(mockProof.a, mockProof.b, mockProof.c, mockPubSignals);
|
||||
|
||||
const invalidRegisterProof = structuredClone(registerProof);
|
||||
invalidRegisterProof.pubSignals[1] = 0n;
|
||||
@@ -434,12 +424,7 @@ describe("KYC Registration test", function () {
|
||||
];
|
||||
|
||||
await expect(
|
||||
deployedActors.registryKyc.registerPubkeyCommitment(
|
||||
mockProof.a,
|
||||
mockProof.b,
|
||||
mockProof.c,
|
||||
mockPubSignals,
|
||||
),
|
||||
deployedActors.registryKyc.registerPubkeyCommitment(mockProof.a, mockProof.b, mockProof.c, mockPubSignals),
|
||||
).to.be.revertedWithCustomError(deployedActors.registryKyc, "INVALID_PROOF");
|
||||
});
|
||||
|
||||
@@ -456,12 +441,7 @@ describe("KYC Registration test", function () {
|
||||
];
|
||||
|
||||
await expect(
|
||||
deployedActors.registryKyc.registerPubkeyCommitment(
|
||||
mockProof.a,
|
||||
mockProof.b,
|
||||
mockProof.c,
|
||||
mockPubSignals,
|
||||
),
|
||||
deployedActors.registryKyc.registerPubkeyCommitment(mockProof.a, mockProof.b, mockProof.c, mockPubSignals),
|
||||
).to.be.revertedWithCustomError(deployedActors.registryKyc, "INVALID_ROOT_CA");
|
||||
});
|
||||
|
||||
@@ -478,12 +458,7 @@ describe("KYC Registration test", function () {
|
||||
];
|
||||
|
||||
await expect(
|
||||
deployedActors.registryKyc.registerPubkeyCommitment(
|
||||
mockProof.a,
|
||||
mockProof.b,
|
||||
mockProof.c,
|
||||
mockPubSignals,
|
||||
),
|
||||
deployedActors.registryKyc.registerPubkeyCommitment(mockProof.a, mockProof.b, mockProof.c, mockPubSignals),
|
||||
).to.be.revertedWithCustomError(deployedActors.registryKyc, "INVALID_IMAGE");
|
||||
});
|
||||
});
|
||||
|
||||
11
package.json
11
package.json
@@ -37,16 +37,17 @@
|
||||
"types": "yarn workspaces foreach --topological-dev --parallel --exclude @selfxyz/contracts --exclude @selfxyz/common --exclude @selfxyz/mobile-app -i --all run types"
|
||||
},
|
||||
"resolutions": {
|
||||
"@babel/core": "^7.28.4",
|
||||
"@babel/runtime": "^7.28.4",
|
||||
"@babel/core": "^7.28.6",
|
||||
"@babel/runtime": "^7.28.6",
|
||||
"@noble/curves": "1.9.7",
|
||||
"@noble/hashes": "1.8.0",
|
||||
"ethereum-cryptography": "3.2.0",
|
||||
"@swc/core": "1.7.36",
|
||||
"@tamagui/animations-react-native": "1.126.14",
|
||||
"@tamagui/toast": "1.126.14",
|
||||
"@types/node": "^22.18.3",
|
||||
"@types/react": "^18.3.4",
|
||||
"@types/react-dom": "^18.3.0",
|
||||
"ethereum-cryptography": "3.2.0",
|
||||
"punycode": "npm:punycode.js@^2.3.1",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
@@ -56,7 +57,7 @@
|
||||
"react-native-webview": "13.16.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.28.3",
|
||||
"@babel/runtime": "^7.28.6",
|
||||
"js-sha1": "^0.7.0",
|
||||
"react": "^18.3.1",
|
||||
"react-native": "0.76.9",
|
||||
@@ -71,7 +72,7 @@
|
||||
"patch-package": "^8.0.0",
|
||||
"prettier": "^3.6.2",
|
||||
"tsx": "^4.21.0",
|
||||
"typescript": "^5.9.2"
|
||||
"typescript": "^5.9.3"
|
||||
},
|
||||
"packageManager": "yarn@4.12.0",
|
||||
"engines": {
|
||||
|
||||
@@ -149,14 +149,14 @@
|
||||
"watch": "pkill -f 'tsup.*--watch' 2>/dev/null || true && tsup && yarn postbuild && tsup --watch"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.28.3",
|
||||
"@babel/runtime": "^7.28.6",
|
||||
"@selfxyz/common": "workspace:^",
|
||||
"@selfxyz/euclid": "^0.6.1",
|
||||
"@xstate/react": "^5.0.5",
|
||||
"node-forge": "^1.3.1",
|
||||
"react-native-nfc-manager": "^3.17.1",
|
||||
"node-forge": "^1.3.3",
|
||||
"react-native-nfc-manager": "^3.17.2",
|
||||
"react-native-svg-circle-country-flags": "^0.2.2",
|
||||
"socket.io-client": "^4.8.1",
|
||||
"socket.io-client": "^4.8.3",
|
||||
"uuid": "^11.1.0",
|
||||
"xstate": "^5.20.2",
|
||||
"zustand": "^4.5.2"
|
||||
@@ -183,11 +183,14 @@
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"react-native": "0.76.9",
|
||||
"react-native-blur-effect": "^1.1.3",
|
||||
"react-native-haptic-feedback": "^2.3.3",
|
||||
"react-native-localize": "^3.5.2",
|
||||
"react-native-web": "^0.21.1",
|
||||
"react-native-localize": "^3.6.1",
|
||||
"react-native-svg": "15.15.1",
|
||||
"react-native-web": "^0.21.2",
|
||||
"react-native-webview": "13.16.0",
|
||||
"tsup": "^8.0.1",
|
||||
"typescript": "^5.9.2",
|
||||
"typescript": "^5.9.3",
|
||||
"vitest": "^2.1.8"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
"types": "yarn prebuild && tsc --noEmit"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.28.3",
|
||||
"@babel/runtime": "^7.28.6",
|
||||
"@faker-js/faker": "^10.0.0",
|
||||
"@noble/hashes": "^1.5.0",
|
||||
"@react-native-async-storage/async-storage": "^2.2.0",
|
||||
@@ -46,16 +46,16 @@
|
||||
"react-native-get-random-values": "^1.11.0",
|
||||
"react-native-haptic-feedback": "^2.3.3",
|
||||
"react-native-keychain": "^10.0.0",
|
||||
"react-native-localize": "^3.5.4",
|
||||
"react-native-safe-area-context": "^5.6.1",
|
||||
"react-native-svg": "15.12.1",
|
||||
"react-native-localize": "^3.6.1",
|
||||
"react-native-safe-area-context": "^5.6.2",
|
||||
"react-native-svg": "15.15.1",
|
||||
"react-native-vector-icons": "^10.3.0",
|
||||
"react-native-webview": "13.16.0",
|
||||
"stream-browserify": "^3.0.0",
|
||||
"util": "^0.12.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.28.3",
|
||||
"@babel/core": "^7.28.6",
|
||||
"@react-native-community/cli": "^16.0.3",
|
||||
"@react-native/gradle-plugin": "0.76.9",
|
||||
"@react-native/metro-config": "0.76.9",
|
||||
@@ -83,8 +83,8 @@
|
||||
"metro-react-native-babel-preset": "0.76.9",
|
||||
"prettier": "^3.6.2",
|
||||
"react-dom": "^18.3.1",
|
||||
"react-native-svg-transformer": "^1.5.1",
|
||||
"typescript": "^5.9.2",
|
||||
"react-native-svg-transformer": "^1.5.2",
|
||||
"typescript": "^5.9.3",
|
||||
"vitest": "^2.1.8"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
diff --git a/node_modules/@sumsub/react-native-mobilesdk-module/android/build.gradle b/node_modules/@sumsub/react-native-mobilesdk-module/android/build.gradle
|
||||
index 1234567..abcdefg 100644
|
||||
index 0000000..0000001 100644
|
||||
--- a/node_modules/@sumsub/react-native-mobilesdk-module/android/build.gradle
|
||||
+++ b/node_modules/@sumsub/react-native-mobilesdk-module/android/build.gradle
|
||||
@@ -69,9 +69,9 @@ dependencies {
|
||||
@@ -77,11 +77,11 @@ dependencies {
|
||||
implementation "com.sumsub.sns:idensic-mobile-sdk:1.40.2"
|
||||
|
||||
// remove comment to enable Device Intelligence
|
||||
@@ -12,3 +12,7 @@ index 1234567..abcdefg 100644
|
||||
- // implementation "com.sumsub.sns:idensic-mobile-sdk-videoident:1.40.2"
|
||||
+ implementation "com.sumsub.sns:idensic-mobile-sdk-videoident:1.40.2"
|
||||
// remove comment if you need EID support
|
||||
// implementation "com.sumsub.sns:idensic-mobile-sdk-eid:1.40.2"
|
||||
// remove comment if you need NFC support
|
||||
// implementation "com.sumsub.sns:idensic-mobile-sdk-nfc:1.40.2"
|
||||
}
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
diff --git a/node_modules/ethereum-cryptography/utils.js b/node_modules/ethereum-cryptography/utils.js
|
||||
index cedfa36..b494c49 100644
|
||||
--- a/node_modules/ethereum-cryptography/utils.js
|
||||
+++ b/node_modules/ethereum-cryptography/utils.js
|
||||
@@ -8,11 +8,18 @@ exports.bytesToUtf8 = bytesToUtf8;
|
||||
exports.hexToBytes = hexToBytes;
|
||||
exports.equalsBytes = equalsBytes;
|
||||
exports.wrapHash = wrapHash;
|
||||
-const _assert_1 = __importDefault(require("@noble/hashes/_assert"));
|
||||
+const assertModule = __importDefault(require("@noble/hashes/_assert"));
|
||||
const utils_1 = require("@noble/hashes/utils");
|
||||
-const assertBool = _assert_1.default.bool;
|
||||
+const assertBool = (assertModule.default && assertModule.default.bool) ||
|
||||
+ assertModule.bool ||
|
||||
+ ((value) => {
|
||||
+ if (typeof value !== "boolean")
|
||||
+ throw new TypeError(`Expected boolean, not ${value}`);
|
||||
+ });
|
||||
exports.assertBool = assertBool;
|
||||
-const assertBytes = _assert_1.default.bytes;
|
||||
+const assertBytes = (assertModule.default && assertModule.default.bytes) ||
|
||||
+ assertModule.bytes ||
|
||||
+ assertModule.abytes;
|
||||
exports.assertBytes = assertBytes;
|
||||
var utils_2 = require("@noble/hashes/utils");
|
||||
Object.defineProperty(exports, "bytesToHex", { enumerable: true, get: function () { return utils_2.bytesToHex; } });
|
||||
diff --git a/node_modules/ethereum-cryptography/esm/utils.js b/node_modules/ethereum-cryptography/esm/utils.js
|
||||
index 8e771ea..b3eed9d 100644
|
||||
--- a/node_modules/ethereum-cryptography/esm/utils.js
|
||||
+++ b/node_modules/ethereum-cryptography/esm/utils.js
|
||||
@@ -1,7 +1,11 @@
|
||||
import assert from "@noble/hashes/_assert";
|
||||
import { hexToBytes as _hexToBytes } from "@noble/hashes/utils";
|
||||
-const assertBool = assert.bool;
|
||||
-const assertBytes = assert.bytes;
|
||||
+const assertBool = (assert?.bool) ||
|
||||
+ ((value) => {
|
||||
+ if (typeof value !== "boolean")
|
||||
+ throw new TypeError(`Expected boolean, not ${value}`);
|
||||
+ });
|
||||
+const assertBytes = assert.bytes || assert.abytes;
|
||||
export { assertBool, assertBytes };
|
||||
export { bytesToHex, bytesToHex as toHex, concatBytes, createView, utf8ToBytes } from "@noble/hashes/utils";
|
||||
// buf.toString('utf8') -> bytesToUtf8(buf)
|
||||
15
patches/react-native-gesture-handler+2.30.0.patch
Normal file
15
patches/react-native-gesture-handler+2.30.0.patch
Normal file
@@ -0,0 +1,15 @@
|
||||
diff --git a/node_modules/react-native-gesture-handler/android/build.gradle b/node_modules/react-native-gesture-handler/android/build.gradle
|
||||
--- a/node_modules/react-native-gesture-handler/android/build.gradle
|
||||
+++ b/node_modules/react-native-gesture-handler/android/build.gradle
|
||||
@@ -229,9 +229,10 @@
|
||||
}
|
||||
|
||||
def kotlin_version = safeExtGet('kotlinVersion', project.properties['RNGH_kotlinVersion'])
|
||||
+def reactNativeDependency = safeExtGet("reactNativeDependency", "com.facebook.react:react-android")
|
||||
|
||||
dependencies {
|
||||
- implementation 'com.facebook.react:react-native:+' // from node_modules
|
||||
+ implementation reactNativeDependency
|
||||
|
||||
|
||||
if (shouldUseCommonInterfaceFromReanimated()) {
|
||||
@@ -1,98 +0,0 @@
|
||||
diff --git a/node_modules/react-native-svg/android/.project b/node_modules/react-native-svg/android/.project
|
||||
new file mode 100644
|
||||
index 0000000..dd0da62
|
||||
--- /dev/null
|
||||
+++ b/node_modules/react-native-svg/android/.project
|
||||
@@ -0,0 +1,28 @@
|
||||
+<?xml version="1.0" encoding="UTF-8"?>
|
||||
+<projectDescription>
|
||||
+ <name>react-native-svg</name>
|
||||
+ <comment>Project OpenPassport-android-react-native-svg created by Buildship.</comment>
|
||||
+ <projects>
|
||||
+ </projects>
|
||||
+ <buildSpec>
|
||||
+ <buildCommand>
|
||||
+ <name>org.eclipse.buildship.core.gradleprojectbuilder</name>
|
||||
+ <arguments>
|
||||
+ </arguments>
|
||||
+ </buildCommand>
|
||||
+ </buildSpec>
|
||||
+ <natures>
|
||||
+ <nature>org.eclipse.buildship.core.gradleprojectnature</nature>
|
||||
+ </natures>
|
||||
+ <filteredResources>
|
||||
+ <filter>
|
||||
+ <id>1759738232589</id>
|
||||
+ <name></name>
|
||||
+ <type>30</type>
|
||||
+ <matcher>
|
||||
+ <id>org.eclipse.core.resources.regexFilterMatcher</id>
|
||||
+ <arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
|
||||
+ </matcher>
|
||||
+ </filter>
|
||||
+ </filteredResources>
|
||||
+</projectDescription>
|
||||
diff --git a/node_modules/react-native-svg/common/cpp/react/renderer/components/rnsvg/RNSVGLayoutableShadowNode.cpp b/node_modules/react-native-svg/common/cpp/react/renderer/components/rnsvg/RNSVGLayoutableShadowNode.cpp
|
||||
index 11718dd..fe993b3 100644
|
||||
--- a/node_modules/react-native-svg/common/cpp/react/renderer/components/rnsvg/RNSVGLayoutableShadowNode.cpp
|
||||
+++ b/node_modules/react-native-svg/common/cpp/react/renderer/components/rnsvg/RNSVGLayoutableShadowNode.cpp
|
||||
@@ -28,8 +28,8 @@ void RNSVGLayoutableShadowNode::setZeroDimensions() {
|
||||
// views in the layout inspector when Yoga attempts to interpret SVG
|
||||
// properties like width when viewBox scale is set.
|
||||
auto style = yogaNode_.style();
|
||||
- style.setDimension(yoga::Dimension::Width, yoga::StyleSizeLength::points(0));
|
||||
- style.setDimension(yoga::Dimension::Height, yoga::StyleSizeLength::points(0));
|
||||
+ style.setDimension(yoga::Dimension::Width, yoga::StyleLength::points(0));
|
||||
+ style.setDimension(yoga::Dimension::Height, yoga::StyleLength::points(0));
|
||||
yogaNode_.setStyle(style);
|
||||
}
|
||||
|
||||
diff --git a/node_modules/react-native-svg/common/cpp/react/renderer/components/rnsvg/RNSVGLayoutableShadowNode.cpp.bak b/node_modules/react-native-svg/common/cpp/react/renderer/components/rnsvg/RNSVGLayoutableShadowNode.cpp.bak
|
||||
new file mode 100644
|
||||
index 0000000..11718dd
|
||||
--- /dev/null
|
||||
+++ b/node_modules/react-native-svg/common/cpp/react/renderer/components/rnsvg/RNSVGLayoutableShadowNode.cpp.bak
|
||||
@@ -0,0 +1,43 @@
|
||||
+#include "RNSVGLayoutableShadowNode.h"
|
||||
+#include <react/renderer/core/LayoutContext.h>
|
||||
+
|
||||
+namespace facebook::react {
|
||||
+
|
||||
+RNSVGLayoutableShadowNode::RNSVGLayoutableShadowNode(
|
||||
+ const ShadowNodeFragment &fragment,
|
||||
+ const ShadowNodeFamily::Shared &family,
|
||||
+ ShadowNodeTraits traits)
|
||||
+ : YogaLayoutableShadowNode(fragment, family, traits) {
|
||||
+ if (std::strcmp(this->getComponentName(), "RNSVGGroup") != 0) {
|
||||
+ setZeroDimensions();
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+RNSVGLayoutableShadowNode::RNSVGLayoutableShadowNode(
|
||||
+ const ShadowNode &sourceShadowNode,
|
||||
+ const ShadowNodeFragment &fragment)
|
||||
+ : YogaLayoutableShadowNode(sourceShadowNode, fragment) {
|
||||
+ if (std::strcmp(this->getComponentName(), "RNSVGGroup") != 0) {
|
||||
+ setZeroDimensions();
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+void RNSVGLayoutableShadowNode::setZeroDimensions() {
|
||||
+ // SVG handles its layout manually on the native side and does not depend on
|
||||
+ // the Yoga layout. Setting the dimensions to 0 eliminates randomly positioned
|
||||
+ // views in the layout inspector when Yoga attempts to interpret SVG
|
||||
+ // properties like width when viewBox scale is set.
|
||||
+ auto style = yogaNode_.style();
|
||||
+ style.setDimension(yoga::Dimension::Width, yoga::StyleSizeLength::points(0));
|
||||
+ style.setDimension(yoga::Dimension::Height, yoga::StyleSizeLength::points(0));
|
||||
+ yogaNode_.setStyle(style);
|
||||
+}
|
||||
+
|
||||
+void RNSVGLayoutableShadowNode::layout(LayoutContext layoutContext) {
|
||||
+ auto affectedNodes = layoutContext.affectedNodes;
|
||||
+ layoutContext.affectedNodes = nullptr;
|
||||
+ YogaLayoutableShadowNode::layout(layoutContext);
|
||||
+ layoutContext.affectedNodes = affectedNodes;
|
||||
+}
|
||||
+
|
||||
+} // namespace facebook::react
|
||||
@@ -88,30 +88,45 @@ if (!isExecutableAvailableOnPath('patch-package')) {
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
// Workspaces with isolated node_modules due to nmHoistingLimits: workspaces
|
||||
// Most packages are in workspace node_modules, not root
|
||||
const workspaceRoots = [
|
||||
{ name: 'app', path: path.join(repositoryRootPath, 'app') },
|
||||
{ name: 'contracts', path: path.join(repositoryRootPath, 'contracts') }
|
||||
];
|
||||
|
||||
// Run patch-package with better error handling
|
||||
try {
|
||||
const rootPatchRun = spawnSync('patch-package', ['--patch-dir', 'patches'], {
|
||||
cwd: repositoryRootPath,
|
||||
shell: true,
|
||||
stdio: isCI ? 'pipe' : 'inherit',
|
||||
timeout: 30000
|
||||
});
|
||||
if (rootPatchRun.status === 0) {
|
||||
if (!isCI) console.log('✓ Patches applied to root workspace');
|
||||
} else {
|
||||
const errorOutput = rootPatchRun.stderr?.toString() || rootPatchRun.stdout?.toString() || '';
|
||||
console.error(`patch-package failed for root workspace (exit code ${rootPatchRun.status})`);
|
||||
if (errorOutput) console.error(errorOutput);
|
||||
if (!isCI) process.exit(1);
|
||||
let anyPatchApplied = false;
|
||||
let anyPatchFailed = false;
|
||||
|
||||
// Try root node_modules first (some packages may be hoisted here)
|
||||
const rootNodeModules = path.join(repositoryRootPath, 'node_modules');
|
||||
if (fs.existsSync(rootNodeModules)) {
|
||||
const rootPatchRun = spawnSync('patch-package', ['--patch-dir', 'patches'], {
|
||||
cwd: repositoryRootPath,
|
||||
shell: true,
|
||||
stdio: 'pipe', // Always capture output to check for real errors vs missing packages
|
||||
timeout: 30000
|
||||
});
|
||||
const output = rootPatchRun.stdout?.toString() || '';
|
||||
const stderrOutput = rootPatchRun.stderr?.toString() || '';
|
||||
const hasRealError = (output.includes('**ERROR**') && !output.includes('which is not present at')) ||
|
||||
(stderrOutput.length > 0 && rootPatchRun.status !== 0);
|
||||
|
||||
if (rootPatchRun.status === 0) {
|
||||
if (!isCI) console.log('✓ Patches applied to root workspace');
|
||||
anyPatchApplied = true;
|
||||
} else if (hasRealError) {
|
||||
console.error(`patch-package failed for root workspace`);
|
||||
console.error(output);
|
||||
if (stderrOutput) console.error(stderrOutput);
|
||||
anyPatchFailed = true;
|
||||
}
|
||||
// If packages are just missing (not hoisted to root), that's expected - continue to workspace patches
|
||||
}
|
||||
|
||||
// Also patch app/node_modules if it exists
|
||||
// Workspaces with isolated node_modules due to limited hoisting
|
||||
const workspaceRoots = [
|
||||
{ name: 'app', path: path.join(repositoryRootPath, 'app') },
|
||||
{ name: 'contracts', path: path.join(repositoryRootPath, 'contracts') }
|
||||
];
|
||||
|
||||
// Apply patches to workspace node_modules (where most packages are with nmHoistingLimits)
|
||||
for (const workspace of workspaceRoots) {
|
||||
const workspaceNodeModules = path.join(workspace.path, 'node_modules');
|
||||
if (!fs.existsSync(workspaceNodeModules)) continue;
|
||||
@@ -119,19 +134,41 @@ try {
|
||||
const workspacePatchRun = spawnSync('patch-package', ['--patch-dir', '../patches'], {
|
||||
cwd: workspace.path,
|
||||
shell: true,
|
||||
stdio: isCI ? 'pipe' : 'inherit',
|
||||
stdio: 'pipe',
|
||||
timeout: 30000
|
||||
});
|
||||
|
||||
const output = workspacePatchRun.stdout?.toString() || '';
|
||||
const stderrOutput = workspacePatchRun.stderr?.toString() || '';
|
||||
const hasRealError = (output.includes('**ERROR**') && !output.includes('which is not present at')) ||
|
||||
(stderrOutput.length > 0 && workspacePatchRun.status !== 0);
|
||||
|
||||
if (workspacePatchRun.status === 0) {
|
||||
if (!isCI) console.log(`✓ Patches applied to ${workspace.name} workspace`);
|
||||
} else {
|
||||
const errorOutput = workspacePatchRun.stderr?.toString() || workspacePatchRun.stdout?.toString() || '';
|
||||
console.error(`patch-package failed for ${workspace.name} workspace (exit code ${workspacePatchRun.status})`);
|
||||
if (errorOutput) console.error(errorOutput);
|
||||
if (!isCI) process.exit(1);
|
||||
anyPatchApplied = true;
|
||||
} else if (hasRealError) {
|
||||
console.error(`patch-package failed for ${workspace.name} workspace`);
|
||||
console.error(output);
|
||||
if (stderrOutput) console.error(stderrOutput);
|
||||
anyPatchFailed = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (anyPatchFailed && !isCI) {
|
||||
console.error('Some patches failed to apply. Check if patch versions match installed package versions.');
|
||||
process.exit(1);
|
||||
}
|
||||
if (anyPatchFailed && isCI) {
|
||||
console.warn('⚠️ CI Warning: Some patches failed to apply. Review patch compatibility.');
|
||||
}
|
||||
|
||||
if (anyPatchApplied) {
|
||||
if (!isCI) console.log('✓ patch-package completed');
|
||||
else console.log('patch-package completed');
|
||||
} else {
|
||||
if (!isCI) console.log('patch-package: no patches applied (packages may be in different locations)');
|
||||
else console.log('patch-package: no patches applied');
|
||||
}
|
||||
} catch (error) {
|
||||
if (isCI) {
|
||||
console.log('patch-package: error during execution (CI mode):', error.message);
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
"js-sha1": "^0.7.0",
|
||||
"js-sha256": "^0.11.0",
|
||||
"js-sha512": "^0.9.0",
|
||||
"node-forge": "^1.3.1",
|
||||
"node-forge": "^1.3.3",
|
||||
"poseidon-lite": "^0.3.0",
|
||||
"snarkjs": "^0.7.4",
|
||||
"uuid": "^11.1.0"
|
||||
@@ -72,7 +72,7 @@
|
||||
"ts-node": "^10.9.2",
|
||||
"tsup": "^8.5.0",
|
||||
"typechain": "^8.3.2",
|
||||
"typescript": "^5.9.2",
|
||||
"typescript": "^5.9.3",
|
||||
"webpack": "^5.95.0"
|
||||
},
|
||||
"engines": {
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
"dependencies": {
|
||||
"angularx-qrcode": "^20.0.0",
|
||||
"lottie-web": "^5.12.2",
|
||||
"socket.io-client": "^4.8.1",
|
||||
"socket.io-client": "^4.8.3",
|
||||
"uuid": "^11.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -68,7 +68,7 @@
|
||||
"prettier": "^3.5.3",
|
||||
"rxjs": "^7.8.0",
|
||||
"tslib": "^2.6.0",
|
||||
"typescript": "~5.9.0",
|
||||
"typescript": "~5.9.3",
|
||||
"zone.js": "^0.15.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
||||
@@ -72,11 +72,11 @@
|
||||
"js-sha256": "^0.11.0",
|
||||
"js-sha512": "^0.9.0",
|
||||
"lottie-react": "^2.4.0",
|
||||
"node-forge": "^1.3.1",
|
||||
"node-forge": "^1.3.3",
|
||||
"poseidon-lite": "^0.3.0",
|
||||
"qrcode.react": "^4.1.0",
|
||||
"react-spinners": "^0.14.1",
|
||||
"socket.io-client": "^4.8.1",
|
||||
"socket.io-client": "^4.8.3",
|
||||
"uuid": "^11.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -104,7 +104,7 @@
|
||||
"ts-mocha": "^10.0.0",
|
||||
"ts-node": "^10.9.2",
|
||||
"tsup": "^8.5.0",
|
||||
"typescript": "^5.9.2",
|
||||
"typescript": "^5.9.3",
|
||||
"webpack": "^5.95.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
||||
@@ -32,6 +32,6 @@
|
||||
"uuid": "^13.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "^5.9.2"
|
||||
"typescript": "^5.9.3"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user