Compare commits

...
17 Commits
Author SHA1 Message Date
Mike Grabowski 44f19f745b [0.55.1] Bump version numbers 2018-04-05 23:56:49 +02:00
Brian VaughnandMike Grabowski f7f0a22083 React sync for revisions 9d484ed...1c2876d
Reviewed By: gaearon

Differential Revision: D7500761

fbshipit-source-id: 8dc1cda879942fc4990b23144a616039fdbe6dc0
2018-04-05 23:46:51 +02:00
Héctor RamosandMike Grabowski 69c77d6492 React sync for revisions ced176e...9d484ed
Reviewed By: bvaughn

Differential Revision: D7338640

fbshipit-source-id: e2d75d2f1795fb3c37f193d15216951c707711d9
2018-04-05 23:46:44 +02:00
Brian VaughnandMike Grabowski 73ffa6003a React sync for revisions ad9544f...ced176e
Reviewed By: sebmarkbage

Differential Revision: D7281277

fbshipit-source-id: 75a638114cf2a65a5c973dbdf218f6d3ba042cc4
2018-04-05 23:46:37 +02:00
Mike Grabowski b1bddd7952 Revert "React sync for revisions 9d484ed...1c2876d"
This reverts commit 54f23f4b3c.
2018-04-05 23:45:58 +02:00
Brian VaughnandMike Grabowski 54f23f4b3c React sync for revisions 9d484ed...1c2876d
Reviewed By: gaearon

Differential Revision: D7500761

fbshipit-source-id: 8dc1cda879942fc4990b23144a616039fdbe6dc0
2018-04-05 23:43:48 +02:00
Mike GrabowskiandGitHub ab5db0c81c Fix runIOS CFBundleIdentifier
Copying https://github.com/facebook/react-native/pull/18700
2018-04-05 23:36:07 +02:00
Mike GrabowskiandGitHub 589eae1432 Fixes runIOS regressions #18681 2018-04-05 23:30:39 +02:00
Mike Grabowski 2e384184bc [0.55.0] Bump version numbers 2018-04-03 16:58:34 +02:00
Danny CochranandMike Grabowski 3d69b5ce5c Pass invertStickyHeaders to ScrollView
Summary:
invertStickyHeaders was being set to "this.props.inverted" -- it should just inherit from the props of VirtualizedList instead, per discussion in https://github.com/facebook/react-native/issues/18471

Fixes #18471

Pass "invertStickyHeaders: false" to a SectionList (or FlatList), and expect that your sticky headers stick to the bottom of the ScrollView, instead of the top.

none

[ANDROID] [BUGFIX] [SectionList] - invertStickyHeaders can now be set from SectionList or FlatList.
Closes https://github.com/facebook/react-native/pull/18524

Differential Revision: D7386163

Pulled By: hramos

fbshipit-source-id: 3b66dfca280e657303f69f98c5a8bc0df033f9f7
2018-04-03 16:57:52 +02:00
Mike Grabowski c70578ab76 [0.55.0-rc.2] Bump version numbers 2018-03-28 19:12:20 +02:00
Janic DuplessisandMike Grabowski 093a78d99d Fix blob response parsing for empty body on iOS
Summary:
We currently handle empty body poorly in the iOS blob implementation, this happens because of an early return that cause the blob response to not be processed by the blob module, resulting in an empty string as the body instead of a blob object. We also need to make sure to create an empty blob object when data is nil (empty body) as per the XMLHttpRequest spec. The Android implementation was already handling this properly.

Fixes #18223

Send a HEAD request

```js
fetch('https://apipre.monkimun.com/whoami', {
  body: null,
  method: 'HEAD',
  headers: {
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
})
```

[IOS][BUGFIX][Blob] - Fix blob response parsing for empty body
Closes https://github.com/facebook/react-native/pull/18547

Differential Revision: D7415950

Pulled By: hramos

fbshipit-source-id: 56860532c6171255869f02a0960f55d155184a46
2018-03-28 19:12:09 +02:00
Eric SamelsonandMike Grabowski 8a6ab14200 fix ReadableNativeMap.toHashMap() for nested maps and arrays
Summary:
<!--
  Required: Write your motivation here.
  If this PR fixes an issue, type "Fixes #issueNumber" to automatically close the issue when the PR is merged.
