mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
44f19f745b | ||
|
|
f7f0a22083 | ||
|
|
69c77d6492 | ||
|
|
73ffa6003a | ||
|
|
b1bddd7952 | ||
|
|
54f23f4b3c | ||
|
|
ab5db0c81c | ||
|
|
589eae1432 | ||
|
|
2e384184bc | ||
|
|
3d69b5ce5c | ||
|
|
c70578ab76 | ||
|
|
093a78d99d | ||
|
|
8a6ab14200 | ||
|
|
b20827250e | ||
|
|
ca8ce83cc3 | ||
|
|
85b690fb22 | ||
|
|
9c29faf6a9 |
@@ -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: 1,
|
||||
prerelease: null,
|
||||
};
|
||||
|
||||
@@ -899,7 +899,9 @@ 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) {
|
||||
|
||||
@@ -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
@@ -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,
|
||||
|};
|
||||
|
||||
@@ -21,8 +21,8 @@ static void __makeVersion()
|
||||
{
|
||||
__rnVersion = @{
|
||||
RCTVersionMajor: @(0),
|
||||
RCTVersionMinor: @(0),
|
||||
RCTVersionPatch: @(0),
|
||||
RCTVersionMinor: @(55),
|
||||
RCTVersionPatch: @(1),
|
||||
RCTVersionPrerelease: [NSNull null],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
VERSION_NAME=1000.0.0-master
|
||||
VERSION_NAME=0.55.1
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+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", 1,
|
||||
"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 {
|
||||
@@ -127,10 +127,10 @@ Try closing the simulator or run the command again without specifying a simulato
|
||||
}
|
||||
}
|
||||
|
||||
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.1",
|
||||
"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