Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
fc8e50d
Move config files
m-bert Apr 11, 2025
1de55d5
Test
m-bert Apr 14, 2025
baca7e6
Test2
m-bert Apr 14, 2025
cedad03
Update package.json
m-bert Apr 14, 2025
d7c340a
Fix husky path
m-bert Apr 14, 2025
ea00daa
Fix one CI
m-bert Apr 14, 2025
2c176ce
Bring back old versions
m-bert Apr 14, 2025
a49ffca
update lockfile
m-bert Apr 14, 2025
4ec5f5f
Add working dir to circular dependency check
m-bert Apr 14, 2025
c66dd04
Add BasicExample app
m-bert Apr 18, 2025
47f671e
Add husky to root package.json
m-bert Apr 18, 2025
0b0c540
Merge branch '@mbert/monorepo-move-config-files' into @mbert/monorepo…
m-bert Apr 18, 2025
697ed7d
Remove unused variable
m-bert Apr 18, 2025
6b92cb5
It works :o
m-bert Apr 18, 2025
cf20fc5
Add web
m-bert Apr 22, 2025
646409b
Add basic MacOSExample
m-bert Apr 24, 2025
ab7afd4
Change tsconfig
m-bert Apr 24, 2025
89a7544
Remove android and ios dirs
m-bert Apr 24, 2025
a6711c8
Add basic examples
m-bert Apr 24, 2025
958de88
Add CommonApp
m-bert Apr 24, 2025
f905eab
Use CommonApp in ExpoExample
m-bert Apr 24, 2025
3fbed8b
Update package.json and yarn.lock
m-bert Apr 24, 2025
f6f6dd4
Add CommonApp to macos
m-bert Apr 24, 2025
ac136e8
Update yarn.lock
m-bert Apr 25, 2025
7da0eb6
Android build CI
m-bert Apr 25, 2025
852a242
Docs CI
m-bert Apr 25, 2025
77d865b
iOS build
m-bert Apr 25, 2025
f6426b6
Kotlin lint CI
m-bert Apr 25, 2025
558e380
macos CI
m-bert Apr 25, 2025
b399724
main CI
m-bert Apr 25, 2025
e787855
static-examples
m-bert Apr 25, 2025
feac1df
static root
m-bert Apr 25, 2025
69f8b28
Fix workspace script
m-bert Apr 29, 2025
d130de3
Update yarn.lock
m-bert Apr 30, 2025
9512329
Bump reanimated
m-bert Apr 30, 2025
63c41a9
Bump safe-area-context
m-bert Apr 30, 2025
ee61690
Merge @mbert/monorepo-add-expo-example
m-bert Apr 30, 2025
54f70ea
Bump reanimated
m-bert Apr 30, 2025
b78aa63
Merge branch '@mbert/monorepo-add-macos-example' into @mbert/monorepo…
m-bert Apr 30, 2025
d35fd12
update locks
m-bert Apr 30, 2025
705d634
Merge branch '@mbert/monorepo-add-common-app' into @mbert/monorepo-fi…
m-bert Apr 30, 2025
ade521b
Update eslint
m-bert Apr 30, 2025
83fb405
BasicExample
m-bert Apr 30, 2025
8e0e4ce
CommonApp
m-bert Apr 30, 2025
8c3aa12
Package
m-bert Apr 30, 2025
41cca92
Add eslint scripts
m-bert Apr 30, 2025
cb70d7a
Update typescript
m-bert Apr 30, 2025
16c2bad
Fix ts-checks
m-bert Apr 30, 2025
0ade444
Update workflows
m-bert Apr 30, 2025
352828c
Fix faulty script in CIs
m-bert Apr 30, 2025
9b845bd
Disable promise rule
m-bert Apr 30, 2025
499d751
Add format-js
m-bert May 5, 2025
57c7109
Add global scripts for lint and format js
m-bert May 5, 2025
96de4ea
Fix android formatter paths
m-bert May 5, 2025
1708929
Add lint-staged config
m-bert May 5, 2025
af1663e
Remove unnecessary eslint comment
m-bert May 5, 2025
6b3c8af
Remove another comment
m-bert May 5, 2025
fed3ee5
Mergele @mbert/monorepo
m-bert May 7, 2025
8ce355c
Take out the trash
m-bert May 7, 2025
7b585ac
Extract gesture handler path to env
m-bert May 7, 2025
d6fdb27
Add expo app to CI
m-bert May 7, 2025
e87d619
Add empty postinstall
m-bert May 7, 2025
d7fb585
Mergele @mbert/monorepo-fix-CI-paths
m-bert May 7, 2025
ae4cfd9
Install pods conditionally
m-bert May 7, 2025
82ef8e4
Merge branch '@mbert/monorepo-fix-CI-paths' into @mbert/monorepo-unif…
m-bert May 7, 2025
760f6d8
Move scripts dir to root
m-bert May 7, 2025
f1fcc1a
Bring back clangd support
m-bert May 7, 2025
42341fe
Fix android formatter path
m-bert May 7, 2025
2868235
Fix codegen scripts paths
m-bert May 7, 2025
61d78c9
Mergele @mbert/monorepo
m-bert May 8, 2025
ca5aba3
Remove postinstall script
m-bert May 8, 2025
18ce1a6
Use - scripts in : scripts :)
m-bert May 8, 2025
ad33f84
Make scripts global
m-bert May 8, 2025
995e863
Merge @mbert/monorepo-unify-eslint-configs
m-bert May 8, 2025
e0da04b
Fix CI path
m-bert May 8, 2025
76f9677
Fix lintstaged path
m-bert May 8, 2025
59c7f57
Mergele @mbert/monorepo
m-bert May 9, 2025
dfb7d9a
Fix paths
m-bert May 9, 2025
cd22d2f
Bring back old scripts
m-bert May 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/check-archs-consistency.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Test consistency between Paper & Fabric
on:
on:
pull_request:
branches:
- main
paths:
- src/specs/**
- package.json
- FabricExample/package.json
paths:
- packages/react-native-gesture-handler/src/specs/**
- packages/react-native-gesture-handler/package.json
- apps/BasicExample/package.json
- .github/workflows/check-archs-consistency.yml
push:
branches:
Expand Down
1 change: 1 addition & 0 deletions apps/BasicExample/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ buildscript {
targetSdkVersion = 35
ndkVersion = "27.1.12297006"
kotlinVersion = "2.0.21"
isGHExampleApp = true
}
repositories {
google()
Expand Down
12 changes: 12 additions & 0 deletions apps/BasicExample/ios/BasicExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@
00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */,
E235C05ADACE081382539298 /* [CP] Copy Pods Resources */,
ABE402381D8D852B65E3CE39 /* [CP-User] Generate metadata for clangd */,
);
buildRules = (
);
Expand Down Expand Up @@ -200,6 +201,17 @@
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-BasicExample/Pods-BasicExample-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
ABE402381D8D852B65E3CE39 /* [CP-User] Generate metadata for clangd */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = true;
buildActionMask = 2147483647;
files = (
);
name = "[CP-User] Generate metadata for clangd";
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/bash;
shellScript = "../../../scripts/clangd-generate-xcode-metadata.sh";
};
C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
Expand Down
6 changes: 6 additions & 0 deletions apps/BasicExample/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ require Pod::Executable.execute_command('node', ['-p',
{paths: ["../../../node_modules"]},
)', __dir__]).strip

require_relative '../../../scripts/clangd-add-xcode-step.rb'

ENV['GH_EXAMPLE_APP_NAME'] = 'BasicExample'

platform :ios, min_ios_version_supported
prepare_react_native_project!

Expand Down Expand Up @@ -32,4 +36,6 @@ target 'BasicExample' do
# :ccache_enabled => true
)
end

