Skip to content
Merged
Show file tree
Hide file tree
Changes from 93 commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
409fdc5
move github actions to root
tjzel May 8, 2024
079dc5b
fix android-build, validate-plugin, validate-yarn
tjzel May 8, 2024
d9f70d8
move annotation script and fix validators
tjzel May 8, 2024
4ee2a88
remove husky install step
tjzel May 8, 2024
19b2146
fix some validations and handle static checks
tjzel May 8, 2024
9487686
fix path for annotations
tjzel May 8, 2024
6cbe745
fix detect-borken-ulrs and check-ts-react-native
tjzel May 8, 2024
5260887
remove hardened mode flag for monorepo build
tjzel May 8, 2024
06ecd2d
fix docs-check and check-static-framework-nightly
tjzel May 8, 2024
70c56cd
fix build-next-example
tjzel May 8, 2024
bf0177c
fix more
tjzel May 8, 2024
62b8c3e
fix more
tjzel May 8, 2024
3d78462
more fixes
tjzel May 8, 2024
1e01e42
trying to fix some yarn.lock issues
tjzel May 8, 2024
e3d4b0d
lets see
tjzel May 8, 2024
6a32c82
disable hardened mode for v8
tjzel May 8, 2024
48c9d0c
v8 and monorepo are naughty
tjzel May 8, 2024
0a7576a
one more
tjzel May 8, 2024
818291e
testing
tjzel May 8, 2024
dfbf55b
testing v2
tjzel May 8, 2024
830c680
not sure what fails
tjzel May 8, 2024
cdaf155
yarn.lock ikd
tjzel May 8, 2024
7edb9f2
more debugging
tjzel May 8, 2024
f7dedbe
its starting to be painful
tjzel May 8, 2024
9f39505
corepack help
tjzel May 8, 2024
4bd7e9e
even more debugging
tjzel May 8, 2024
975099b
cleanup
tjzel May 9, 2024
58942ff
init
tjzel May 9, 2024
2ff1898
mergele upstream
tjzel May 9, 2024
e0126cf
mergele upstream
tjzel May 9, 2024
a84e67a
init
tjzel May 9, 2024
6606330
remove deps
tjzel May 9, 2024
67cb365
mergele upstream
tjzel May 9, 2024
02e5fdc
yarn.lock
tjzel May 9, 2024
b041080
init
tjzel May 9, 2024
4a33b72
only paper example for now
tjzel May 10, 2024
336ab36
fix CI
tjzel May 10, 2024
fd7b53f
fin
tjzel May 13, 2024
4c7bc69
favicon
tjzel May 13, 2024
da53c01
cleanup
tjzel May 13, 2024
4146ed6
cleanup v2
tjzel May 13, 2024
b85a590
many good change
tjzel May 14, 2024
78f2ecf
close to fin
tjzel May 15, 2024
b974616
fin moving
tjzel May 15, 2024
bad7524
debug
tjzel May 15, 2024
af3f94c
fin
tjzel May 15, 2024
b0cd46b
next works
tjzel May 15, 2024
9795ba8
done macOS
tjzel May 17, 2024
d56d000
mergele main
tjzel May 17, 2024
2b53648
Merge branch '@tjzel/monorepo' into @tjzel/monorepo-github-actions
tjzel May 17, 2024
bfeba89
Merge branch '@tjzel/monorepo' into @tjzel/monorepo-github-actions
tjzel May 17, 2024
e6b2ddd
fix plugin lint
tjzel May 17, 2024
a609884
mergele upstream
tjzel May 17, 2024
5633d52
mergele upstream
tjzel May 17, 2024
6a02ee6
mergele upstream
tjzel May 17, 2024
1dc8f74
rename
tjzel May 17, 2024
29cb135
create apps
tjzel May 17, 2024
692e079
add version for monorepo
tjzel May 17, 2024
80de4f8
mergele upstream
tjzel May 17, 2024
721537b
move to apps
tjzel May 17, 2024
9e2715f
remove duplicate app
tjzel May 17, 2024
b1cb47b
package jsons
tjzel May 20, 2024
1222399
Merge branch '@tjzel/monorepo-github-actions' into @tjzel/monorepo-hu…
tjzel May 20, 2024
41f54d1
add build script
tjzel May 20, 2024
d0e88a8
touch more CIs
tjzel May 20, 2024
6cabace
huh
tjzel May 20, 2024
a173b6d
npm package
tjzel May 20, 2024
4a4cd1b
remove rea2
tjzel May 20, 2024
4b7f8eb
Merge branch '@tjzel/monorepo' into @tjzel/monorepo-github-actions
tjzel May 29, 2024
d3d023d
Merge branch '@tjzel/monorepo-github-actions' into @tjzel/monorepo-hu…
tjzel May 29, 2024
dfae9eb
Merge branch '@tjzel/monorepo-husky-and-precommit' into @tjzel/monore…
tjzel May 29, 2024
fa9dd19
Merge branch '@tjzel/monorepo-make-reanimated-a-workspace' into @tjze…
tjzel May 29, 2024
24a3efe
fix
tjzel May 29, 2024
b20c1ce
Merge branch '@tjzel/monorepo-make-reanimated-a-workspace' into @tjze…
tjzel May 29, 2024
c8a4cab
fix
tjzel May 29, 2024
77c7eb9
Merge branch '@tjzel/monorepo-github-actions' into @tjzel/monorepo-hu…
tjzel May 29, 2024
e9e8df6
Merge branch '@tjzel/monorepo-husky-and-precommit' into @tjzel/monore…
tjzel May 29, 2024
767119e
Merge branch '@tjzel/monorepo-make-reanimated-a-workspace' into @tjze…
tjzel May 29, 2024
14cd18d
Merge branch '@tjzel/monorepo-webexample' into @tjzel/monorepo-configs
tjzel May 29, 2024
56ed840
rm
tjzel May 29, 2024
4174334
another successful config
tjzel Jun 1, 2024
f30730f
Merge branch '@tjzel/monorepo' into @tjzel/monorepo-husky-and-precommit
tjzel Jun 1, 2024
d88f930
Merge branch '@tjzel/monorepo-husky-and-precommit' into @tjzel/monore…
tjzel Jun 1, 2024
0adc59f
Merge branch '@tjzel/monorepo-make-reanimated-a-workspace' into @tjze…
tjzel Jun 1, 2024
17bc43f
Merge branch '@tjzel/monorepo-webexample' into @tjzel/monorepo-configs
tjzel Jun 1, 2024
bd8fc47
Merge branch '@tjzel/monorepo-configs' into @tjzel/monorepo-fabric
tjzel Jun 1, 2024
e817f69
unify naming
tjzel Jun 1, 2024
3192243
Merge branch '@tjzel/monorepo-fabric' into @tjzel/monorepo-next
tjzel Jun 1, 2024
cb800a2
move
tjzel Jun 1, 2024
cc0c605
Merge branch '@tjzel/monorepo-next' into @tjzel/monorepo-macos
tjzel Jun 2, 2024
75f74ad
move to macos-example
tjzel Jun 2, 2024
5eefdf8
unify
tjzel Jun 2, 2024
704f8e7
Fix path to package.json
piaskowyk Jun 5, 2024
3679bf6
Merge branch '@tjzel/monorepo' into @tjzel/monorepo-macos
tjzel Jun 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
85 changes: 85 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
module.exports = {
root: true,
overrides: [
{
files: ['*.ts', '*.tsx'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: true,
tsconfigRootDir: __dirname,
},
extends: ['plugin:@typescript-eslint/recommended-type-checked'],
plugins: ['eslint-plugin-tsdoc'],
rules: {
'tsdoc/syntax': 'error',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-argument': 'off',
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/ban-ts-comment': [
'error',
{
'ts-ignore': 'allow-with-description',
'ts-expect-error': 'allow-with-description',
},
],
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_' },
],
'@typescript-eslint/no-var-requires': 'warn',
'@typescript-eslint/consistent-type-imports': [
'error',
{ prefer: 'type-imports' },
],
'@typescript-eslint/consistent-type-exports': [
'error',
{ fixMixedExportsWithInlineTypeSpecifier: false },
],
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-duplicate-type-constituents': 'error',
'@typescript-eslint/no-shadow': 'error',
},
},
],
parserOptions: {
requireConfigFile: false,
},
extends: [
'standard',
'prettier',
'plugin:import/typescript',
'plugin:react-hooks/recommended',
],
plugins: ['react', 'react-native', 'import', 'jest', '@typescript-eslint'],
env: {
'react-native/react-native': true,
'jest/globals': true,
},
settings: {
'import/resolver': {
'babel-module': {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
},
rules: {
'object-shorthand': 'error',
curly: ['error', 'all'],
'no-case-declarations': 'error',
'import/no-unresolved': 'error',
'import/consistent-type-specifier-style': ['error', 'prefer-top-level'],
'react/jsx-uses-vars': 'error',
'react/jsx-uses-react': 'error',
'no-use-before-define': 'off',
eqeqeq: 'error',
'no-unreachable': 'error',
'jest/no-disabled-tests': 'warn',
'jest/no-focused-tests': 'error',
'jest/no-identical-title': 'error',
'jest/prefer-to-have-length': 'warn',
'jest/valid-expect': 'error',
},
};
File renamed without changes.
File renamed without changes.
81 changes: 81 additions & 0 deletions .github/workflows/android-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Test Android build
env:
YARN_ENABLE_HARDENED_MODE: 0
on:
pull_request:
paths:
- .github/workflows/android-build.yml
- packages/react-native-reanimated/android/**
- packages/react-native-reanimated/Common/**
- packages/reanimated-paper-example/package.json
- packages/reanimated-paper-example/android/**
- packages/react-native-reanimated/FabricExample/package.json
- packages/react-native-reanimated/FabricExample/android/**
merge_group:
branches:
- main
push:
branches:
- main
paths:
- .github/workflows/android-build.yml
- packages/react-native-reanimated/android/**
- packages/react-native-reanimated/Common/**
- packages/reanimated-paper-example/package.json
- packages/reanimated-paper-example/android/**
- packages/react-native-reanimated/FabricExample/package.json
- packages/react-native-reanimated/FabricExample/android/**

jobs:
build:
if: github.repository == 'software-mansion/react-native-reanimated'
runs-on: ubuntu-latest
strategy:
matrix:
working-directory:
[
packages/reanimated-paper-example,
packages/react-native-reanimated/FabricExample,
]
fail-fast: false
concurrency:
group: android-${{ matrix.working-directory }}-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Check out Git repository
uses: actions/checkout@v4

- name: Install dependencies in root
run: yarn install

- name: Setup Java 17
uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: 17

- name: Restore Reanimated node_modules from cache
uses: actions/cache@v3
with:
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

- name: Restore app node_modules from cache
uses: actions/cache@v3
with:
path: ${{ matrix.working-directory }}/node_modules
key: ${{ runner.os }}-android-node-modules-${{ matrix.working-directory }}-${{ hashFiles(format('{0}/yarn.lock', matrix.working-directory)) }}
restore-keys: ${{ runner.os }}-android-node-modules-${{ matrix.working-directory }}-

- name: Install app node_modules
working-directory: ${{ matrix.working-directory }}
run: yarn install

- name: Build app
working-directory: ${{ matrix.working-directory }}/android
run: ./gradlew assembleDebug --build-cache -PreactNativeArchitectures=arm64-v8a
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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:
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/build-next-example.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build/test NextExample
env:
YARN_ENABLE_HARDENED_MODE: 0
on:
pull_request:
paths:
- .github/workflows/build-next-example.yml
- "packages/react-native-reanimated/src/**"
- "packages/react-native-reanimated/NextExample/**"
push:
branches:
- main

jobs:
check:
runs-on: ubuntu-latest
concurrency:
group: build-next-example-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Checkout Git repository
uses: actions/checkout@v4
- name: Install monorepo node dependencies
run: yarn install --immutable
- 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: packages/react-native-reanimated/NextExample
run: yarn install --immutable

- name: Compile production build
working-directory: packages/react-native-reanimated/NextExample
run: yarn build

- name: Run e2e tests
working-directory: packages/react-native-reanimated/NextExample
run: yarn e2e:headless
83 changes: 83 additions & 0 deletions .github/workflows/build-npm-package-action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Build npm package
env:
YARN_ENABLE_HARDENED_MODE: 0
on:
workflow_call:
inputs:
option:
required: false
type: string
ref:
required: false
type: string
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:
if: github.repository == 'software-mansion/react-native-reanimated'
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- name: Clear annotations
run: .github/workflows/helper/clear-annotations.sh

- name: Build package
working-directory: packages/react-native-reanimated
id: build
run: >-
./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/.+" 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/.+" build.log

- 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: "packages/react-native-reanimated/${{ env.PACKAGE_NAME }}"

- run: npm publish $PACKAGE_NAME --tag nightly
if: ${{ inputs.publish_on_npm }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
60 changes: 60 additions & 0 deletions .github/workflows/check-TS-react-native.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Check TypeScript with different React Native versions
env:
YARN_ENABLE_HARDENED_MODE: 0
on:
pull_request:
paths:
- .github/workflows/check-TS-react-native.yml
schedule:
- cron: "37 19 * * *"
workflow_dispatch:

jobs:
run:
if: github.repository == 'software-mansion/react-native-reanimated'
runs-on: ubuntu-latest
strategy:
matrix:
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 }}
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 install
- 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+
Loading