-->

Commit https://github.com/facebook/react-native/commit/7891805d22e3fdc821961ff0ccc5c450c3d625c8 broke the previous behavior of `ReadableNativeMap.toHashMap()` for nested maps and arrays. Previously, all nested `ReadableNativeMap`s and `ReadableNativeArray`s were recursively converted to `HashMap`s and `ArrayList`s, but this is lost when only `getLocalMap()` is returned.

<!--
  Required: Write your test plan here. If you changed any code, please provide us with
  clear instructions on how you verified your changes work. Bonus points for screenshots and videos!
-->

Call `ReadableNativeMap.toHashMap()` on a map with values of type `ReadableNativeMap` and `ReadableNativeArray`. Verify the returned hash map has these converted to `HashMap` and `ArrayList`, respectively.

<!--
  Does this PR require a documentation change?
  Create a PR at https://github.com/facebook/react-native-website and add a link to it here.
-->

<!--
  Required.
  Help reviewers and the release process by writing your own release notes. See below for an example.
-->

[ANDROID] [BUGFIX] [ReadableNativeMap] - Fix toHashMap() for nested maps and arrays

<!--
  **INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**

    CATEGORY
  [----------]      TYPE
  [ CLI      ] [-------------]    LOCATION
  [ DOCS     ] [ BREAKING    ] [-------------]
  [ GENERAL  ] [ BUGFIX      ] [ {Component} ]
  [ INTERNAL ] [ ENHANCEMENT ] [ {Filename}  ]
  [ IOS      ] [ FEATURE     ] [ {Directory} ]   |-----------|
  [ ANDROID  ] [ MINOR       ] [ {Framework} ] - | {Message} |
  [----------] [-------------] [-------------]   |-----------|

 EXAMPLES:

 [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things
 [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput
 [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with
 [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word
 [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position
 [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see
-->
Closes https://github.com/facebook/react-native/pull/18455

Reviewed By: kathryngray

Differential Revision: D7347344

Pulled By: mdvacca

fbshipit-source-id: af2bca9dec6c0cb8a7da099b6757434fcc3ac785
2018-03-28 19:12:05 +02:00
Mike Grabowski b20827250e [0.55.0-rc.1] Bump version numbers 2018-03-20 21:50:22 +01:00
Mike Grabowski ca8ce83cc3 Fix issues with pollParams and link 2018-03-20 21:43:47 +01:00
Héctor RamosandMike Grabowski 85b690fb22 React sync for revisions ab4280b...ad9544f
Reviewed By: bvaughn

Differential Revision: D7256390

fbshipit-source-id: 9fe1324da93cb8f4a7f478e1037944774b9b95ff
2018-03-20 21:39:49 +01:00
Mike Grabowski 9c29faf6a9 [0.55.0-rc.0] Bump version numbers 2018-03-12 23:53:13 +01:00
18 changed files with 5526 additions and 3722 deletions
+3
View File
@@ -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,
+2 -2
View File
@@ -12,7 +12,7 @@
exports.version = {
major: 0,
minor: 0,
patch: 0,
minor: 55,
patch: 1,
prerelease: null,
};
+3 -1
View File
@@ -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) {
+4 -4
View File
@@ -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
View File
@@ -1 +1 @@
ab4280b3e98dbb97d3e753083dab19879167c3f5
1c2876d5b558b8591feb335d8d7204bc46f7da8a
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
+1 -16
View File
@@ -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>,
+9 -7
View File
@@ -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,
|};
+2 -2
View File
@@ -21,8 +21,8 @@ static void __makeVersion()
{
__rnVersion = @{
RCTVersionMajor: @(0),
RCTVersionMinor: @(0),
RCTVersionPatch: @(0),
RCTVersionMinor: @(55),
RCTVersionPatch: @(1),
RCTVersionPrerelease: [NSNull null],
};
}
+1 -1
View File
@@ -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;
}
/**
@@ -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
View File
@@ -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`);
});
};
+4 -4
View File
@@ -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
View File
@@ -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"
}
}
}