Skip to content

Commit fff3181

Browse files
committed
merge
1 parent fd57422 commit fff3181

440 files changed

Lines changed: 9804 additions & 10727 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintrc.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"project": ["./tsconfig.json"]
1717
},
1818
"env": { "browser": true, "node": true, "jest/globals": true },
19-
"plugins": ["react", "jest"],
19+
"plugins": ["react", "jest", "simple-import-sort"],
2020
"ignorePatterns": [
2121
"packages/react-native-gesture-handler/lib/**/*",
2222
"**/*.config.js",
@@ -43,6 +43,8 @@
4343
"@typescript-eslint/no-unsafe-return": "warn",
4444
"@typescript-eslint/no-non-null-assertion": "warn",
4545
"@typescript-eslint/ban-types": "warn",
46+
"@typescript-eslint/consistent-type-imports": "error",
47+
"@typescript-eslint/consistent-type-exports": "error",
4648

4749
// common
4850
"@typescript-eslint/explicit-module-boundary-types": "off",
@@ -85,6 +87,8 @@
8587
],
8688
"curly": "error",
8789
"spaced-comment": "error",
88-
"no-alert": "warn"
90+
"no-alert": "warn",
91+
"simple-import-sort/imports": "error",
92+
"simple-import-sort/exports": "error"
8993
}
9094
}

AGENTS.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# react-native-gesture-handler library
2+
3+
## Project structure
4+
5+
- This project has monorepo structure.
6+
- It contains both, library (`/packages/react-native-gesture-handler`) and documentation (/packages/docs-gesture-handler).
7+
- It is multiplatform. Library supports android, iOS, web and macos.
8+
- Android codebase is located in `/packages/react-native-gesture-handler/android` directory. iOS and macos in `/packages/react-native-gesture-handler/apple`. Web can be found in `/packages/react-native-gesture-handler/src/web`.
9+
- Some files are platform specific. Those have platform in the file extension, e.g. `RNGestureHandlerModule.web.ts`
10+
11+
### Example apps
12+
13+
- Example apps are located in `/apps` directory
14+
- `basic-example` is mostly used to check that android and iOS build correctly.
15+
- `expo-example` is used to test more advanced examples. Sources are located in `apps/common-app`.
16+
- `macos-example` is used to check if library works on macos. Sources are located in `apps/common-app`.
17+
18+
### Packages
19+
20+
- `/packages` contains documentation and main library package
21+
- This project contains 3 versions of API. The newest is located in `packages/react-native-gesture-handler/src/v3` directory. Most of the logic is shared, but make sure that your changes do not break older APIs.
22+
- When writing code, you can use `usesNativeOrVirtualDetector` function to either include only, or exclude new API v3. It is available on all platforms.
23+
24+
## Build checks
25+
26+
- To check Android build go to `apps/basic-example` and run `yarn android` command.
27+
- To check iOS build, go to `apps/basic-example` and run `yarn ios`.
28+
- To check macos build, go to `apps/macos-example` and run `yarn macos`.
29+
- After any build on macOS/Linux stop the Metro server with `for pid in $(lsof -ti :8081); do kill "$pid"; done` (this no-ops cleanly when nothing is listening on port 8081; `pkill -f "metro"` is not sufficient)
30+
31+
## JavaScript checks
32+
33+
- To run TypeScript checks use `yarn ts-check` command. You can run it directly in `packages/react-native-gesture-handler` if working on package, or from root of the repository.
34+
- To run Jest tests, use `yarn test` command in `packages/react-native-gesture-handler`. You can also pass filename to run tests from specific file.
35+
- To run eslint check, use `yarn lint:js`
36+
37+
## Formatting
38+
39+
- To format code use use `yarn format:{apple | android | js}`. `apple` works for both, iOS and macos.

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
AGENTS.md

apps/basic-example/Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ gem 'bigdecimal'
1414
gem 'logger'
1515
gem 'benchmark'
1616
gem 'mutex_m'
17+
gem 'nkf'

apps/basic-example/Gemfile.lock

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,20 @@ GEM
55
base64
66
nkf
77
rexml
8-
activesupport (7.1.5.1)
8+
activesupport (7.2.3.1)
99
base64
1010
benchmark (>= 0.3)
1111
bigdecimal
12-
concurrent-ruby (~> 1.0, >= 1.0.2)
12+
concurrent-ruby (~> 1.0, >= 1.3.1)
1313
connection_pool (>= 2.2.5)
1414
drb
1515
i18n (>= 1.6, < 2)
1616
logger (>= 1.4.2)
17-
minitest (>= 5.1)
18-
mutex_m
17+
minitest (>= 5.1, < 6)
1918
securerandom (>= 0.3)
20-
tzinfo (~> 2.0)
21-
addressable (2.8.7)
22-
public_suffix (>= 2.0.2, < 7.0)
19+
tzinfo (~> 2.0, >= 2.0.5)
20+
addressable (2.9.0)
21+
public_suffix (>= 2.0.2, < 8.0)
2322
algoliasearch (1.27.5)
2423
httpclient (~> 2.8, >= 2.8.3)
2524
json (>= 1.5.1)
@@ -67,7 +66,7 @@ GEM
6766
cocoapods-try (1.2.0)
6867
colored2 (3.1.2)
6968
concurrent-ruby (1.3.3)
70-
connection_pool (2.5.3)
69+
connection_pool (3.0.2)
7170
drb (2.2.3)
7271
escape (0.0.4)
7372
ethon (0.16.0)
@@ -78,21 +77,21 @@ GEM
7877
gh_inspector (1.1.3)
7978
httpclient (2.9.0)
8079
mutex_m
81-
i18n (1.14.7)
80+
i18n (1.14.8)
8281
concurrent-ruby (~> 1.0)
8382
json (2.12.2)
8483
logger (1.7.0)
85-
minitest (5.25.5)
84+
minitest (5.27.0)
8685
molinillo (0.8.0)
8786
mutex_m (0.3.0)
8887
nanaimo (0.3.0)
8988
nap (1.1.0)
9089
netrc (0.11.0)
9190
nkf (0.2.0)
9291
public_suffix (4.0.7)
93-
rexml (3.4.1)
92+
rexml (3.4.2)
9493
ruby-macho (2.5.1)
95-
securerandom (0.3.2)
94+
securerandom (0.4.1)
9695
typhoeus (1.4.1)
9796
ethon (>= 0.9.0)
9897
tzinfo (2.0.6)
@@ -116,6 +115,7 @@ DEPENDENCIES
116115
concurrent-ruby (< 1.3.4)
117116
logger
118117
mutex_m
118+
nkf
119119
xcodeproj (< 1.26.0)
120120

121121
RUBY VERSION
718 Bytes
Binary file not shown.

apps/basic-example/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

apps/basic-example/android/gradlew

Lines changed: 0 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/basic-example/android/gradlew.bat

Lines changed: 1 addition & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/basic-example/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
*/
44

55
import { AppRegistry } from 'react-native';
6-
import App from './src/App';
6+
77
import { name as appName } from './app.json';
8+
import App from './src/App';
89

910
AppRegistry.registerComponent(appName, () => App);

0 commit comments

Comments
 (0)