add_clangd_generation_step()
end
4 changes: 2 additions & 2 deletions apps/BasicExample/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1975,10 +1975,10 @@ SPEC CHECKSUMS:
ReactAppDependencyProvider: 7f5052913dd72a0e84ca95973f9f8bc97f2c5b95
ReactCodegen: 53255e388b7795d02b299466a6f7187241326eaa
ReactCommon: 1257efa9d0b07517d8b79bb4055eaefac1204807
RNGestureHandler: ebef699ea17e7c0006c1074e1e423ead60ce0121
RNGestureHandler: 95c4fe88f8fa10a891089521e7b2666db04b78c1
SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748
Yoga: 9773f1327b258fa449988c2e42fbb7cbdf655d96

PODFILE CHECKSUM: e9e3197f07e082a650d4514e32e5232f446b111a
PODFILE CHECKSUM: d05778d3a61b8d49242579ea0aa864580fbb1f64

COCOAPODS: 1.15.2
12 changes: 12 additions & 0 deletions apps/MacOSExample/macos/MacOSExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@
514201472437B4B30078DB4F /* Resources */,
381D8A6E24576A4E00465D17 /* Bundle React Native code and images */,
6D0EC1752E57E7826E33BE11 /* [CP] Copy Pods Resources */,
D01A669245645FE4195DB892 /* [CP-User] Generate metadata for clangd */,
);
buildRules = (
);
Expand Down Expand Up @@ -299,6 +300,17 @@
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-MacOSExample-macOS/Pods-MacOSExample-macOS-resources.sh\"\n";
showEnvVarsInLog = 0;
};
D01A669245645FE4195DB892 /* [CP-User] Generate metadata for clangd */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = true;
buildActionMask = 2147483647;
files = (
);
name = "[CP-User] Generate metadata for clangd";
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/bash;
shellScript = "../../../scripts/clangd-generate-xcode-metadata.sh";
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
Expand Down
5 changes: 5 additions & 0 deletions apps/MacOSExample/macos/Podfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
require_relative '../node_modules/react-native-macos/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
require_relative '../../../scripts/clangd-add-xcode-step.rb'

