mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Compare commits
30
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
099410b8f6 | ||
|
|
c7d453d516 | ||
|
|
370bcffba7 | ||
|
|
5bb2e83f65 | ||
|
|
f8091fac04 | ||
|
|
e187b07690 | ||
|
|
2845a8661c | ||
|
|
31a1b72d73 | ||
|
|
4fc2886e1f | ||
|
|
a05f85172e | ||
|
|
a716e324a3 | ||
|
|
7fdf9d2efb | ||
|
|
c2c4f486a2 | ||
|
|
44f19f745b | ||
|
|
f7f0a22083 | ||
|
|
69c77d6492 | ||
|
|
73ffa6003a | ||
|
|
b1bddd7952 | ||
|
|
54f23f4b3c | ||
|
|
ab5db0c81c | ||
|
|
589eae1432 | ||
|
|
2e384184bc | ||
|
|
3d69b5ce5c | ||
|
|
c70578ab76 | ||
|
|
093a78d99d | ||
|
|
8a6ab14200 | ||
|
|
b20827250e | ||
|
|
ca8ce83cc3 | ||
|
|
85b690fb22 | ||
|
|
9c29faf6a9 |
+27
-23
@@ -157,7 +157,7 @@ aliases:
|
||||
- &run-js-tests
|
||||
name: JavaScript Test Suite
|
||||
command: yarn test-ci
|
||||
|
||||
|
||||
- &run-lint-checks
|
||||
name: Lint code
|
||||
command: yarn lint --format junit -o ~/react-native/reports/junit/js-lint-results.xml
|
||||
@@ -174,7 +174,7 @@ aliases:
|
||||
./scripts/circleci/check_license.sh
|
||||
./scripts/circleci/check_cache.sh
|
||||
when: always
|
||||
|
||||
|
||||
- &build-android-app
|
||||
name: Build Android App
|
||||
command: |
|
||||
@@ -184,7 +184,7 @@ aliases:
|
||||
- &create-avd
|
||||
name: Create Android Virtual Device
|
||||
command: source scripts/circle-ci-android-setup.sh && createAVD
|
||||
|
||||
|
||||
- &launch-avd
|
||||
name: Launch Android Virtual Device in Background
|
||||
command: source scripts/circle-ci-android-setup.sh && launchAVD
|
||||
@@ -210,11 +210,11 @@ aliases:
|
||||
- &run-android-instrumentation-tests
|
||||
name: Run Instrumentation Tests
|
||||
command: |
|
||||
if [[ ! -e ReactAndroid/src/androidTest/assets/AndroidTestBundle.js ]]; then
|
||||
if [[ ! -e ReactAndroid/src/androidTest/assets/AndroidTestBundle.js ]]; then
|
||||
echo "JavaScript bundle missing, cannot run instrumentation tests. Verify build-js-bundle step completed successfully."; exit 1;
|
||||
fi
|
||||
source scripts/circle-ci-android-setup.sh && NO_BUCKD=1 retry3 timeout 300 buck install ReactAndroid/src/androidTest/buck-runner:instrumentation-tests --config build.threads=$BUILD_THREADS
|
||||
|
||||
|
||||
- &collect-android-test-results
|
||||
name: Collect Test Results
|
||||
command: |
|
||||
@@ -225,9 +225,9 @@ aliases:
|
||||
|
||||
- &setup-artifacts
|
||||
name: Initial Setup
|
||||
command: |
|
||||
command: |
|
||||
mkdir -p ~/react-native/reports/junit/
|
||||
|
||||
|
||||
- &run-objc-ios-tests
|
||||
name: iOS Test Suite
|
||||
command: ./scripts/objc-test-ios.sh test
|
||||
@@ -345,6 +345,8 @@ jobs:
|
||||
at: ~/react-native
|
||||
|
||||
- run: xcrun instruments -w "iPhone 5s (11.1)" || true
|
||||
# See https://github.com/Homebrew/homebrew-core/issues/26358.
|
||||
- run: brew upgrade python > /dev/null
|
||||
- run: brew install watchman
|
||||
- run: *run-objc-ios-tests
|
||||
|
||||
@@ -359,6 +361,8 @@ jobs:
|
||||
at: ~/react-native
|
||||
|
||||
- run: xcrun instruments -w "Apple TV 1080p (11.1)" || true
|
||||
# See https://github.com/Homebrew/homebrew-core/issues/26358.
|
||||
- run: brew upgrade python > /dev/null
|
||||
- run: brew install watchman
|
||||
- run: *run-objc-tvos-tests
|
||||
|
||||
@@ -386,14 +390,14 @@ jobs:
|
||||
at: ~/react-native
|
||||
|
||||
- run: ./scripts/process-podspecs.sh
|
||||
|
||||
|
||||
# Publishes new version onto npm
|
||||
publish_npm_package:
|
||||
<<: *android_defaults
|
||||
steps:
|
||||
# Checkout code so that we can work with `git` in publish.js
|
||||
- checkout
|
||||
|
||||
|
||||
# Configure Android SDK and related dependencies
|
||||
- run: *configure-android-path
|
||||
- run: *install-android-build-dependencies
|
||||
@@ -424,7 +428,7 @@ jobs:
|
||||
- restore-cache: *restore-yarn-cache
|
||||
- run: *yarn
|
||||
- save-cache: *save-yarn-cache
|
||||
|
||||
|
||||
- run:
|
||||
name: Publish React Native Package
|
||||
command: |
|
||||
@@ -435,7 +439,7 @@ jobs:
|
||||
echo "machine github.com login reactjs-bot password $GITHUB_TOKEN" > ~/.netrc
|
||||
node ./scripts/publish-npm.js
|
||||
else
|
||||
echo "Skipping deploy."
|
||||
echo "Skipping deploy."
|
||||
fi
|
||||
|
||||
# Set up an Android environment for downstream jobs
|
||||
@@ -454,7 +458,7 @@ jobs:
|
||||
|
||||
- run: *validate-android-sdk
|
||||
|
||||
# Starting emulator in advance as it takes some time to boot.
|
||||
# Starting emulator in advance as it takes some time to boot.
|
||||
- run: *create-avd
|
||||
- run: *launch-avd
|
||||
|
||||
@@ -494,7 +498,7 @@ jobs:
|
||||
# Test Suite
|
||||
- run: *run-android-unit-tests
|
||||
- run: *run-android-instrumentation-tests
|
||||
|
||||
|
||||
# post (always runs)
|
||||
- run: *collect-android-test-results
|
||||
- store_test_results:
|
||||
@@ -520,7 +524,7 @@ jobs:
|
||||
cd bots
|
||||
yarn install --non-interactive --cache-folder ~/.cache/yarn
|
||||
else
|
||||
echo "Skipping dependency installation."
|
||||
echo "Skipping dependency installation."
|
||||
fi
|
||||
- save-cache: *save-cache-analysis
|
||||
|
||||
@@ -531,7 +535,7 @@ jobs:
|
||||
if [ -n "$CIRCLE_PR_NUMBER" ]; then
|
||||
cd bots && DANGER_GITHUB_API_TOKEN="b186c9a82bab3b08ec80""c0818117619eec6f281a" yarn danger
|
||||
else
|
||||
echo "Skipping pull request analysis."
|
||||
echo "Skipping pull request analysis."
|
||||
fi
|
||||
when: always
|
||||
- run:
|
||||
@@ -541,7 +545,7 @@ jobs:
|
||||
if [ -n "$CIRCLE_PR_NUMBER" ]; then
|
||||
cat <(echo eslint; yarn --silent lint --format=json; echo flow; yarn --silent flow check --json) | GITHUB_TOKEN="af6ef0d15709bc91d""06a6217a5a826a226fb57b7" CI_USER=$CIRCLE_PROJECT_USERNAME CI_REPO=$CIRCLE_PROJECT_REPONAME PULL_REQUEST_NUMBER=$CIRCLE_PR_NUMBER node bots/code-analysis-bot.js
|
||||
else
|
||||
echo "Skipping code analysis."
|
||||
echo "Skipping code analysis."
|
||||
fi
|
||||
when: always
|
||||
|
||||
@@ -600,16 +604,16 @@ workflows:
|
||||
# Checkout repo and run Yarn
|
||||
- checkout_code:
|
||||
filters: *filter-ignore-master-stable
|
||||
|
||||
|
||||
# Run code checks
|
||||
- analyze_pr:
|
||||
- analyze_pr:
|
||||
filters: *filter-ignore-master-stable
|
||||
requires:
|
||||
requires:
|
||||
- checkout_code
|
||||
|
||||
# Only runs on NN-stable branches
|
||||
deploy:
|
||||
jobs:
|
||||
jobs:
|
||||
# If we are on a stable branch, wait for approval to deploy to npm
|
||||
- approve_publish_npm_package:
|
||||
filters: *filter-only-stable
|
||||
@@ -619,9 +623,9 @@ workflows:
|
||||
requires:
|
||||
- approve_publish_npm_package
|
||||
|
||||
# These tests are flaky or are yet to be fixed. They are placed on their own
|
||||
# These tests are flaky or are yet to be fixed. They are placed on their own
|
||||
# workflow to avoid marking benign PRs as broken.
|
||||
# To run them, uncomment the entire block and open a PR (do not merge).
|
||||
# To run them, uncomment the entire block and open a PR (do not merge).
|
||||
# Once a test is fixed, move the test definition to the 'tests' workflow.
|
||||
# disabled_tests:
|
||||
# jobs:
|
||||
@@ -629,7 +633,7 @@ workflows:
|
||||
# - checkout_code:
|
||||
# filters: *filter-ignore-gh-pages
|
||||
|
||||
# # The following were DISABLED because they have not run since
|
||||
# # The following were DISABLED because they have not run since
|
||||
# # the migration from Travis, and they have broken since then,
|
||||
# # CocoaPods
|
||||
# - test_podspec:
|
||||
|
||||
@@ -258,6 +258,9 @@ RCT_EXPORT_METHOD(release:(NSString *)blobId)
|
||||
|
||||
- (id)handleNetworkingResponse:(NSURLResponse *)response data:(NSData *)data
|
||||
{
|
||||
// An empty body will have nil for data, in this case we need to return
|
||||
// an empty blob as per the XMLHttpRequest spec.
|
||||
data = data ?: [NSData new];
|
||||
return @{
|
||||
@"blobId": [self store:data],
|
||||
@"offset": @0,
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
exports.version = {
|
||||
major: 0,
|
||||
minor: 0,
|
||||
patch: 0,
|
||||
minor: 55,
|
||||
patch: 4,
|
||||
prerelease: null,
|
||||
};
|
||||
|
||||
@@ -899,7 +899,10 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
||||
onScrollEndDrag: this._onScrollEndDrag,
|
||||
onMomentumScrollEnd: this._onMomentumScrollEnd,
|
||||
scrollEventThrottle: this.props.scrollEventThrottle, // TODO: Android support
|
||||
invertStickyHeaders: this.props.inverted,
|
||||
invertStickyHeaders:
|
||||
this.props.invertStickyHeaders !== undefined
|
||||
? this.props.invertStickyHeaders
|
||||
: this.props.inverted,
|
||||
stickyHeaderIndices,
|
||||
};
|
||||
if (inversionStyle) {
|
||||
|
||||
@@ -164,6 +164,7 @@ RCT_EXPORT_METHOD(getCurrentConnectivity:(RCTPromiseResolveBlock)resolve
|
||||
reject:(__unused RCTPromiseRejectBlock)reject)
|
||||
{
|
||||
SCNetworkReachabilityRef reachability = [self getReachabilityRef];
|
||||
SCNetworkReachabilityUnscheduleFromRunLoop(reachability, CFRunLoopGetMain(), kCFRunLoopCommonModes);
|
||||
CFRelease(reachability);
|
||||
resolve(@{@"connectionType": _connectionType ?: RCTConnectionTypeUnknown,
|
||||
@"effectiveConnectionType": _effectiveConnectionType ?: RCTEffectiveConnectionTypeUnknown,
|
||||
|
||||
@@ -439,10 +439,6 @@ RCT_EXPORT_MODULE()
|
||||
{
|
||||
RCTAssertThread(_methodQueue, @"sendData: must be called on method queue");
|
||||
|
||||
if (data.length == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
id responseData = nil;
|
||||
for (id<RCTNetworkingResponseHandler> handler in _responseHandlers) {
|
||||
if ([handler canHandleNetworkingResponse:responseType]) {
|
||||
@@ -452,6 +448,10 @@ RCT_EXPORT_MODULE()
|
||||
}
|
||||
|
||||
if (!responseData) {
|
||||
if (data.length == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ([responseType isEqualToString:@"text"]) {
|
||||
// No carry storage is required here because the entire data has been loaded.
|
||||
responseData = [RCTNetworking decodeTextData:data fromResponse:task.response withCarryData:nil];
|
||||
|
||||
@@ -1 +1 @@
|
||||
ab4280b3e98dbb97d3e753083dab19879167c3f5
|
||||
1c2876d5b558b8591feb335d8d7204bc46f7da8a
|
||||
+2024
-1381
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -12,7 +12,7 @@
|
||||
const ReactFeatureFlags = {
|
||||
debugRenderPhaseSideEffects: false,
|
||||
debugRenderPhaseSideEffectsForStrictMode: false,
|
||||
warnAboutDeprecatedLifecycles: true,
|
||||
warnAboutDeprecatedLifecycles: false,
|
||||
};
|
||||
|
||||
module.exports = ReactFeatureFlags;
|
||||
|
||||
@@ -86,27 +86,12 @@ type SecretInternalsType = {
|
||||
// And how much information to fill in for the above types.
|
||||
};
|
||||
|
||||
declare class ReactNativeComponent<Props, State = void>
|
||||
extends React$Component<Props, State> {
|
||||
|
||||
blur(): void,
|
||||
focus(): void,
|
||||
measure(callback: MeasureOnSuccessCallback): void,
|
||||
measureInWindow(callback: MeasureInWindowOnSuccessCallback): void,
|
||||
measureLayout(
|
||||
relativeToNativeNode: number,
|
||||
onSuccess: MeasureLayoutOnSuccessCallback,
|
||||
onFail: () => void,
|
||||
): void,
|
||||
setNativeProps(nativeProps: Object): void,
|
||||
}
|
||||
|
||||
/**
|
||||
* Flat ReactNative renderer bundles are too big for Flow to parse efficiently.
|
||||
* Provide minimal Flow typing for the high-level RN API and call it a day.
|
||||
*/
|
||||
export type ReactNativeType = {
|
||||
NativeComponent: typeof ReactNativeComponent,
|
||||
NativeComponent: any,
|
||||
findNodeHandle(componentOrHandle: any): ?number,
|
||||
render(
|
||||
element: React$Element<any>,
|
||||
|
||||
@@ -62,7 +62,7 @@ export type ReactProvider<T> = {
|
||||
|
||||
export type ReactProviderType<T> = {
|
||||
$$typeof: Symbol | number,
|
||||
context: ReactContext<T>,
|
||||
_context: ReactContext<T>,
|
||||
};
|
||||
|
||||
export type ReactConsumer<T> = {
|
||||
@@ -72,7 +72,7 @@ export type ReactConsumer<T> = {
|
||||
ref: null,
|
||||
props: {
|
||||
children: (value: T) => ReactNodeList,
|
||||
bits?: number,
|
||||
unstable_observedBits?: number,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -80,10 +80,12 @@ export type ReactContext<T> = {
|
||||
$$typeof: Symbol | number,
|
||||
Consumer: ReactContext<T>,
|
||||
Provider: ReactProviderType<T>,
|
||||
calculateChangedBits: ((a: T, b: T) => number) | null,
|
||||
defaultValue: T,
|
||||
currentValue: T,
|
||||
changedBits: number,
|
||||
|
||||
_calculateChangedBits: ((a: T, b: T) => number) | null,
|
||||
_defaultValue: T,
|
||||
|
||||
_currentValue: T,
|
||||
_changedBits: number,
|
||||
|
||||
// DEV only
|
||||
_currentRenderer?: Object | null,
|
||||
@@ -99,5 +101,5 @@ export type ReactPortal = {
|
||||
};
|
||||
|
||||
export type RefObject = {|
|
||||
value: any,
|
||||
current: any,
|
||||
|};
|
||||
|
||||
@@ -14,6 +14,7 @@ const EventTarget = require('event-target-shim');
|
||||
const NativeEventEmitter = require('NativeEventEmitter');
|
||||
const BlobManager = require('BlobManager');
|
||||
const NativeModules = require('NativeModules');
|
||||
const Platform = require('Platform');
|
||||
const WebSocketEvent = require('WebSocketEvent');
|
||||
|
||||
/* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an error
|
||||
@@ -202,7 +203,7 @@ class WebSocket extends EventTarget(...WEBSOCKET_EVENTS) {
|
||||
}
|
||||
|
||||
_close(code?: number, reason?: string): void {
|
||||
if (WebSocketModule.close.length === 3) {
|
||||
if (Platform.OS === 'android') {
|
||||
// See https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent
|
||||
const statusCode = typeof code === 'number' ? code : CLOSE_NORMAL;
|
||||
const closeReason = typeof reason === 'string' ? reason : '';
|
||||
|
||||
@@ -51,6 +51,7 @@ Pod::Spec.new do |s|
|
||||
"React/Inspector/*",
|
||||
"ReactCommon/yoga/*",
|
||||
"React/Cxx*/*",
|
||||
"React/Fabric/*",
|
||||
ss.ios.exclude_files = "React/**/RCTTV*.*"
|
||||
ss.tvos.exclude_files = "React/Modules/RCTClipboard*",
|
||||
"React/Views/RCTDatePicker*",
|
||||
|
||||
@@ -21,8 +21,8 @@ static void __makeVersion()
|
||||
{
|
||||
__rnVersion = @{
|
||||
RCTVersionMajor: @(0),
|
||||
RCTVersionMinor: @(0),
|
||||
RCTVersionPatch: @(0),
|
||||
RCTVersionMinor: @(55),
|
||||
RCTVersionPatch: @(4),
|
||||
RCTVersionPrerelease: [NSNull null],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -73,8 +73,8 @@ RCT_NOT_IMPLEMENTED(- (nullable instancetype)initWithCoder:(NSCoder *)coder)
|
||||
RCTSurfaceMinimumSizeAndMaximumSizeFromSizeAndSizeMeasureMode(
|
||||
self.bounds.size,
|
||||
_sizeMeasureMode,
|
||||
minimumSize,
|
||||
maximumSize
|
||||
&minimumSize,
|
||||
&maximumSize
|
||||
);
|
||||
|
||||
[_surface setMinimumSize:minimumSize
|
||||
@@ -110,8 +110,8 @@ RCT_NOT_IMPLEMENTED(- (nullable instancetype)initWithCoder:(NSCoder *)coder)
|
||||
RCTSurfaceMinimumSizeAndMaximumSizeFromSizeAndSizeMeasureMode(
|
||||
size,
|
||||
_sizeMeasureMode,
|
||||
minimumSize,
|
||||
maximumSize
|
||||
&minimumSize,
|
||||
&maximumSize
|
||||
);
|
||||
|
||||
return [_surface sizeThatFitsMinimumSize:minimumSize
|
||||
|
||||
@@ -28,6 +28,6 @@ typedef NS_OPTIONS(NSInteger, RCTSurfaceSizeMeasureMode) {
|
||||
RCT_EXTERN void RCTSurfaceMinimumSizeAndMaximumSizeFromSizeAndSizeMeasureMode(
|
||||
CGSize size,
|
||||
RCTSurfaceSizeMeasureMode sizeMeasureMode,
|
||||
CGSize &minimumSize,
|
||||
CGSize &maximumSize
|
||||
CGSize *minimumSize,
|
||||
CGSize *maximumSize
|
||||
);
|
||||
|
||||
@@ -12,25 +12,25 @@
|
||||
void RCTSurfaceMinimumSizeAndMaximumSizeFromSizeAndSizeMeasureMode(
|
||||
CGSize size,
|
||||
RCTSurfaceSizeMeasureMode sizeMeasureMode,
|
||||
CGSize &minimumSize,
|
||||
CGSize &maximumSize
|
||||
CGSize *minimumSize,
|
||||
CGSize *maximumSize
|
||||
) {
|
||||
minimumSize = CGSizeZero;
|
||||
maximumSize = CGSizeMake(CGFLOAT_MAX, CGFLOAT_MAX);
|
||||
*minimumSize = CGSizeZero;
|
||||
*maximumSize = CGSizeMake(CGFLOAT_MAX, CGFLOAT_MAX);
|
||||
|
||||
if (sizeMeasureMode & RCTSurfaceSizeMeasureModeWidthExact) {
|
||||
minimumSize.width = size.width;
|
||||
maximumSize.width = size.width;
|
||||
minimumSize->width = size.width;
|
||||
maximumSize->width = size.width;
|
||||
}
|
||||
else if (sizeMeasureMode & RCTSurfaceSizeMeasureModeWidthAtMost) {
|
||||
maximumSize.width = size.width;
|
||||
maximumSize->width = size.width;
|
||||
}
|
||||
|
||||
if (sizeMeasureMode & RCTSurfaceSizeMeasureModeHeightExact) {
|
||||
minimumSize.height = size.height;
|
||||
maximumSize.height = size.height;
|
||||
minimumSize->height = size.height;
|
||||
maximumSize->height = size.height;
|
||||
}
|
||||
else if (sizeMeasureMode & RCTSurfaceSizeMeasureModeHeightAtMost) {
|
||||
maximumSize.height = size.height;
|
||||
maximumSize->height = size.height;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -575,9 +575,6 @@ static inline void RCTApplyTransformationAccordingLayoutDirection(UIView *view,
|
||||
- (void)scrollToOffset:(CGPoint)offset animated:(BOOL)animated
|
||||
{
|
||||
if (!CGPointEqualToPoint(_scrollView.contentOffset, offset)) {
|
||||
CGFloat maxOffsetX = _scrollView.contentSize.width - _scrollView.bounds.size.width + _scrollView.contentInset.right;
|
||||
CGFloat maxOffsetY = _scrollView.contentSize.height - _scrollView.bounds.size.height + _scrollView.contentInset.bottom;
|
||||
offset = CGPointMake(MAX(0, MIN(maxOffsetX, offset.x)), MAX(0, MIN(maxOffsetY, offset.y)));
|
||||
// Ensure at least one scroll event will fire
|
||||
_allowNextScrollNoMatterWhat = YES;
|
||||
[_scrollView setContentOffset:offset animated:animated];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
VERSION_NAME=1000.0.0-master
|
||||
VERSION_NAME=0.55.4
|
||||
GROUP=com.facebook.react
|
||||
|
||||
POM_NAME=ReactNative
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.facebook.jni.HybridData;
|
||||
import com.facebook.proguard.annotations.DoNotStrip;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
|
||||
import com.facebook.infer.annotation.Assertions;
|
||||
import javax.annotation.Nullable;
|
||||
@@ -248,7 +249,31 @@ public class ReadableNativeMap extends NativeMap implements ReadableMap {
|
||||
}
|
||||
return hashMap;
|
||||
}
|
||||
return getLocalMap();
|
||||
|
||||
// we can almost just return getLocalMap(), but we need to convert nested arrays and maps to the
|
||||
// correct types first
|
||||
HashMap<String, Object> hashMap = new HashMap<>(getLocalMap());
|
||||
Iterator iterator = hashMap.keySet().iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
String key = (String) iterator.next();
|
||||
switch (getType(key)) {
|
||||
case Null:
|
||||
case Boolean:
|
||||
case Number:
|
||||
case String:
|
||||
break;
|
||||
case Map:
|
||||
hashMap.put(key, Assertions.assertNotNull(getMap(key)).toHashMap());
|
||||
break;
|
||||
case Array:
|
||||
hashMap.put(key, Assertions.assertNotNull(getArray(key)).toArrayList());
|
||||
break;
|
||||
default:
|
||||
throw new IllegalArgumentException("Could not convert object with key: " + key + ".");
|
||||
}
|
||||
}
|
||||
return hashMap;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -79,7 +79,7 @@ public class BlobModule extends ReactContextBaseJavaModule {
|
||||
@Override
|
||||
public boolean supports(Uri uri, String responseType) {
|
||||
String scheme = uri.getScheme();
|
||||
boolean isRemote = scheme.equals("http") || scheme.equals("https");
|
||||
boolean isRemote = "http".equals(scheme) || "https".equals(scheme);
|
||||
|
||||
return (!isRemote && responseType.equals("blob"));
|
||||
}
|
||||
|
||||
+2
-2
@@ -16,7 +16,7 @@ import java.util.Map;
|
||||
public class ReactNativeVersion {
|
||||
public static final Map<String, Object> VERSION = MapBuilder.<String, Object>of(
|
||||
"major", 0,
|
||||
"minor", 0,
|
||||
"patch", 0,
|
||||
"minor", 55,
|
||||
"patch", 4,
|
||||
"prerelease", null);
|
||||
}
|
||||
|
||||
+11
-11
@@ -37,7 +37,9 @@ log.heading = 'rnpm-link';
|
||||
|
||||
const dedupeAssets = (assets) => uniqBy(assets, asset => path.basename(asset));
|
||||
|
||||
const linkDependency = (platforms, project, dependency) => {
|
||||
const linkDependency = async (platforms, project, dependency) => {
|
||||
const params = await pollParams(dependency.config.params);
|
||||
|
||||
Object.keys(platforms || {})
|
||||
.forEach(platform => {
|
||||
if (!project[platform] || !dependency.config[platform]) {
|
||||
@@ -56,18 +58,16 @@ const linkDependency = (platforms, project, dependency) => {
|
||||
return null;
|
||||
}
|
||||
|
||||
return pollParams(dependency.config.params).then(params => {
|
||||
log.info(`Linking ${dependency.name} ${platform} dependency`);
|
||||
log.info(`Linking ${dependency.name} ${platform} dependency`);
|
||||
|
||||
linkConfig.register(
|
||||
dependency.name,
|
||||
dependency.config[platform],
|
||||
params,
|
||||
project[platform]
|
||||
);
|
||||
linkConfig.register(
|
||||
dependency.name,
|
||||
dependency.config[platform],
|
||||
params,
|
||||
project[platform]
|
||||
);
|
||||
|
||||
log.info(`Platform '${platform}' module ${dependency.name} has been successfully linked`);
|
||||
});
|
||||
log.info(`Platform '${platform}' module ${dependency.name} has been successfully linked`);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ const getBuildPath = function (configuration = 'Debug', appName, isDevice) {
|
||||
device = 'iphonesimulator';
|
||||
}
|
||||
|
||||
return `Build/Products/${configuration}-${device}/${appName}.app`;
|
||||
return `build/Build/Products/${configuration}-${device}/${appName}.app`;
|
||||
};
|
||||
const xcprettyAvailable = function() {
|
||||
try {
|
||||
@@ -115,22 +115,19 @@ function runOnSimulator(xcodeProject, args, scheme) {
|
||||
|
||||
if (!selectedSimulator.booted) {
|
||||
const simulatorFullName = formattedDeviceName(selectedSimulator);
|
||||
console.log(`Booting ${simulatorFullName}...`);
|
||||
console.log(`Launching ${simulatorFullName}...`);
|
||||
try {
|
||||
child_process.execFileSync('xcrun', ['simctl', 'boot', selectedSimulator.udid]);
|
||||
child_process.spawnSync('xcrun', ['instruments', '-w', selectedSimulator.udid]);
|
||||
} catch (e) {
|
||||
throw new Error(
|
||||
`Could not boot ${args.simulator} simulator. Is there already a simulator running?
|
||||
Running multiple simulators is only supported from Xcode 9 and up.
|
||||
Try closing the simulator or run the command again without specifying a simulator.`
|
||||
);
|
||||
// instruments always fail with 255 because it expects more arguments,
|
||||
// but we want it to only launch the simulator
|
||||
}
|
||||
}
|
||||
|
||||
buildProject(xcodeProject, selectedSimulator.udid, scheme, args.configuration, args.packager, args.verbose)
|
||||
.then((appName) => resolve(selectedSimulator.udid, appName));
|
||||
buildProject(xcodeProject, selectedSimulator.udid, scheme, args.configuration, args.packager, args.verbose, args.port)
|
||||
.then((appName) => resolve({ udid: selectedSimulator.udid, appName }));
|
||||
})
|
||||
.then((udid, appName) => {
|
||||
.then(({udid, appName}) => {
|
||||
if (!appName) {
|
||||
appName = scheme;
|
||||
}
|
||||
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "react-native",
|
||||
"version": "1000.0.0",
|
||||
"version": "0.55.4",
|
||||
"description": "A framework for building native apps using React",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -142,7 +142,7 @@
|
||||
"react-native": "local-cli/wrong-react-native.js"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "^16.3.0-alpha.0"
|
||||
"react": "16.3.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"absolute-path": "^0.0.0",
|
||||
@@ -219,9 +219,9 @@
|
||||
"jest": "22.4.2",
|
||||
"jest-junit": "3.6.0",
|
||||
"prettier": "1.9.1",
|
||||
"react": "^16.3.0-alpha.1",
|
||||
"react-test-renderer": "^16.3.0-alpha.1",
|
||||
"react": "16.3.1",
|
||||
"react-test-renderer": "16.3.1",
|
||||
"shelljs": "^0.7.8",
|
||||
"sinon": "^2.2.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user