Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…o feat/disable_buttons_action_sheet
  • Loading branch information
lukewalczak committed Oct 26, 2020
2 parents f0ffb09 + 2a634f4 commit c338a3a
Show file tree
Hide file tree
Showing 742 changed files with 30,927 additions and 30,362 deletions.
2 changes: 1 addition & 1 deletion .buckconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
jcenter = https://jcenter.bintray.com/

[alias]
rntester = //RNTester/android/app:app
rntester = //packages/rn-tester/android/app:app
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ mount -o remount,exec /dev/shm
AVD_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 8 | head -n 1)

# create virtual device
echo no | android create avd -n "$AVD_UUID" -f -t android-19 --abi default/armeabi-v7a
echo no | android create avd -n "$AVD_UUID" -f -t android-21 --abi default/armeabi-v7a

# emulator setup
emulator64-arm -avd $AVD_UUID -no-skin -no-audio -no-window -no-boot-anim &
Expand Down
7 changes: 1 addition & 6 deletions .circleci/Dockerfiles/scripts/run-ci-e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,6 @@ while :; do
shift
;;

--tvos)
RUN_IOS=1
shift
;;

*)
break
esac
Expand Down Expand Up @@ -114,7 +109,7 @@ function e2e_suite() {

# create virtual device
if ! android list avd | grep "$AVD_UUID" > /dev/null; then
echo no | android create avd -n "$AVD_UUID" -f -t android-19 --abi default/armeabi-v7a
echo no | android create avd -n "$AVD_UUID" -f -t android-21 --abi default/armeabi-v7a
fi

# newline at end of adb devices call and first line is headers
Expand Down
14 changes: 7 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ executors:
nodelts:
<<: *defaults
docker:
- image: circleci/node:12
- image: circleci/node:14
nodeprevlts:
<<: *defaults
docker:
- image: circleci/node:10
- image: circleci/node:12
reactnativeandroid:
<<: *defaults
docker:
Expand All @@ -50,7 +50,7 @@ executors:
reactnativeios:
<<: *defaults
macos:
xcode: &_XCODE_VERSION "11.3.1"
xcode: &_XCODE_VERSION "11.6.0"

# -------------------------
# COMMANDS
Expand Down Expand Up @@ -133,13 +133,13 @@ commands:
steps:
- restore_cache:
keys:
- v3-brew
- v4-brew
- steps: << parameters.steps >>
- save_cache:
paths:
- /usr/local/Homebrew
- ~/Library/Caches/Homebrew
key: v3-brew
key: v4-brew

with_rntester_pods_cache_span:
parameters:
Expand Down Expand Up @@ -589,7 +589,7 @@ jobs:
source ~/.bashrc
nvm i node
npm i -g yarn
npx envinfo@latest
echo y | npx envinfo@latest
yarn run docker-setup-android
yarn run docker-build-android
Expand Down Expand Up @@ -642,7 +642,7 @@ jobs:
name: Setup Android SDKs
command: |
sdkmanager --licenses
sdkmanager "system-images;android-19;google_apis;armeabi-v7a"
sdkmanager "system-images;android-21;google_apis;armeabi-v7a"
sdkmanager "platforms;android-%ANDROID_BUILD_VERSION%"
sdkmanager "build-tools;%ANDROID_TOOLS_VERSION%"
sdkmanager "add-ons;addon-google_apis-google-23"
Expand Down
5 changes: 2 additions & 3 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# node_modules ignored by default

**/main.js
**/staticBundle.js
bots/node_modules
docs/generatedComponentApiDocs.js
flow/
Libraries/Renderer/*
Libraries/vendor/**/*
node_modules/
packages/*/node_modules
packages/react-native-codegen/lib
pr-inactivity-bookmarklet.js
question-bookmarklet.js
packages/react-native-codegen/lib
21 changes: 13 additions & 8 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,20 @@
"./packages/eslint-config-react-native-community/index.js"
],

"plugins": [
"@react-native/eslint-plugin-codegen"
],

"overrides": [
{
"files": [
"Libraries/**/*.js",
],
rules: {
'@react-native-community/no-haste-imports': 2,
'@react-native-community/error-subclass-name': 2,
'@react-native-community/platform-colors': 2,
"rules": {
"@react-native-community/no-haste-imports": 2,
"@react-native-community/error-subclass-name": 2,
"@react-native-community/platform-colors": 2,
"@react-native/codegen/react-native-modules": 2
}
},
{
Expand All @@ -40,8 +45,8 @@
],
"env": {
"jasmine": true,
"jest": true,
},
},
],
"jest": true
}
}
]
}
7 changes: 1 addition & 6 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ flow/
[options]
emoji=true

esproposal.optional_chaining=enable
esproposal.nullish_coalescing=enable

exact_by_default=true

module.file_ext=.js
Expand All @@ -50,8 +47,6 @@ suppress_type=$FlowFixMeProps
suppress_type=$FlowFixMeState
suppress_type=$FlowFixMeEmpty