prepare_react_native_project!

ENV['GH_EXAMPLE_APP_NAME'] = 'MacOSExample'

target 'MacOSExample-macOS' do
platform :macos, '11.0'
use_native_modules!
Expand All @@ -21,4 +24,6 @@ target 'MacOSExample-macOS' do
post_install do |installer|
react_native_post_install(installer)
end

add_clangd_generation_step()
end
4 changes: 2 additions & 2 deletions apps/MacOSExample/macos/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1901,12 +1901,12 @@ SPEC CHECKSUMS:
ReactCodegen: 3d30536e47f328f0a297d897cb789e46a092c2a6
ReactCommon: 0f22e3dd34a8215b8482778898f6e1e95572c498
RNCAsyncStorage: b9f5f78da5d16a853fe3dc22e8268d932fc45a83
RNGestureHandler: 3aebdd5727d76b567572472b9e52c29536ee0eef
RNGestureHandler: b1b622a388c03138550fb5199b7609d01d0aad80
RNReanimated: c48c57d7fd5f78327ecf94dd088e2f6f216e7327
RNSVG: 4c63b12b7b5761063bca4f20dd228f6a8370f614
SocketRocket: 03f7111df1a343b162bf5b06ead333be808e1e0a
Yoga: f89a870053f1a8fbee8c98e35a1b9eff44ce2015

PODFILE CHECKSUM: 5db22613e5e3d56f4fcacb7e9a704e44ec83d7e3
PODFILE CHECKSUM: ba6f2105d3e43bf0ae77356a9afcc8b532e3c306

COCOAPODS: 1.15.2
6 changes: 3 additions & 3 deletions packages/react-native-gesture-handler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
"ts-check": "yarn tsc --noEmit",
"format-js": "prettier --write --list-different './src/**/*.{js,jsx,ts,tsx}'",
"format:js": "yarn format-js",
"format:android": "node ./scripts/format-android.js",
"format:android": "node ../../scripts/format-android.js",
"format:apple": "find apple/ -iname *.h -o -iname *.m -o -iname *.cpp -o -iname *.mm | xargs clang-format -i",
"lint-js": "eslint --ext '.js,.ts,.tsx' src/ && yarn prettier --check './src/**/*.{js,jsx,ts,tsx}'",
"lint:js": "yarn lint-js",
"lint:android": "./android/gradlew -p android spotlessCheck -q",
"circular-dependency-check": "yarn madge --extensions js,ts,tsx --circular src",
"architectures-consistency-check": "node ./scripts/codegen-check-consistency.js",
"sync-architectures": "node ./scripts/codegen-sync-archs.js"
"architectures-consistency-check": "node ../../scripts/codegen-check-consistency.js",
"sync-architectures": "node ../../scripts/codegen-sync-archs.js"
},
"react-native": "src/index.ts",
"main": "lib/commonjs/index.js",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
def add_clangd_generation_step()
generator_script_path = '../../scripts/clangd-generate-xcode-metadata.sh'
generator_script_path = '../../../scripts/clangd-generate-xcode-metadata.sh'

script_phase :name => 'Generate metadata for clangd', :script => generator_script_path, :shell_path => '/bin/bash', :always_out_of_date => 'true', :execution_position => :after_compile
end
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

COMPILE_COMMANDS_PATH="../../compile_commands.json"
COMPILE_COMMANDS_PATH="../../../compile_commands.json"

