diff --git a/packages/react-native-reanimated/.github/CODEOWNERS b/.github/CODEOWNERS similarity index 100% rename from packages/react-native-reanimated/.github/CODEOWNERS rename to .github/CODEOWNERS diff --git a/packages/react-native-reanimated/.github/FUNDING.yml b/.github/FUNDING.yml similarity index 100% rename from packages/react-native-reanimated/.github/FUNDING.yml rename to .github/FUNDING.yml diff --git a/packages/react-native-reanimated/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml similarity index 100% rename from packages/react-native-reanimated/.github/ISSUE_TEMPLATE/bug-report.yml rename to .github/ISSUE_TEMPLATE/bug-report.yml diff --git a/packages/react-native-reanimated/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml similarity index 100% rename from packages/react-native-reanimated/.github/ISSUE_TEMPLATE/config.yml rename to .github/ISSUE_TEMPLATE/config.yml diff --git a/packages/react-native-reanimated/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md similarity index 100% rename from packages/react-native-reanimated/.github/PULL_REQUEST_TEMPLATE.md rename to .github/PULL_REQUEST_TEMPLATE.md diff --git a/packages/react-native-reanimated/.github/workflows/android-build.yml b/.github/workflows/android-build.yml similarity index 60% rename from packages/react-native-reanimated/.github/workflows/android-build.yml rename to .github/workflows/android-build.yml index 63c4f726d6f..5732e79de1b 100644 --- a/packages/react-native-reanimated/.github/workflows/android-build.yml +++ b/.github/workflows/android-build.yml @@ -5,12 +5,12 @@ on: pull_request: paths: - .github/workflows/android-build.yml - - android/** - - Common/** - - Example/package.json - - Example/android/** - - FabricExample/package.json - - FabricExample/android/** + - packages/react-native-reanimated/android/** + - packages/react-native-reanimated/Common/** + - packages/react-native-reanimated/Example/package.json + - packages/react-native-reanimated/Example/android/** + - packages/react-native-reanimated/FabricExample/package.json + - packages/react-native-reanimated/FabricExample/android/** merge_group: branches: - main @@ -19,12 +19,12 @@ on: - main paths: - .github/workflows/android-build.yml - - android/** - - Common/** - - Example/package.json - - Example/android/** - - FabricExample/package.json - - FabricExample/android/** + - packages/react-native-reanimated/android/** + - packages/react-native-reanimated/Common/** + - packages/react-native-reanimated/Example/package.json + - packages/react-native-reanimated/Example/android/** + - packages/react-native-reanimated/FabricExample/package.json + - packages/react-native-reanimated/FabricExample/android/** jobs: build: @@ -32,7 +32,11 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - working-directory: [Example, FabricExample] + working-directory: + [ + packages/react-native-reanimated/Example, + packages/react-native-reanimated/FabricExample, + ] fail-fast: false concurrency: group: android-${{ matrix.working-directory }}-${{ github.ref }} @@ -41,20 +45,24 @@ jobs: - name: Check out Git repository uses: actions/checkout@v4 + - name: Install dependencies in root + run: yarn install --immutable + - name: Setup Java 17 uses: actions/setup-java@v3 with: - distribution: 'zulu' + distribution: "zulu" java-version: 17 - name: Restore Reanimated node_modules from cache uses: actions/cache@v3 with: - path: node_modules - key: ${{ runner.os }}-android-node-modules-reanimated-${{ hashFiles('yarn.lock') }} + path: packages/react-native-reanimated/node_modules + key: ${{ runner.os }}-android-node-modules-reanimated-${{ hashFiles('packages/react-native-reanimated/yarn.lock') }} restore-keys: ${{ runner.os }}-android-node-modules-reanimated- - name: Install Reanimated node_modules + working-directory: packages/react-native-reanimated run: yarn install --immutable - name: Restore app node_modules from cache diff --git a/packages/react-native-reanimated/.github/workflows/build-monorepo-action.yml b/.github/workflows/build-monorepo-action.yml similarity index 100% rename from packages/react-native-reanimated/.github/workflows/build-monorepo-action.yml rename to .github/workflows/build-monorepo-action.yml diff --git a/packages/react-native-reanimated/.github/workflows/build-monorepo-nightly.yml b/.github/workflows/build-monorepo-nightly.yml similarity index 100% rename from packages/react-native-reanimated/.github/workflows/build-monorepo-nightly.yml rename to .github/workflows/build-monorepo-nightly.yml diff --git a/packages/react-native-reanimated/.github/workflows/build-monorepo.yml b/.github/workflows/build-monorepo.yml similarity index 84% rename from packages/react-native-reanimated/.github/workflows/build-monorepo.yml rename to .github/workflows/build-monorepo.yml index 1c179ef7dec..84d1eb59337 100644 --- a/packages/react-native-reanimated/.github/workflows/build-monorepo.yml +++ b/.github/workflows/build-monorepo.yml @@ -1,14 +1,12 @@ name: Test monorepo build -env: - YARN_ENABLE_HARDENED_MODE: 0 on: pull_request: paths: - .github/workflows/build-monorepo.yml - .github/workflows/build-monorepo-action.yml - RNReanimated.podspec - - scripts/reanimated_utils.rb - - android/build.gradle + - packages/react-native-reanimated/scripts/reanimated_utils.rb + - packages/react-native-reanimated/android/build.gradle merge_group: branches: - main @@ -18,9 +16,9 @@ on: paths: - .github/workflows/build-monorepo.yml - .github/workflows/build-monorepo-action.yml - - RNReanimated.podspec - - scripts/reanimated_utils.rb - - android/build.gradle + - packages/react-native-reanimated/RNReanimated.podspec + - packages/react-native-reanimated/scripts/reanimated_utils.rb + - packages/react-native-reanimated/android/build.gradle workflow_call: jobs: diff --git a/packages/react-native-reanimated/.github/workflows/build-next-example.yml b/.github/workflows/build-next-example.yml similarity index 51% rename from packages/react-native-reanimated/.github/workflows/build-next-example.yml rename to .github/workflows/build-next-example.yml index ab4efb4a97c..334e711eb94 100644 --- a/packages/react-native-reanimated/.github/workflows/build-next-example.yml +++ b/.github/workflows/build-next-example.yml @@ -5,11 +5,11 @@ on: pull_request: paths: - .github/workflows/build-next-example.yml - - 'src/**' - - 'NextExample/**' + - "packages/react-native-reanimated/src/**" + - "packages/react-native-reanimated/NextExample/**" push: branches: - - master + - main jobs: check: @@ -20,21 +20,23 @@ jobs: steps: - name: Checkout Git repository uses: actions/checkout@v4 - - - name: Install Reanimated node_modules + - name: Install monorepo node dependencies run: yarn install --immutable - - - name: Build package + - name: Install Reanimated node dependencies + working-directory: packages/react-native-reanimated + run: yarn install --immutable + - name: Build Reanimated package + working-directory: packages/react-native-reanimated run: yarn build - name: Install NextExample node_modules - working-directory: NextExample + working-directory: packages/react-native-reanimated/NextExample run: yarn install --immutable - name: Compile production build - working-directory: NextExample + working-directory: packages/react-native-reanimated/NextExample run: yarn build - name: Run e2e tests - working-directory: NextExample + working-directory: packages/react-native-reanimated/NextExample run: yarn e2e:headless diff --git a/packages/react-native-reanimated/.github/workflows/build-nightly-npm-package.yml b/.github/workflows/build-nightly-npm-package.yml similarity index 100% rename from packages/react-native-reanimated/.github/workflows/build-nightly-npm-package.yml rename to .github/workflows/build-nightly-npm-package.yml diff --git a/packages/react-native-reanimated/.github/workflows/build-npm-package-action.yml b/.github/workflows/build-npm-package-action.yml similarity index 50% rename from packages/react-native-reanimated/.github/workflows/build-npm-package-action.yml rename to .github/workflows/build-npm-package-action.yml index 3fb661bfbca..d402dca23c1 100644 --- a/packages/react-native-reanimated/.github/workflows/build-npm-package-action.yml +++ b/.github/workflows/build-npm-package-action.yml @@ -10,15 +10,20 @@ on: ref: required: false type: string - upload_binaries: - required: false - type: boolean publish_on_npm: required: false type: boolean secrets: NODE_AUTH_TOKEN: required: false + workflow_dispatch: + inputs: + option: + required: false + type: string + ref: + required: false + type: string jobs: build: @@ -36,72 +41,41 @@ jobs: node-version: 20 registry-url: https://registry.npmjs.org/ - name: Clear annotations - run: scripts/clear-annotations.sh - - - name: Set up JDK 11 - if: ${{ inputs.ref == 'Reanimated2' }} - uses: actions/setup-java@v3 - with: - distribution: 'zulu' - java-version: '11' - - - name: Install NDK - if: ${{ inputs.ref == 'Reanimated2' }} - uses: nttld/setup-ndk@v1 - id: setup-ndk - with: - ndk-version: r21d + run: .github/workflows/helper/clear-annotations.sh - name: Build package + working-directory: packages/react-native-reanimated id: build - env: - ANDROID_NDK: ${{ steps.setup-ndk.outputs.ndk-path }} run: >- - ./createNPMPackage.sh ${{ inputs.option }} 2> build.log + ./createNPMPackage.sh ${{ inputs.option }} - name: Check if any node_modules were packed + working-directory: packages/react-native-reanimated id: node_modules run: >- - ! grep --silent -E "node_modules/.+" - - - name: Check if size is over 1MB - if: ${{ inputs.ref != 'Reanimated2' }} - id: size - run: grep --silent -E "npm notice package size:\s*[0-9][0-9]?[0-9]?(\.[0-9]*)?\s*kB" build.log + ! grep --silent -E "node_modules/.+" build.log - name: Show build log + working-directory: packages/react-native-reanimated if: failure() && steps.build.outcome == 'failure' run: >- cat build.log - name: Show packed node_modules + working-directory: packages/react-native-reanimated if: failure() && steps.node_modules.outcome == 'failure' run: >- - ! grep -E "node_modules/.+" + ! grep -E "node_modules/.+" build.log - - name: Show exceeded package size - if: failure() && steps.size.outcome == 'failure' - run: grep -E "npm notice package size:" build.log - - - run: echo "PACKAGE_NAME=$(ls -l | egrep -o "react-native-reanimated-(.*)(=?\.tgz)")" >> $GITHUB_ENV + - name: Add package name to env + working-directory: packages/react-native-reanimated + run: echo "PACKAGE_NAME=$(ls -l | egrep -o "react-native-reanimated-(.*)(=?\.tgz)")" >> $GITHUB_ENV - name: Upload npm package uses: actions/upload-artifact@v4 with: name: ${{ env.PACKAGE_NAME }} - path: '*.tgz' - - - name: Compress Android build output - if: ${{ inputs.upload_binaries }} - run: zip -r android-build-output.zip build_output - - - name: Upload Android build folder - if: ${{ inputs.upload_binaries }} - uses: actions/upload-artifact@v4 - with: - name: android-build-output - path: android-build-output.zip - retention-days: 5 + path: "packages/react-native-reanimated/${{ env.PACKAGE_NAME }}" - run: npm publish $PACKAGE_NAME --tag nightly if: ${{ inputs.publish_on_npm }} diff --git a/packages/react-native-reanimated/.github/workflows/build-on-windows-nightly.yml b/.github/workflows/build-on-windows-nightly.yml similarity index 100% rename from packages/react-native-reanimated/.github/workflows/build-on-windows-nightly.yml rename to .github/workflows/build-on-windows-nightly.yml diff --git a/packages/react-native-reanimated/.github/workflows/build-release-npm-package-rea3.yml b/.github/workflows/build-release-npm-package-rea3.yml similarity index 100% rename from packages/react-native-reanimated/.github/workflows/build-release-npm-package-rea3.yml rename to .github/workflows/build-release-npm-package-rea3.yml diff --git a/packages/react-native-reanimated/.github/workflows/build-v8-nightly.yml b/.github/workflows/build-v8-nightly.yml similarity index 100% rename from packages/react-native-reanimated/.github/workflows/build-v8-nightly.yml rename to .github/workflows/build-v8-nightly.yml diff --git a/packages/react-native-reanimated/.github/workflows/check-TS-react-native.yml b/.github/workflows/check-TS-react-native.yml similarity index 60% rename from packages/react-native-reanimated/.github/workflows/check-TS-react-native.yml rename to .github/workflows/check-TS-react-native.yml index 80077f2622d..1b27dcfd923 100644 --- a/packages/react-native-reanimated/.github/workflows/check-TS-react-native.yml +++ b/.github/workflows/check-TS-react-native.yml @@ -6,7 +6,7 @@ on: paths: - .github/workflows/check-TS-react-native.yml schedule: - - cron: '37 19 * * *' + - cron: "37 19 * * *" workflow_dispatch: jobs: @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - react-native-version: ['0.71', '0.72', '0.73', '0.74.0-rc.6', nightly] + react-native-version: ["0.71", "0.72", "0.73", "0.74", nightly] fail-fast: false concurrency: group: TS-react-native-nightly-${{ matrix.react-native-version }}-${{ github.ref }} @@ -26,23 +26,35 @@ jobs: - name: Use Node.js uses: actions/setup-node@v4 with: - cache: 'yarn' + cache: "yarn" - name: Clear annotations - run: scripts/clear-annotations.sh - - name: Install dependencies + run: .github/workflows/helper/clear-annotations.sh + + - name: Install monorepo node dependencies + run: yarn install + - name: Install Reanimated node dependencies + working-directory: packages/react-native-reanimated run: yarn install - - name: Build repo + - name: Build Reanimated node dependencies + working-directory: packages/react-native-reanimated run: yarn build - name: Install react-native ${{ matrix.react-native-version }} + working-directory: packages/react-native-reanimated run: yarn add --dev react-native@${{ matrix.react-native-version }} + - name: Check source types + working-directory: packages/react-native-reanimated run: yarn type:check:src - name: Check plugin types + working-directory: packages/react-native-reanimated run: yarn type:check:plugin - name: Check API + working-directory: packages/react-native-reanimated run: yarn type:check:app - name: Run common type tests + working-directory: packages/react-native-reanimated run: yarn type:check:tests:common - name: Run 0.72+ type tests + working-directory: packages/react-native-reanimated if: matrix.react-native-version != '0.71' run: yarn type:check:tests:0.72+ diff --git a/packages/react-native-reanimated/.github/workflows/check-expo-dev-client-nightly.yml b/.github/workflows/check-expo-dev-client-nightly.yml similarity index 100% rename from packages/react-native-reanimated/.github/workflows/check-expo-dev-client-nightly.yml rename to .github/workflows/check-expo-dev-client-nightly.yml diff --git a/packages/react-native-reanimated/.github/workflows/check-react-native-nightly.yml b/.github/workflows/check-react-native-nightly.yml similarity index 71% rename from packages/react-native-reanimated/.github/workflows/check-react-native-nightly.yml rename to .github/workflows/check-react-native-nightly.yml index cee9226ccc8..e63d29aca78 100644 --- a/packages/react-native-reanimated/.github/workflows/check-react-native-nightly.yml +++ b/.github/workflows/check-react-native-nightly.yml @@ -1,12 +1,10 @@ name: Check React Native nightly build -env: - YARN_ENABLE_HARDENED_MODE: 0 on: pull_request: paths: - .github/workflows/check-react-native-nightly.yml schedule: - - cron: '37 19 * * *' + - cron: "37 19 * * *" workflow_dispatch: jobs: @@ -15,7 +13,7 @@ jobs: runs-on: macos-14 strategy: matrix: - react-native-architecture: ['Paper', 'Fabric'] + react-native-architecture: ["Paper", "Fabric"] fail-fast: false concurrency: group: ios-react-native-nightly-${{ matrix.react-native-architecture }}-${{ github.ref }} @@ -23,9 +21,12 @@ jobs: steps: - name: Create app run: npx react-native init app --skip-install --version nightly + - name: Download Reanimated from commit + working-directory: app + run: curl -LJO https://codeload.github.com/software-mansion/react-native-reanimated/tar.gz/${{ github.sha }} - name: Install Reanimated working-directory: app - run: yarn add github:software-mansion/react-native-reanimated + run: yarn add react-native-reanimated@file:./react-native-reanimated-${{ github.sha }}.tar.gz - name: Install Paper Pods if: ${{ matrix.react-native-architecture == 'Paper' }} working-directory: app/ios @@ -43,7 +44,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - react-native-architecture: ['Paper', 'Fabric'] + react-native-architecture: ["Paper", "Fabric"] fail-fast: false concurrency: group: android-react-native-nightly-${{ matrix.react-native-architecture }}-${{ github.ref }} @@ -52,13 +53,16 @@ jobs: - name: Set up JDK 18 uses: actions/setup-java@v3 with: - distribution: 'zulu' - java-version: '18' + distribution: "zulu" + java-version: "18" - name: Create app run: npx react-native init app --skip-install --version nightly + - name: Download Reanimated from commit + working-directory: app + run: curl -LJO https://codeload.github.com/software-mansion/react-native-reanimated/tar.gz/${{ github.sha }} - name: Install Reanimated working-directory: app - run: yarn add github:software-mansion/react-native-reanimated + run: yarn add react-native-reanimated@file:./react-native-reanimated-${{ github.sha }}.tar.gz - name: Setup Fabric if: ${{ matrix.react-native-architecture == 'Fabric' }} working-directory: app/android diff --git a/packages/react-native-reanimated/.github/workflows/check-static-framework-nightly.yml b/.github/workflows/check-static-framework-nightly.yml similarity index 100% rename from packages/react-native-reanimated/.github/workflows/check-static-framework-nightly.yml rename to .github/workflows/check-static-framework-nightly.yml diff --git a/packages/react-native-reanimated/.github/workflows/close-when-stale.yml b/.github/workflows/close-when-stale.yml similarity index 73% rename from packages/react-native-reanimated/.github/workflows/close-when-stale.yml rename to .github/workflows/close-when-stale.yml index 783b2cb4154..9de60eafacb 100644 --- a/packages/react-native-reanimated/.github/workflows/close-when-stale.yml +++ b/.github/workflows/close-when-stale.yml @@ -1,9 +1,7 @@ name: Check for stale issues -env: - YARN_ENABLE_HARDENED_MODE: 0 on: schedule: - - cron: '37 21 * * *' # at 21:37 every day + - cron: "37 21 * * *" # at 21:37 every day issues: types: [edited] issue_comment: @@ -18,12 +16,12 @@ jobs: - name: Checkout Actions uses: actions/checkout@v4 with: - repository: 'software-mansion-labs/swmansion-bot' + repository: "software-mansion-labs/swmansion-bot" ref: stable - uses: actions/cache@v3 with: - path: '**/node_modules' + path: "**/node_modules" key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} - name: Install Actions @@ -32,5 +30,5 @@ jobs: - name: Close when stale uses: ./close-when-stale with: - close-when-stale-label: 'Close when stale' + close-when-stale-label: "Close when stale" days-to-close: 20 diff --git a/packages/react-native-reanimated/.github/workflows/detect-broken-urls-nightly.yml b/.github/workflows/detect-broken-urls-nightly.yml similarity index 51% rename from packages/react-native-reanimated/.github/workflows/detect-broken-urls-nightly.yml rename to .github/workflows/detect-broken-urls-nightly.yml index b10bb104bcc..1f7ec5b6ab1 100644 --- a/packages/react-native-reanimated/.github/workflows/detect-broken-urls-nightly.yml +++ b/.github/workflows/detect-broken-urls-nightly.yml @@ -5,9 +5,9 @@ on: pull_request: paths: - .github/workflows/detect-broken-urls-nightly.yml - - scripts/detect-broken-urls.js + - packages/react-native-reanimated/scripts/validate-urls.js schedule: - - cron: '37 19 * * *' + - cron: "37 19 * * *" workflow_dispatch: jobs: @@ -17,7 +17,15 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 - - name: Install dependencies + - name: Install monorepo node dependencies + run: yarn install + - name: Install Reanimated node dependencies + working-directory: packages/react-native-reanimated + run: yarn install + - name: Install node-fetch 2 + working-directory: packages/react-native-reanimated run: yarn add node-fetch@2 + - name: Validate urls + working-directory: packages/react-native-reanimated run: node scripts/validate-urls.js diff --git a/packages/react-native-reanimated/.github/workflows/docs-check.yml b/.github/workflows/docs-check.yml similarity index 60% rename from packages/react-native-reanimated/.github/workflows/docs-check.yml rename to .github/workflows/docs-check.yml index 4ef84549171..4f1e08a65a3 100644 --- a/packages/react-native-reanimated/.github/workflows/docs-check.yml +++ b/.github/workflows/docs-check.yml @@ -4,8 +4,8 @@ env: on: pull_request: paths: - - '.github/workflows/docs-check.yml' - - 'docs/**' + - ".github/workflows/docs-check.yml" + - "packages/react-native-reanimated/docs/**" merge_group: branches: - main @@ -15,20 +15,22 @@ jobs: if: github.repository == 'software-mansion/react-native-reanimated' runs-on: ubuntu-latest env: - WORKING_DIRECTORY: docs + WORKING_DIRECTORY: packages/react-native-reanimated/docs steps: - name: Check out uses: actions/checkout@v4 - name: Use Node.js uses: actions/setup-node@v4 with: - cache: 'yarn' + cache: "yarn" - name: Clear annotations - run: scripts/clear-annotations.sh - - - name: Install node dependencies + run: .github/workflows/helper/clear-annotations.sh + - name: Install monorepo node dependencies + working-directory: packages/react-native-reanimated + run: yarn install + - name: Install Reanimated docs node dependencies working-directory: ${{ env.WORKING_DIRECTORY }} - run: yarn + run: yarn install - name: Lint check docs working-directory: ${{ env.WORKING_DIRECTORY }} run: yarn lint diff --git a/packages/react-native-reanimated/.github/workflows/format-pull-request-description.yml b/.github/workflows/format-pull-request-description.yml similarity index 100% rename from packages/react-native-reanimated/.github/workflows/format-pull-request-description.yml rename to .github/workflows/format-pull-request-description.yml diff --git a/packages/react-native-reanimated/scripts/clear-annotations.sh b/.github/workflows/helper/clear-annotations.sh similarity index 100% rename from packages/react-native-reanimated/scripts/clear-annotations.sh rename to .github/workflows/helper/clear-annotations.sh diff --git a/packages/react-native-reanimated/.github/workflows/helper/configureDevClient.js b/.github/workflows/helper/configureDevClient.js similarity index 100% rename from packages/react-native-reanimated/.github/workflows/helper/configureDevClient.js rename to .github/workflows/helper/configureDevClient.js diff --git a/packages/react-native-reanimated/.github/workflows/helper/configureV8.js b/.github/workflows/helper/configureV8.js similarity index 100% rename from packages/react-native-reanimated/.github/workflows/helper/configureV8.js rename to .github/workflows/helper/configureV8.js diff --git a/packages/react-native-reanimated/.github/workflows/ios-build.yml b/.github/workflows/ios-build.yml similarity index 60% rename from packages/react-native-reanimated/.github/workflows/ios-build.yml rename to .github/workflows/ios-build.yml index ae0a7081f2a..d42c232947a 100644 --- a/packages/react-native-reanimated/.github/workflows/ios-build.yml +++ b/.github/workflows/ios-build.yml @@ -5,14 +5,14 @@ on: pull_request: paths: - .github/workflows/ios-build.yml - - RNReanimated.podspec - - scripts/reanimated_utils.rb - - apple/** - - Common/** - - Example/package.json - - Example/ios/** - - FabricExample/package.json - - FabricExample/ios/** + - packages/react-native-reanimated/RNReanimated.podspec + - packages/react-native-reanimated/scripts/reanimated_utils.rb + - packages/react-native-reanimated/apple/** + - packages/react-native-reanimated/Common/** + - packages/react-native-reanimated/Example/package.json + - packages/react-native-reanimated/Example/ios/** + - packages/react-native-reanimated/FabricExample/package.json + - packages/react-native-reanimated/FabricExample/ios/** merge_group: branches: - main @@ -21,14 +21,14 @@ on: - main paths: - .github/workflows/ios-build.yml - - RNReanimated.podspec - - scripts/reanimated_utils.rb - - apple/** - - Common/** - - Example/package.json - - Example/ios/** - - FabricExample/package.json - - FabricExample/ios/** + - packages/react-native-reanimated/RNReanimated.podspec + - packages/react-native-reanimated/scripts/reanimated_utils.rb + - packages/react-native-reanimated/apple/** + - packages/react-native-reanimated/Common/** + - packages/react-native-reanimated/Example/package.json + - packages/react-native-reanimated/Example/ios/** + - packages/react-native-reanimated/FabricExample/package.json + - packages/react-native-reanimated/FabricExample/ios/** jobs: build: @@ -36,7 +36,11 @@ jobs: runs-on: macos-14 strategy: matrix: - working-directory: [Example, FabricExample] + working-directory: + [ + packages/react-native-reanimated/Example, + packages/react-native-reanimated/FabricExample, + ] fail-fast: false concurrency: group: ios-${{ matrix.working-directory }}-${{ github.ref }} @@ -45,15 +49,18 @@ jobs: - name: Check out Git repository uses: actions/checkout@v4 + - name: Install monorepo node dependencies + run: yarn install - name: Restore Reanimated node_modules from cache uses: actions/cache@v3 with: - path: node_modules - key: ${{ runner.os }}-node-modules-reanimated-${{ hashFiles('yarn.lock') }} + path: packages/react-native-reanimated/node_modules + key: ${{ runner.os }}-node-modules-reanimated-${{ hashFiles('packages/react-native-reanimated/yarn.lock') }} restore-keys: ${{ runner.os }}-node-modules-reanimated- - - name: Install Reanimated node_modules - run: yarn install --immutable + - name: Install Reanimated node dependencies + working-directory: packages/react-native-reanimated + run: yarn install - name: Restore app node_modules from cache uses: actions/cache@v3 @@ -64,7 +71,7 @@ jobs: - name: Install app node_modules working-directory: ${{ matrix.working-directory }} - run: yarn install --immutable + run: yarn install - name: Restore Pods from cache uses: actions/cache@v3 diff --git a/packages/react-native-reanimated/.github/workflows/macos-build.yml b/.github/workflows/macos-build.yml similarity index 64% rename from packages/react-native-reanimated/.github/workflows/macos-build.yml rename to .github/workflows/macos-build.yml index 7b7b0c80ba9..31211a1b9d3 100644 --- a/packages/react-native-reanimated/.github/workflows/macos-build.yml +++ b/.github/workflows/macos-build.yml @@ -5,13 +5,13 @@ on: pull_request: paths: - .github/workflows/macos-build.yml - - RNReanimated.podspec - - scripts/reanimated_utils.rb - - apple/** - - Common/** - - MacOSExample/package.json - - MacOSExample/ios/** - - MacOSExample/macos/** + - packages/react-native-reanimated/RNReanimated.podspec + - packages/react-native-reanimated/scripts/reanimated_utils.rb + - packages/react-native-reanimated/apple/** + - packages/react-native-reanimated/Common/** + - packages/react-native-reanimated/MacOSExample/package.json + - packages/react-native-reanimated/MacOSExample/ios/** + - packages/react-native-reanimated/ MacOSExample/macos/** merge_group: branches: - main @@ -20,20 +20,20 @@ on: - main paths: - .github/workflows/macos-build.yml - - RNReanimated.podspec - - scripts/reanimated_utils.rb - - apple/** - - Common/** - - MacOSExample/package.json - - MacOSExample/ios/** - - MacOSExample/macos/** + - packages/react-native-reanimated/RNReanimated.podspec + - packages/react-native-reanimated/scripts/reanimated_utils.rb + - packages/react-native-reanimated/apple/** + - packages/react-native-reanimated/Common/** + - packages/react-native-reanimated/MacOSExample/package.json + - packages/react-native-reanimated/MacOSExample/ios/** + - packages/react-native-reanimated/MacOSExample/macos/** jobs: build: if: github.repository == 'software-mansion/react-native-reanimated' runs-on: macos-14 env: - WORKING_DIRECTORY: MacOSExample + WORKING_DIRECTORY: packages/react-native-reanimated/MacOSExample concurrency: group: macos-${{ github.ref }} cancel-in-progress: true @@ -41,15 +41,19 @@ jobs: - name: Check out Git repository uses: actions/checkout@v4 + - name: Install monorepo node dependencies + run: yarn install + - name: Restore Reanimated node_modules from cache uses: actions/cache@v3 with: - path: node_modules - key: ${{ runner.os }}-macos-node-modules-reanimated-${{ hashFiles('yarn.lock') }} + path: packages/react-native-reanimated/node_modules + key: ${{ runner.os }}-macos-node-modules-reanimated-${{ hashFiles('packages/react-native-reanimated/yarn.lock') }} restore-keys: ${{ runner.os }}-macos-node-modules-reanimated- - name: Install Reanimated node_modules - run: yarn install --immutable + working-directory: packages/react-native-reanimated + run: yarn install - name: Restore app node_modules from cache uses: actions/cache@v3 @@ -60,7 +64,7 @@ jobs: - name: Install app node_modules working-directory: ${{ env.WORKING_DIRECTORY }} - run: yarn install --immutable + run: yarn install - name: Restore Pods from cache uses: actions/cache@v3 diff --git a/packages/react-native-reanimated/.github/workflows/main.yml b/.github/workflows/main.yml similarity index 100% rename from packages/react-native-reanimated/.github/workflows/main.yml rename to .github/workflows/main.yml diff --git a/packages/react-native-reanimated/.github/workflows/needs-more-info.yml b/.github/workflows/needs-more-info.yml similarity index 100% rename from packages/react-native-reanimated/.github/workflows/needs-more-info.yml rename to .github/workflows/needs-more-info.yml diff --git a/packages/react-native-reanimated/.github/workflows/needs-repro.yml b/.github/workflows/needs-repro.yml similarity index 84% rename from packages/react-native-reanimated/.github/workflows/needs-repro.yml rename to .github/workflows/needs-repro.yml index 06faa5bc0f4..c17a9b70c9d 100644 --- a/packages/react-native-reanimated/.github/workflows/needs-repro.yml +++ b/.github/workflows/needs-repro.yml @@ -1,6 +1,4 @@ name: Check for reproduction -env: - YARN_ENABLE_HARDENED_MODE: 0 on: issues: types: [opened, edited] @@ -18,12 +16,12 @@ jobs: - name: Checkout Actions uses: actions/checkout@v4 with: - repository: 'software-mansion-labs/swmansion-bot' + repository: "software-mansion-labs/swmansion-bot" ref: stable - uses: actions/cache@v3 with: - path: '**/node_modules' + path: "**/node_modules" key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} - name: Install Actions @@ -33,7 +31,7 @@ jobs: uses: ./needs-repro with: github-token: ${{ secrets.GITHUB_TOKEN }} - needs-repro-label: 'Missing repro' + needs-repro-label: "Missing repro" needs-repro-response: "Hey! 👋 \n\nThe issue doesn't seem to contain a [minimal reproduction](https://stackoverflow.com/help/minimal-reproducible-example).\n\nCould you provide a [snack](https://snack.expo.dev/) or a link to a GitHub repository under your username that reproduces the problem?" - repro-provided-label: 'Repro provided' + repro-provided-label: "Repro provided" check-issues-only-created-after: 2022-01-01 diff --git a/packages/react-native-reanimated/.github/workflows/platforms.yml b/.github/workflows/platforms.yml similarity index 88% rename from packages/react-native-reanimated/.github/workflows/platforms.yml rename to .github/workflows/platforms.yml index 2c0faeb1c19..4fa4fcbc62e 100644 --- a/packages/react-native-reanimated/.github/workflows/platforms.yml +++ b/.github/workflows/platforms.yml @@ -1,6 +1,4 @@ name: Check for platforms -env: - YARN_ENABLE_HARDENED_MODE: 0 on: issues: types: [opened, edited] @@ -16,12 +14,12 @@ jobs: - name: Checkout Actions uses: actions/checkout@v4 with: - repository: 'software-mansion-labs/swmansion-bot' + repository: "software-mansion-labs/swmansion-bot" ref: stable - uses: actions/cache@v3 with: - path: '**/node_modules' + path: "**/node_modules" key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} - name: Install Actions diff --git a/packages/react-native-reanimated/.github/workflows/static-example-apps-checks.yml b/.github/workflows/static-example-apps-checks.yml similarity index 63% rename from packages/react-native-reanimated/.github/workflows/static-example-apps-checks.yml rename to .github/workflows/static-example-apps-checks.yml index 15fa75cdc8f..ea3456cb71a 100644 --- a/packages/react-native-reanimated/.github/workflows/static-example-apps-checks.yml +++ b/.github/workflows/static-example-apps-checks.yml @@ -17,7 +17,13 @@ jobs: strategy: matrix: working-directory: - [app, Example, FabricExample, WebExample, TVOSExample] + [ + packages/react-native-reanimated/app, + packages/react-native-reanimated/Example, + packages/react-native-reanimated/FabricExample, + packages/react-native-reanimated/WebExample, + packages/react-native-reanimated/TVOSExample, + ] concurrency: group: typescript-${{ matrix.working-directory }}-${{ github.ref }} cancel-in-progress: true @@ -27,24 +33,29 @@ jobs: - name: Use Node.js uses: actions/setup-node@v4 with: - cache: 'yarn' + cache: "yarn" - name: Clear annotations - run: scripts/clear-annotations.sh + run: .github/workflows/helper/clear-annotations.sh - - name: Install root node dependencies + - name: Install monorepo node dependencies run: yarn install - - name: Build package + - name: Install Reanimated node dependencies + working-directory: packages/react-native-reanimated + run: yarn install + - name: Build Reanimated package + working-directory: packages/react-native-reanimated run: yarn build - name: Install ${{ matrix.working-directory }} app node dependencies working-directory: ${{ matrix.working-directory }} run: yarn + - name: Check types working-directory: ${{ matrix.working-directory }} run: yarn tsc --noEmit - name: Lint working-directory: ${{ matrix.working-directory }} run: yarn lint - - name: Build + - name: Build WebExample working-directory: ${{ matrix.working-directory }} if: ${{ matrix.working-directory == 'WebExample' }} run: yarn build diff --git a/packages/react-native-reanimated/.github/workflows/static-root-checks.yml b/.github/workflows/static-root-checks.yml similarity index 56% rename from packages/react-native-reanimated/.github/workflows/static-root-checks.yml rename to .github/workflows/static-root-checks.yml index a5bb21e7ff4..a36b9d61abc 100644 --- a/packages/react-native-reanimated/.github/workflows/static-root-checks.yml +++ b/.github/workflows/static-root-checks.yml @@ -23,22 +23,34 @@ jobs: - name: Use Node.js uses: actions/setup-node@v4 with: - cache: 'yarn' + cache: "yarn" - name: Clear annotations - run: scripts/clear-annotations.sh - - name: Install node dependencies - run: yarn - - name: Build package + run: .github/workflows/helper/clear-annotations.sh + + - name: Install monorepo node dependencies + run: yarn install + - name: Install Reanimated node dependencies + working-directory: packages/react-native-reanimated + run: yarn install + - name: Build Reanimated package + working-directory: packages/react-native-reanimated run: yarn build + - name: Check types + working-directory: packages/react-native-reanimated run: yarn type:check:all - name: Lint + working-directory: packages/react-native-reanimated run: yarn lint:js - name: Find unused code + working-directory: packages/react-native-reanimated run: yarn find-unused-code:js - name: Find circular dependencies + working-directory: packages/react-native-reanimated run: yarn circular_dependency_check - name: Check use strict + working-directory: packages/react-native-reanimated run: yarn use_strict_check - name: Run jest unit tests + working-directory: packages/react-native-reanimated run: yarn test:unit diff --git a/packages/react-native-reanimated/.github/workflows/tvos-build.yml b/.github/workflows/tvos-build.yml similarity index 68% rename from packages/react-native-reanimated/.github/workflows/tvos-build.yml rename to .github/workflows/tvos-build.yml index 62ce301532e..9aff7240893 100644 --- a/packages/react-native-reanimated/.github/workflows/tvos-build.yml +++ b/.github/workflows/tvos-build.yml @@ -5,12 +5,12 @@ on: pull_request: paths: - .github/workflows/tvos-build.yml - - RNReanimated.podspec - - scripts/reanimated_utils.rb - - apple/** - - Common/** - - TVOSExample/package.json - - TVOSExample/ios/** + - packages/react-native-reanimated/RNReanimated.podspec + - packages/react-native-reanimated/scripts/reanimated_utils.rb + - packages/react-native-reanimated/apple/** + - packages/react-native-reanimated/Common/** + - packages/react-native-reanimated/TVOSExample/package.json + - packages/react-native-reanimated/TVOSExample/ios/** merge_group: branches: - main @@ -19,19 +19,19 @@ on: - main paths: - .github/workflows/tvos-build.yml - - RNReanimated.podspec - - scripts/reanimated_utils.rb - - apple/** - - Common/** - - TVOSExample/package.json - - TVOSExample/ios/** + - packages/react-native-reanimated/RNReanimated.podspec + - packages/react-native-reanimated/scripts/reanimated_utils.rb + - packages/react-native-reanimated/apple/** + - packages/react-native-reanimated/Common/** + - packages/react-native-reanimated/TVOSExample/package.json + - packages/react-native-reanimated/TVOSExample/ios/** jobs: build: if: github.repository == 'software-mansion/react-native-reanimated' runs-on: macos-14 env: - WORKING_DIRECTORY: TVOSExample + WORKING_DIRECTORY: packages/react-native-reanimated/TVOSExample concurrency: group: tvos-${{ github.ref }} cancel-in-progress: true @@ -39,15 +39,19 @@ jobs: - name: Check out Git repository uses: actions/checkout@v4 + - name: Install monorepo node dependencies + run: yarn install + - name: Restore Reanimated node_modules from cache uses: actions/cache@v3 with: - path: node_modules - key: ${{ runner.os }}-tvos-node-modules-reanimated-${{ hashFiles('yarn.lock') }} + path: packages/react-native-reanimated/node_modules + key: ${{ runner.os }}-tvos-node-modules-reanimated-${{ hashFiles('packages/react-native-reanimated/yarn.lock') }} restore-keys: ${{ runner.os }}-tvos-node-modules-reanimated- - name: Install Reanimated node_modules - run: yarn install --immutable + working-directory: packages/react-native-reanimated + run: yarn install - name: Restore app node_modules from cache uses: actions/cache@v3 @@ -58,7 +62,7 @@ jobs: - name: Install app node_modules working-directory: ${{ env.WORKING_DIRECTORY }} - run: yarn install --immutable + run: yarn install - name: Restore Pods from cache uses: actions/cache@v3 diff --git a/.github/workflows/validate-cpp.yml b/.github/workflows/validate-cpp.yml new file mode 100644 index 00000000000..e8c9c815c93 --- /dev/null +++ b/.github/workflows/validate-cpp.yml @@ -0,0 +1,50 @@ +name: Validate C++ +on: + push: + branches: + - main + paths: + - ".github/workflows/validate-cpp.yml" + - "packages/react-native-reanimated/scripts/cpplint.sh" + - "packages/react-native-reanimated/Common/cpp/**" + - "packages/react-native-reanimated/apple/native/**" + - "packages/react-native-reanimated/android/src/main/cpp/**" + pull_request: + paths: + - ".github/workflows/validate-cpp.yml" + - "packages/react-native-reanimated/scripts/cpplint.sh" + - "packages/react-native-reanimated/Common/cpp/**" + - "packages/react-native-reanimated/apple/native/**" + - "packages/react-native-reanimated/android/src/main/cpp/**" + merge_group: + branches: + - main + +jobs: + lint: + if: github.repository == 'software-mansion/react-native-reanimated' + name: cpplint + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.7] + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install python dependencies + run: | + python -m pip install --upgrade pip + pip install cpplint + + - name: Run cpplint + run: | + packages/react-native-reanimated/scripts/cpplint.sh + + - name: Disallow DEBUG macros + run: | + ! egrep -r '(#if DEBUG|#ifdef DEBUG)' packages/react-native-reanimated/Common/cpp/ packages/react-native-reanimated/apple/native/ packages/react-native-reanimated/android/src/main/cpp/ diff --git a/.github/workflows/validate-ios.yml b/.github/workflows/validate-ios.yml new file mode 100644 index 00000000000..835e3d3117c --- /dev/null +++ b/.github/workflows/validate-ios.yml @@ -0,0 +1,37 @@ +name: Validate iOS +env: + YARN_ENABLE_HARDENED_MODE: 0 +on: + push: + branches: + - main + paths: + - ".github/workflows/validate-ios.yml" + - "packages/react-native-reanimated/apple/**" + - "packages/react-native-reanimated/package.json" + - "packages/react-native-reanimated/scripts/validate-ios.sh" + pull_request: + paths: + - ".github/workflows/validate-ios.yml" + - "packages/react-native-reanimated/apple/**" + - "packages/react-native-reanimated/package.json" + - "packages/react-native-reanimated/scripts/validate-ios.sh" + merge_group: + branches: + - main + +jobs: + check: + if: github.repository == 'software-mansion/react-native-reanimated' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Install monorepo nodedependencies + run: yarn install + - name: Install Reanimated node dependencies + working-directory: packages/react-native-reanimated + run: yarn install + - name: Lint iOS + working-directory: packages/react-native-reanimated + run: yarn lint:ios diff --git a/.github/workflows/validate-java.yml b/.github/workflows/validate-java.yml new file mode 100644 index 00000000000..ff0deb533ef --- /dev/null +++ b/.github/workflows/validate-java.yml @@ -0,0 +1,46 @@ +name: Java Lint +env: + YARN_ENABLE_HARDENED_MODE: 0 +on: + pull_request: + paths: + - ".github/workflows/validate-java.yml" + - "packages/react-native-reanimated/android/src/main/java/**" + - "packages/react-native-reanimated/android/build.gradle" + merge_group: + branches: + - main + push: + branches: + - main + paths: + - ".github/workflows/validate-java.yml" + - "packages/react-native-reanimated/android/src/main/java/**" + - "packages/react-native-reanimated/android/build.gradle" + +jobs: + check: + if: github.repository == 'software-mansion/react-native-reanimated' + runs-on: ubuntu-latest + concurrency: + group: validate-java-${{ github.ref }} + cancel-in-progress: true + steps: + - name: checkout + uses: actions/checkout@v4 + - name: Use Node.js + uses: actions/setup-node@v4 + with: + cache: "yarn" + - name: Clear annotations + run: .github/workflows/helper/clear-annotations.sh + + - name: Install monorepo node dependencies + run: yarn install + - name: Install Reanimated node dependencies + working-directory: packages/react-native-reanimated + run: yarn + + - name: Lint Java + working-directory: packages/react-native-reanimated + run: yarn lint:java diff --git a/packages/react-native-reanimated/.github/workflows/validate-plugin.yml b/.github/workflows/validate-plugin.yml similarity index 57% rename from packages/react-native-reanimated/.github/workflows/validate-plugin.yml rename to .github/workflows/validate-plugin.yml index 8341d531a92..477a26b9f02 100644 --- a/packages/react-native-reanimated/.github/workflows/validate-plugin.yml +++ b/.github/workflows/validate-plugin.yml @@ -4,8 +4,8 @@ env: on: pull_request: paths: - - '.github/workflows/validate-plugin.yml' - - 'plugin/**' + - ".github/workflows/validate-plugin.yml" + - "packages/react-native-reanimated/plugin/**" merge_group: branches: - main @@ -13,8 +13,8 @@ on: branches: - main paths: - - '.github/workflows/validate-plugin.yml' - - 'plugin/**' + - ".github/workflows/validate-plugin.yml" + - "packages/react-native-reanimated/plugin/**" jobs: check: @@ -29,29 +29,34 @@ jobs: - name: Use Node.js uses: actions/setup-node@v4 with: - cache: 'yarn' + cache: "yarn" - name: Clear annotations - run: scripts/clear-annotations.sh + run: .github/workflows/helper/clear-annotations.sh - - name: Install node dependencies + - name: Install monorepo dependencies + run: yarn install --immutable + - name: Install Reanimated node dependencies + working-directory: packages/react-native-reanimated run: yarn install - name: Build package + working-directory: packages/react-native-reanimated run: yarn build - - name: Check types - working-directory: plugin - run: yarn type:check:src - - name: Lint and format - working-directory: plugin - run: yarn lint + - name: Diff id: diff run: git update-index --refresh && git diff-index --quiet HEAD -- - name: Show diff if: failure() && steps.diff.outcome == 'failure' run: git diff + - name: Check types + working-directory: packages/react-native-reanimated + run: yarn type:check:plugin + - name: Lint and format + working-directory: packages/react-native-reanimated + run: yarn lint:plugin - name: Test + working-directory: packages/react-native-reanimated run: yarn jest plugin - - name: Check Example App bundling - working-directory: Example + working-directory: packages/react-native-reanimated/Example run: yarn && yarn react-native bundle --reset-cache --entry-file='App.tsx' --bundle-output='/dev/null' --dev=true --platform='ios' diff --git a/packages/react-native-reanimated/.github/workflows/validate-yarn.yml b/.github/workflows/validate-yarn.yml similarity index 82% rename from packages/react-native-reanimated/.github/workflows/validate-yarn.yml rename to .github/workflows/validate-yarn.yml index 173001cc178..67c9bfb760c 100644 --- a/packages/react-native-reanimated/.github/workflows/validate-yarn.yml +++ b/.github/workflows/validate-yarn.yml @@ -4,9 +4,9 @@ env: on: pull_request: paths: - - '.github/workflows/validate-yarn.yml' - - '**/package.json' - - '**/yarn.lock' + - ".github/workflows/validate-yarn.yml" + - "**/package.json" + - "**/yarn.lock" merge_group: branches: - main @@ -14,9 +14,9 @@ on: branches: - main paths: - - '.github/workflows/validate-yarn.yml' - - '**/package.json' - - '**/yarn.lock' + - ".github/workflows/validate-yarn.yml" + - "**/package.json" + - "**/yarn.lock" jobs: check: @@ -25,14 +25,11 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - - name: Use Node.js uses: actions/setup-node@v4 - - name: Install dependencies - run: yarn - - name: Build package - run: yarn build + - name: Install monorepo dependencies + run: yarn install - name: Get changed files id: changed-files @@ -41,7 +38,6 @@ jobs: files: | **/package.json **/yarn.lock - - name: Get list of changed directories id: changed-dirs run: | @@ -53,7 +49,6 @@ jobs: done ECHOLIST=($(echo "${ECHOLIST[@]}" | tr ' ' '\n' | sort -u | tr '\n' ' ')) echo "dirList=${ECHOLIST[*]}" >> $GITHUB_OUTPUT - - name: Perform yarn install in changed directories working-directory: ${{ github.workspace }} run: | diff --git a/package.json b/package.json index 3a87ce02750..a7713b9af8c 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,6 @@ { "name": "react-native-reanimated-monorepo", + "version": "0.0.0", "packageManager": "yarn@4.1.1", "private": true } diff --git a/packages/react-native-reanimated/.github/workflows/build-release-npm-package-rea2.yml b/packages/react-native-reanimated/.github/workflows/build-release-npm-package-rea2.yml deleted file mode 100644 index 95be6f6c605..00000000000 --- a/packages/react-native-reanimated/.github/workflows/build-release-npm-package-rea2.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: Build release npm package, Reanimated 2 -env: - YARN_ENABLE_HARDENED_MODE: 0 -on: - workflow_dispatch: - -jobs: - call-build-workflow-rea-v2: - if: github.repository == 'software-mansion/react-native-reanimated' - uses: ./.github/workflows/build-npm-package-action.yml - with: - ref: Reanimated2 - upload_binaries: true diff --git a/packages/react-native-reanimated/.github/workflows/validate-cpp.yml b/packages/react-native-reanimated/.github/workflows/validate-cpp.yml deleted file mode 100644 index 354693e08fc..00000000000 --- a/packages/react-native-reanimated/.github/workflows/validate-cpp.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: Validate C++ -on: - push: - branches: - - main - paths: - - '.github/workflows/validate-cpp.yml' - - 'scripts/cpplint.sh' - - 'Common/cpp/**' - - 'apple/native/**' - - 'android/src/main/cpp/**' - pull_request: - paths: - - '.github/workflows/validate-cpp.yml' - - 'scripts/cpplint.sh' - - 'Common/cpp/**' - - 'apple/native/**' - - 'android/src/main/cpp/**' - merge_group: - branches: - - main - -jobs: - lint: - if: github.repository == 'software-mansion/react-native-reanimated' - name: cpplint - runs-on: ubuntu-latest - strategy: - matrix: - python-version: [3.7] - - steps: - - uses: actions/checkout@v4 - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install cpplint - - - name: Run cpplint - run: | - scripts/cpplint.sh - - - name: Disallow DEBUG macros - run: | - ! egrep -r '(#if DEBUG|#ifdef DEBUG)' Common/cpp apple android/src/main/cpp diff --git a/packages/react-native-reanimated/.github/workflows/validate-ios.yml b/packages/react-native-reanimated/.github/workflows/validate-ios.yml deleted file mode 100644 index 24913c5d850..00000000000 --- a/packages/react-native-reanimated/.github/workflows/validate-ios.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Validate iOS -env: - YARN_ENABLE_HARDENED_MODE: 0 -on: - push: - branches: - - main - paths: - - '.github/workflows/validate-ios.yml' - - 'apple/**' - - 'package.json' - - 'scripts/validate-ios.sh' - pull_request: - paths: - - '.github/workflows/validate-ios.yml' - - 'apple/**' - - 'package.json' - - 'scripts/validate-ios.sh' - merge_group: - branches: - - main - -jobs: - check: - if: github.repository == 'software-mansion/react-native-reanimated' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Install dependencies - run: yarn - - name: Lint iOS - run: yarn lint:ios diff --git a/packages/react-native-reanimated/.github/workflows/validate-java.yml b/packages/react-native-reanimated/.github/workflows/validate-java.yml deleted file mode 100644 index 9a2eea363cd..00000000000 --- a/packages/react-native-reanimated/.github/workflows/validate-java.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Java Lint -env: - YARN_ENABLE_HARDENED_MODE: 0 -on: - pull_request: - paths: - - '.github/workflows/validate-java.yml' - - 'android/src/main/java/**' - - 'android/build.gradle' - merge_group: - branches: - - main - push: - branches: - - main - paths: - - '.github/workflows/validate-java.yml' - - 'android/src/main/java/**' - - 'android/build.gradle' - -jobs: - check: - if: github.repository == 'software-mansion/react-native-reanimated' - runs-on: ubuntu-latest - concurrency: - group: validate-java-${{ github.ref }} - cancel-in-progress: true - steps: - - name: checkout - uses: actions/checkout@v4 - - name: Use Node.js - uses: actions/setup-node@v4 - with: - cache: 'yarn' - - name: Clear annotations - run: scripts/clear-annotations.sh - - - name: Install node dependencies - run: yarn - - name: Lint - run: yarn lint:java diff --git a/packages/react-native-reanimated/docs/src/components/InteractiveExample/useDecayPlayground/Example.tsx b/packages/react-native-reanimated/docs/src/components/InteractivePlayground/useDecayPlayground/Example.tsx similarity index 100% rename from packages/react-native-reanimated/docs/src/components/InteractiveExample/useDecayPlayground/Example.tsx rename to packages/react-native-reanimated/docs/src/components/InteractivePlayground/useDecayPlayground/Example.tsx diff --git a/packages/react-native-reanimated/docs/src/components/InteractiveExample/useDecayPlayground/index.tsx b/packages/react-native-reanimated/docs/src/components/InteractivePlayground/useDecayPlayground/index.tsx similarity index 100% rename from packages/react-native-reanimated/docs/src/components/InteractiveExample/useDecayPlayground/index.tsx rename to packages/react-native-reanimated/docs/src/components/InteractivePlayground/useDecayPlayground/index.tsx diff --git a/packages/react-native-reanimated/docs/src/components/InteractiveExample/useRepeatPlayground/Example.tsx b/packages/react-native-reanimated/docs/src/components/InteractivePlayground/useRepeatPlayground/Example.tsx similarity index 100% rename from packages/react-native-reanimated/docs/src/components/InteractiveExample/useRepeatPlayground/Example.tsx rename to packages/react-native-reanimated/docs/src/components/InteractivePlayground/useRepeatPlayground/Example.tsx diff --git a/packages/react-native-reanimated/docs/src/components/InteractiveExample/useRepeatPlayground/index.tsx b/packages/react-native-reanimated/docs/src/components/InteractivePlayground/useRepeatPlayground/index.tsx similarity index 100% rename from packages/react-native-reanimated/docs/src/components/InteractiveExample/useRepeatPlayground/index.tsx rename to packages/react-native-reanimated/docs/src/components/InteractivePlayground/useRepeatPlayground/index.tsx diff --git a/packages/react-native-reanimated/package.json b/packages/react-native-reanimated/package.json index 39387d9330b..4f18dd5d0d3 100644 --- a/packages/react-native-reanimated/package.json +++ b/packages/react-native-reanimated/package.json @@ -30,7 +30,7 @@ "type:check:tests:0.72+": "./scripts/test-ts.sh __typetests__/0.72+", "type:check:tests:legacy": "./scripts/test-ts.sh __typetests__/legacy", "type:check:all": "yarn type:check:src && yarn type:check:plugin && ./scripts/test-ts.sh app/src/App.tsx __typetests__/common __typetests__/0.72+ __typetests__/legacy", - "build": "yarn build:plugin && bob build && husky install && yarn build:app", + "build": "yarn build:plugin && bob build && yarn build:app", "build:app": "cd app && yarn install && yarn build", "build:plugin": "cd plugin && yarn install && yarn build", "circular_dependency_check": "yarn madge --extensions js,ts,tsx --circular src lib",