well_formed_exports=true
types_first=true
experimental.abstract_locations=true

[lints]
Expand All @@ -75,4 +70,4 @@ untyped-import
untyped-type-import

[version]
^0.132.0
^0.136.0
7 changes: 1 addition & 6 deletions .flowconfig.android
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ flow/
[options]
emoji=true

esproposal.optional_chaining=enable
esproposal.nullish_coalescing=enable

exact_by_default=true

module.file_ext=.js
Expand All @@ -50,8 +47,6 @@ suppress_type=$FlowFixMeProps
suppress_type=$FlowFixMeState
suppress_type=$FlowFixMeEmpty

well_formed_exports=true
types_first=true
experimental.abstract_locations=true

[lints]
Expand All @@ -75,4 +70,4 @@ untyped-import
untyped-type-import

[version]
^0.132.0
^0.136.0
6 changes: 0 additions & 6 deletions .gitattributes

This file was deleted.

4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ project.xcworkspace

# Gradle
/build/
/packages/react-native-codegen/android/build/
/packages/react-native-codegen/android/gradlePlugin-build/gradlePlugin/build
/packages/rn-tester/android/app/.cxx/
/packages/rn-tester/android/app/build/
/packages/rn-tester/android/app/gradle/
/packages/rn-tester/android/app/gradlew
Expand Down Expand Up @@ -97,6 +100,7 @@ package-lock.json
!/packages/rn-tester/Pods/__offline_mirrors__