echo "[" >$COMPILE_COMMANDS_PATH
for f in **/CompilationDatabase/*.json; do cat "$f" >>$COMPILE_COMMANDS_PATH; done
Expand Down
Original file line number Diff line number Diff line change
@@ -1,46 +1,53 @@
const fs = require('fs');
const path = require('path');
const { execSync } = require('child_process');
const packageJSON = require('../package.json');
const packageJSON = require('../packages/react-native-gesture-handler/package.json');

const ERROR_PREFIX = 'react-native-gesture-handler';
const ROOT_DIR = path.resolve(__dirname, '..');
const ROOT_DIR = path.resolve(
__dirname,
'../packages/react-native-gesture-handler'
);
const ANDROID_DIR = path.resolve(ROOT_DIR, 'android');
const GENERATED_DIR = path.resolve(ANDROID_DIR, 'build/generated');
const OLD_ARCH_DIR = path.resolve(ANDROID_DIR, 'paper/src/main');
const SPECS_DIR = path.resolve(ROOT_DIR, packageJSON.codegenConfig.jsSrcsDir);
const PACKAGE_NAME = packageJSON.codegenConfig.android.javaPackageName;
const RN_DIR = path.resolve(ROOT_DIR, 'node_modules/react-native');
const RN_DIR = path.resolve(__dirname, '../node_modules/react-native');
const RN_CODEGEN_DIR = path.resolve(
ROOT_DIR,
'node_modules/@react-native/codegen'
__dirname,
'../node_modules/@react-native/codegen'
);

const SOURCE_FOLDER = 'java/com/facebook/react/viewmanagers';
const GH_SOURCE_FOLDER = 'java/com/swmansion/gesturehandler'
const GH_SOURCE_FOLDER = 'java/com/swmansion/gesturehandler';

const SOURCE_FOLDERS = [
{codegenPath: `${GENERATED_DIR}/source/codegen/${SOURCE_FOLDER}`, oldArchPath: `${OLD_ARCH_DIR}/${SOURCE_FOLDER}`},
{codegenPath: `${GENERATED_DIR}/source/codegen/${GH_SOURCE_FOLDER}`, oldArchPath: `${OLD_ARCH_DIR}/${GH_SOURCE_FOLDER}`},
]

const BLACKLISTED_FILES = new Set([
'ReactContextExtensions.kt',
]);
{
codegenPath: `${GENERATED_DIR}/source/codegen/${SOURCE_FOLDER}`,
oldArchPath: `${OLD_ARCH_DIR}/${SOURCE_FOLDER}`,
},
{
codegenPath: `${GENERATED_DIR}/source/codegen/${GH_SOURCE_FOLDER}`,
oldArchPath: `${OLD_ARCH_DIR}/${GH_SOURCE_FOLDER}`,
},
];

const BLACKLISTED_FILES = new Set(['ReactContextExtensions.kt']);

function exec(command) {
console.log(`[${ERROR_PREFIX}]> ` + command);
execSync(command);
}

function readdirSync(dir) {
return fs.readdirSync(dir).filter(file => !BLACKLISTED_FILES.has(file));
return fs.readdirSync(dir).filter((file) => !BLACKLISTED_FILES.has(file));
}

function fixOldArchJavaForRN72Compat(dir) {
// see https://github.com/rnmapbox/maps/issues/3193
const files = readdirSync(dir);
files.forEach(file => {
files.forEach((file) => {
const filePath = path.join(dir, file);
const fileExtension = path.extname(file);
if (fileExtension === '.java') {
Expand Down Expand Up @@ -82,12 +89,12 @@ async function generateCodegen() {
async function generateCodegenJavaOldArch() {
await generateCodegen();

SOURCE_FOLDERS.forEach(({codegenPath, oldArchPath}) => {
SOURCE_FOLDERS.forEach(({ codegenPath, oldArchPath }) => {
const generatedFiles = readdirSync(codegenPath);
const oldArchFiles = readdirSync(oldArchPath);
const existingFilesSet = new Set(oldArchFiles.map(fileName => fileName));
const existingFilesSet = new Set(oldArchFiles.map((fileName) => fileName));

generatedFiles.forEach(generatedFile => {
generatedFiles.forEach((generatedFile) => {
if (!existingFilesSet.has(generatedFile)) {
console.warn(
`[${ERROR_PREFIX}] ${generatedFile} not found in paper dir, if it's used on Android you need to copy it manually and implement yourself before using auto-copy feature.`
Expand All @@ -101,7 +108,7 @@ async function generateCodegenJavaOldArch() {
);
}

oldArchFiles.forEach(file => {
oldArchFiles.forEach((file) => {
if (!fs.existsSync(`${codegenPath}/${file}`)) {
console.warn(
`[${ERROR_PREFIX}] ${file} file does not exist in codegen artifacts source destination. Please check if you still need this interface/delagete.`
Expand All @@ -127,9 +134,9 @@ function compareFileAtTwoPaths(filename, firstPath, secondPath) {
async function checkCodegenIntegrity() {
await generateCodegen();

SOURCE_FOLDERS.forEach(({codegenPath, oldArchPath}) => {
SOURCE_FOLDERS.forEach(({ codegenPath, oldArchPath }) => {
const oldArchFiles = readdirSync(oldArchPath);
oldArchFiles.forEach(file => {
oldArchFiles.forEach((file) => {
compareFileAtTwoPaths(file, codegenPath, oldArchPath);
});
});
Expand Down
File renamed without changes.
24 changes: 12 additions & 12 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4552,11 +4552,11 @@ __metadata:
linkType: hard

"@types/node@npm:*":
version: 22.15.14
resolution: "@types/node@npm:22.15.14"
version: 22.15.17
resolution: "@types/node@npm:22.15.17"
dependencies:
undici-types: "npm:~6.21.0"
checksum: 10c0/a977c1518d53e3b85e8c56fe619d6eca4bc79224d24e7068f55589b3b4a60b8390c859290068b9a00d8a07bee809535afaa952fc31544dff8f8de8975d94c531
checksum: 10c0/fb92aa10b628683c5b965749f955bc2322485ecb0ea6c2f4cae5f2c7537a16834607e67083a9e9281faaae8d7dee9ada8d6a5c0de9a52c17d82912ef00c0fdd4
languageName: node
linkType: hard

Expand Down Expand Up @@ -7504,9 +7504,9 @@ __metadata:
linkType: hard

"electron-to-chromium@npm:^1.5.149":
version: 1.5.150
resolution: "electron-to-chromium@npm:1.5.150"
checksum: 10c0/898c232d5678a1e50f254b93902042e7287c6435ec8adab2a0f35e9f11f343eac901b799babaac92ec455a36f35ac0321847a391470629dd0060a681f850797d
version: 1.5.151
resolution: "electron-to-chromium@npm:1.5.151"
checksum: 10c0/9b3d73836a784af4fd113676b87b0d233ae51984cd4d4396f7252c7369e2f897afeca9fb53910c314e74a4b5d22b6faa4450e95304ceeb1c4fd04e8356030d4b
languageName: node
linkType: hard

Expand Down Expand Up @@ -11789,11 +11789,11 @@ __metadata:
linkType: hard

"lan-network@npm:^0.1.4":
version: 0.1.5
resolution: "lan-network@npm:0.1.5"
version: 0.1.6
resolution: "lan-network@npm:0.1.6"
bin:
lan-network: dist/lan-network-cli.js
checksum: 10c0/e5c02d45cd415431a77a7e40050b8f4484b4f5e97954c0e8d15cd671c3ab2466ffda077ee2a09723b91a47eccf02ca245a6a7dd98251db02a1955c0ff7cb24c3
checksum: 10c0/5932a9d67c40fad53da5b383c4623dba700f1b6553d4aea740f5e1cad298a908f2a14dec940ac2e149b06deda73124fc9971e7dbaf162b7f9e077a2d59cd7b20
languageName: node
linkType: hard

Expand Down Expand Up @@ -14594,12 +14594,12 @@ __metadata:
linkType: hard

"react-devtools-core@npm:^6.0.1, react-devtools-core@npm:^6.1.1":
version: 6.1.1
resolution: "react-devtools-core@npm:6.1.1"
version: 6.1.2
resolution: "react-devtools-core@npm:6.1.2"
dependencies:
shell-quote: "npm:^1.6.1"
ws: "npm:^7"
checksum: 10c0/311dcdaa2ba64a1eec7c8324361f075547a2c60537f54247e3bd4e59446fb9c140fa61c61c014371a62028a24ae00593ecda5898a96827f9b62fba853c4ac848
checksum: 10c0/a038414d69eb4d1d6303a1fc2ab0f5c2350ffa5fd8d5083ba6a83545273a8d596322c6f101c7091a2c123c47b429a91b3ea65d1291581d5bc9dd58afc62270dd
languageName: node
linkType: hard

Expand Down
Loading