# react-native-codegen
/Libraries/FBReactNativeSpec/FBReactNativeSpec
/packages/react-native-codegen/lib
/ReactCommon/fabric/components/rncore/
/schema-native-modules.json
Expand Down
3 changes: 2 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"singleQuote": true,
"trailingComma": "all",
"bracketSpacing": false,
"jsxBracketSameLine": true
"jsxBracketSameLine": true,
"arrowParens": "avoid"
}
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ We recommend referring to the [CONTRIBUTING](https://github.com/facebook/react-n

## Contributing Code

Code-level contributions to React Native generally come in the form of [pull requests](https://help.github.com/en/articles/about-pull-requests). These are done by forking the repo and making changes locally. Directly in the repo, there is the [`RNTester` app](/RNTester) that you can install on your device (or simulators) and use to test the changes you're making to React Native sources.
Code-level contributions to React Native generally come in the form of [pull requests](https://help.github.com/en/articles/about-pull-requests). These are done by forking the repo and making changes locally. Directly in the repo, there is the [`rn-tester` app](/packages/rn-tester) that you can install on your device (or simulators) and use to test the changes you're making to React Native sources.

The process of proposing a change to React Native can be summarized as follows:

1. Fork the React Native repository and create your branch from `master`.
2. Make the desired changes to React Native sources. Use the `RNTester` app to test them out.
2. Make the desired changes to React Native sources. Use the `packages/rn-tester` app to test them out.
3. If you've added code that should be tested, add tests.
4. If you've changed APIs, update the documentation, which lives in [another repo](https://github.com/facebook/react-native-website/).
5. Ensure the test suite passes, either locally or on CI once you opened a pull request.
Expand Down
2 changes: 1 addition & 1 deletion ECOSYSTEM.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ React Native's current set of partners include Callstack, Expo, Facebook, Infini
* **[Callstack](https://callstack.com/):** Manages releases, maintains the [React Native CLI](https://github.com/react-native-community/react-native-cli) and organizes [React Native EU](https://react-native.eu/)
* **[Expo](https://expo.io/):** Builds [expo](https://github.com/expo/expo) on top of React Native to simplify app development
* **[Facebook](https://opensource.facebook.com):** Oversees the React Native product and maintains the [React Native core repo](https://reactnative.dev/)
* **[Infinite Red](https://infinite.red/):** Maintains the [ignite cli/boilerplate](https://github.com/infinitered/ignite), organizes [Chain React Conf](https://infinite.red/ChainReactConf)
* **[Infinite Red](https://infinite.red/):** Maintains the [ignite cli/boilerplate](https://github.com/infinitered/ignite), organizes [Chain React Conf](https://cr.infinite.red/)
* **[Microsoft](http://aka.ms/reactnative):** Develops [React Native Windows](https://github.com/Microsoft/react-native-windows) and [React Native macOS](https://github.com/microsoft/react-native-macos) for building apps that target Windows and macOS
* **[Software Mansion](https://swmansion.com/):** Maintain core infrastructure including JSC, Animated, and other popular third-party plugins.

Expand Down
4 changes: 2 additions & 2 deletions Libraries/ActionSheetIOS/ActionSheetIOS.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const ActionSheetIOS = {
'Options must be a valid object',
);
invariant(typeof callback === 'function', 'Must provide a valid callback');
invariant(RCTActionSheetManager, "ActionSheetManager does't exist");
invariant(RCTActionSheetManager, "ActionSheetManager doesn't exist");

const {tintColor, destructiveButtonIndex, ...remainingOptions} = options;
let destructiveButtonIndices = null;
Expand Down Expand Up @@ -125,7 +125,7 @@ const ActionSheetIOS = {
typeof successCallback === 'function',
'Must provide a valid successCallback',
);
invariant(RCTActionSheetManager, "ActionSheetManager does't exist");
invariant(RCTActionSheetManager, "ActionSheetManager doesn't exist");
RCTActionSheetManager.showShareActionSheetWithOptions(
{...options, tintColor: processColor(options.tintColor)},
failureCallback,
Expand Down
4 changes: 2 additions & 2 deletions Libraries/ActionSheetIOS/React-RCTActionSheet.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ Pod::Spec.new do |s|
s.documentation_url = "https://reactnative.dev/docs/actionsheetios"
s.license = package["license"]
s.author = "Facebook, Inc. and its affiliates"
s.platforms = { :ios => "10.0", :tvos => "10.0" }
s.platforms = { :ios => "10.0" }
s.source = source
s.source_files = "*.{m}"
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"
s.header_dir = "RCTActionSheet"

s.dependency "React-Core/RCTActionSheetHeaders", version
Expand Down
1 change: 1 addition & 0 deletions Libraries/Alert/NativeAlertManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export type Args = {|

export interface Spec extends TurboModule {
+alertWithArgs: (
// eslint-disable-next-line @react-native/codegen/react-native-modules
args: Args,
callback: (id: number, value: string) => void,
) => void;
Expand Down
34 changes: 10 additions & 24 deletions Libraries/Animated/NativeAnimatedHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,13 @@ let nativeEventEmitter;

let waitingForQueuedOperations = new Set();
let queueOperations = false;
let queueConnections = false;
let queue: Array<() => void> = [];

/**
* Simple wrappers around NativeAnimatedModule to provide flow and autocomplete support for
* the native module methods
*/
const API = {
enableQueue: function(): void {
queueConnections = true;
},
getValue: function(
tag: number,
saveValueCallback: (value: number) => void,
Expand All @@ -60,7 +56,6 @@ const API = {
setWaitingForIdentifier: function(id: number): void {
waitingForQueuedOperations.add(id);
queueOperations = true;
queueConnections = true;
},
unsetWaitingForIdentifier: function(id: number): void {
waitingForQueuedOperations.delete(id);
Expand All @@ -72,25 +67,16 @@ const API = {
},
disableQueue: function(): void {
invariant(NativeAnimatedModule, 'Native animated module is not available');
queueConnections = false;
if (!queueOperations) {
if (Platform.OS === 'android') {
NativeAnimatedModule.startOperationBatch();
}
for (let q = 0, l = queue.length; q < l; q++) {
queue[q]();
}
queue.length = 0;
if (Platform.OS === 'android') {
NativeAnimatedModule.finishOperationBatch();
}

if (Platform.OS === 'android') {
NativeAnimatedModule.startOperationBatch();
}
},
queueConnection: (fn: () => void): void => {
if (queueConnections) {
queue.push(fn);
} else {
fn();
for (let q = 0, l = queue.length; q < l; q++) {
queue[q]();
}
queue.length = 0;
if (Platform.OS === 'android') {
NativeAnimatedModule.finishOperationBatch();
}
},
queueOperation: (fn: () => void): void => {
Expand Down Expand Up @@ -120,7 +106,7 @@ const API = {
},
connectAnimatedNodes: function(parentTag: number, childTag: number): void {
invariant(NativeAnimatedModule, 'Native animated module is not available');
API.queueConnection(() =>
API.queueOperation(() =>
NativeAnimatedModule.connectAnimatedNodes(parentTag, childTag),
);
},
Expand Down
2 changes: 1 addition & 1 deletion Libraries/Animated/NativeAnimatedModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export type AnimatingNodeConfig = Object;
export interface Spec extends TurboModule {
+startOperationBatch: () => void;
+finishOperationBatch: () => void;

// eslint-disable-next-line @react-native/codegen/react-native-modules
+createAnimatedNode: (tag: number, config: AnimatedNodeConfig) => void;
+getValue: (tag: number, saveValueCallback: SaveValueCallback) => void;
+startListeningToAnimatedNodeValue: (tag: number) => void;
Expand Down
2 changes: 1 addition & 1 deletion Libraries/Animated/NativeAnimatedTurboModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export type AnimatingNodeConfig = Object;
export interface Spec extends TurboModule {
+startOperationBatch: () => void;
+finishOperationBatch: () => void;

// eslint-disable-next-line @react-native/codegen/react-native-modules
+createAnimatedNode: (tag: number, config: AnimatedNodeConfig) => void;
+getValue: (tag: number, saveValueCallback: SaveValueCallback) => void;
+startListeningToAnimatedNodeValue: (tag: number) => void;
Expand Down
Loading

0 comments on commit c338a3a

Please sign in to comment.