Compare commits

...
Author SHA1 Message Date
Mike Grabowski 37cc5cfb0c [0.27.0] Bump version numbers 2016-06-06 10:21:36 +02:00
Eloy DuránandMike Grabowski 41fa6e7f45 Add C++ and standard v14 settings.
Summary:
This PR adds the C++ stdlib to the linker flags and sets the C++ standard that’s used to v14.

I have tested this with my app, without it any CP build would fail unless users add those flags to the generated projects themselves.

/cc grabbou
Closes https://github.com/facebook/react-native/pull/7800

Differential Revision: D3360421

fbshipit-source-id: 0a80030dd255f073a201acc6e1c846be114c2c2a
2016-06-06 10:19:25 +02:00
Konstantin Raev 8b734173d3 [0.27.0-rc3] Bump version numbers 2016-06-05 19:47:08 +01:00
Konstantin Raev 252102588d [0.27.0-rc.3] Bump version numbers 2016-06-05 17:19:23 +01:00
Martin Konicek 76003f3720 [0.27.0-rc2] Bump version numbers 2016-05-27 16:51:49 +01:00
Eric RozellandMartin Konicek 3cabf4f98f Update node-haste dependency to 2.12.0
Summary:
Update to node-haste 2.12.0 to support pass through configuration of supported platforms.
Closes https://github.com/facebook/react-native/pull/7660

Differential Revision: D3335034

Pulled By: mkonicek

fbshipit-source-id: d238b90a90d51654301d61251ceb26d183fef57a
2016-05-27 16:42:19 +01:00
Mike Grabowski bbccdd5b84 [0.27.0-rc1] Bump version numbers 2016-05-25 02:26:29 +02:00
David AurelioandMike Grabowski cacf6b1267 Respect original enumerability/writability when polyfilling globals
Summary:
Reuses the original property descriptor when overwriting / polyfilling globals to ensure enumerability and writability are the same
Closes https://github.com/facebook/react-native/pull/7704

Differential Revision: D3338119

Pulled By: davidaurelio

fbshipit-source-id: ab456324a3346cd3ec8b2c3e3a2378408c92087c
2016-05-25 01:55:58 +02:00
Konstantin RaevandMike Grabowski 934acd809d Made npm deployment to be independent of git tags cache
Summary:
Fixes npm deployment script as in https://circleci.com/gh/facebook/react-native/6745.

Example situation:
- admin is ready to release 0.26.0
- admin adds tag v0.26.0 and pushes to origin
- Circle CI build fails because of code error
- admin cherry-picks a fix and tags v0.26.0 again and pushes to origin
- Circle does not update local tag v0.26.0 because it already has it cached, compiles the code but fails to deploy to npm because v0.26.0 is not on branch HEAD from Circle point of view

The previous version of the script was checking the tags on current commit as well but it used the local branch tags.
This change fetches tags from `origin` fresh and allows us to redeploy the same version multiple times.
Closes https://github.com/facebook/react-native/pull/7619

Differential Revision: D3334469

fbshipit-source-id: b423fc19516dc4f5f7f2605224e62b8a378c8a7d
2016-05-25 01:53:59 +02:00
Marc HorowitzandMike Grabowski 24a806a9f1 Fix chrome debugging on android
Summary:
Java loadApplicationScript changed, but the C++ code in the
debug ProxyExecutor which called it did not.  This fixes the fbjni
method lookup.

fixes #7659

Reviewed By: AaaChiuuu

Differential Revision: D3331472

fbshipit-source-id: 33312dccc3c7687f51742e42f9e0397f9c925e76
2016-05-25 01:53:29 +02:00
James Ide 7d1b4d681a [React] Use React 15.1.0 and stop using the alpha 2016-05-23 11:16:31 -07:00
Mike Grabowski 0f9e31cce8 [0.27.0-rc] Bump version numbers 2016-05-20 20:23:00 +02:00
7 changed files with 117 additions and 88 deletions
@@ -64,40 +64,47 @@ function setUpConsole() {
* https://github.com/facebook/react-native/issues/934
*/
function polyfillGlobal(name, newValue, scope = global) {
const descriptor = Object.getOwnPropertyDescriptor(scope, name) || {
// jest for some bad reasons runs the polyfill code multiple times. In jest
// environment, XmlHttpRequest doesn't exist so getOwnPropertyDescriptor
// returns undefined and defineProperty default for writable is false.
// Therefore, the second time it runs, defineProperty will fatal :(
writable: true,
};
if (scope[name] !== undefined) {
const descriptor = Object.getOwnPropertyDescriptor(scope, name);
if (descriptor) {
const backupName = `original${name[0].toUpperCase()}${name.substr(1)}`;
Object.defineProperty(scope, backupName, {...descriptor, value: scope[name]});
}
Object.defineProperty(scope, name, {...descriptor, value: newValue});
}
const {enumerable, writable} = descriptor || {};
function polyfillLazyGlobal(name, valueFn, scope = global) {
if (scope[name] !== undefined) {
const descriptor = Object.getOwnPropertyDescriptor(scope, name);
const backupName = `original${name[0].toUpperCase()}${name.substr(1)}`;
Object.defineProperty(scope, backupName, {...descriptor, value: scope[name]});
}
// jest for some bad reasons runs the polyfill code multiple times. In jest
// environment, XmlHttpRequest doesn't exist so getOwnPropertyDescriptor
// returns undefined and defineProperty default for writable is false.
// Therefore, the second time it runs, defineProperty will fatal :(
Object.defineProperty(scope, name, {
configurable: true,
enumerable: true,
enumerable: enumerable !== false,
writable: writable !== false,
value: newValue,
});
}
function polyfillLazyGlobal(name, valueFn, scope = global) {
const descriptor = getPropertyDescriptor(scope, name);
if (descriptor) {
const backupName = `original${name[0].toUpperCase()}${name.substr(1)}`;
Object.defineProperty(scope, backupName, descriptor);
}
const {enumerable, writable} = descriptor || {};
Object.defineProperty(scope, name, {
configurable: true,
enumerable: enumerable !== false,
get() {
return (this[name] = valueFn());
},
set(value) {
Object.defineProperty(this, name, {
configurable: true,
enumerable: true,
value
enumerable: enumerable !== false,
writable: writable !== false,
value,
});
}
});
@@ -211,6 +218,16 @@ function setUpDevTools() {
}
}
function getPropertyDescriptor(object, name) {
while (object) {
const descriptor = Object.getOwnPropertyDescriptor(object, name);
if (descriptor) {
return descriptor;
}
object = Object.getPrototypeOf(object);
}
}
setUpProcess();
setUpConsole();
setUpTimers();
+51 -49
View File
@@ -4,7 +4,7 @@ package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
Pod::Spec.new do |s|
s.name = "React"
s.version = package['version']
s.version = "0.27.0"
s.summary = package['description']
s.description = <<-DESC
React Native apps are built using the React JS
@@ -29,95 +29,97 @@ Pod::Spec.new do |s|
s.preserve_paths = "cli.js", "Libraries/**/*.js", "lint", "linter.js", "node_modules", "package.json", "packager", "PATENTS", "react-native-cli"
s.subspec 'Core' do |ss|
ss.source_files = "React/**/*.{c,h,m,mm,S}"
ss.exclude_files = "**/__tests__/*", "IntegrationTests/*"
ss.frameworks = "JavaScriptCore"
ss.source_files = "React/**/*.{c,h,m,mm,S}"
ss.exclude_files = "**/__tests__/*", "IntegrationTests/*"
ss.frameworks = "JavaScriptCore"
ss.libraries = "stdc++"
ss.pod_target_xcconfig = { "CLANG_CXX_LANGUAGE_STANDARD" => "c++14" }
end
s.subspec 'ART' do |ss|
ss.dependency 'React/Core'
ss.source_files = "Libraries/ART/**/*.{h,m}"
ss.preserve_paths = "Libraries/ART/**/*.js"
ss.dependency 'React/Core'
ss.source_files = "Libraries/ART/**/*.{h,m}"
ss.preserve_paths = "Libraries/ART/**/*.js"
end
s.subspec 'RCTActionSheet' do |ss|
ss.dependency 'React/Core'
ss.source_files = "Libraries/ActionSheetIOS/*.{h,m}"
ss.preserve_paths = "Libraries/ActionSheetIOS/*.js"
ss.dependency 'React/Core'
ss.source_files = "Libraries/ActionSheetIOS/*.{h,m}"
ss.preserve_paths = "Libraries/ActionSheetIOS/*.js"
end
s.subspec 'RCTAdSupport' do |ss|
ss.dependency 'React/Core'
ss.source_files = "Libraries/AdSupport/*.{h,m}"
ss.preserve_paths = "Libraries/AdSupport/*.js"
ss.dependency 'React/Core'
ss.source_files = "Libraries/AdSupport/*.{h,m}"
ss.preserve_paths = "Libraries/AdSupport/*.js"
end
s.subspec 'RCTCameraRoll' do |ss|
ss.dependency 'React/Core'
ss.dependency 'React/RCTImage'
ss.source_files = "Libraries/CameraRoll/*.{h,m}"
ss.preserve_paths = "Libraries/CameraRoll/*.js"
ss.dependency 'React/Core'
ss.dependency 'React/RCTImage'
ss.source_files = "Libraries/CameraRoll/*.{h,m}"
ss.preserve_paths = "Libraries/CameraRoll/*.js"
end
s.subspec 'RCTGeolocation' do |ss|
ss.dependency 'React/Core'
ss.source_files = "Libraries/Geolocation/*.{h,m}"
ss.preserve_paths = "Libraries/Geolocation/*.js"
ss.dependency 'React/Core'
ss.source_files = "Libraries/Geolocation/*.{h,m}"
ss.preserve_paths = "Libraries/Geolocation/*.js"
end
s.subspec 'RCTImage' do |ss|
ss.dependency 'React/Core'
ss.dependency 'React/RCTNetwork'
ss.source_files = "Libraries/Image/*.{h,m}"
ss.preserve_paths = "Libraries/Image/*.js"
ss.dependency 'React/Core'
ss.dependency 'React/RCTNetwork'
ss.source_files = "Libraries/Image/*.{h,m}"
ss.preserve_paths = "Libraries/Image/*.js"
end
s.subspec 'RCTNetwork' do |ss|
ss.dependency 'React/Core'
ss.source_files = "Libraries/Network/*.{h,m}"
ss.preserve_paths = "Libraries/Network/*.js"
ss.dependency 'React/Core'
ss.source_files = "Libraries/Network/*.{h,m}"
ss.preserve_paths = "Libraries/Network/*.js"
end
s.subspec 'RCTPushNotification' do |ss|
ss.dependency 'React/Core'
ss.source_files = "Libraries/PushNotificationIOS/*.{h,m}"
ss.preserve_paths = "Libraries/PushNotificationIOS/*.js"
ss.dependency 'React/Core'
ss.source_files = "Libraries/PushNotificationIOS/*.{h,m}"
ss.preserve_paths = "Libraries/PushNotificationIOS/*.js"
end
s.subspec 'RCTSettings' do |ss|
ss.dependency 'React/Core'
ss.source_files = "Libraries/Settings/*.{h,m}"
ss.preserve_paths = "Libraries/Settings/*.js"
ss.dependency 'React/Core'
ss.source_files = "Libraries/Settings/*.{h,m}"
ss.preserve_paths = "Libraries/Settings/*.js"
end
s.subspec 'RCTText' do |ss|
ss.dependency 'React/Core'
ss.source_files = "Libraries/Text/*.{h,m}"
ss.preserve_paths = "Libraries/Text/*.js"
ss.dependency 'React/Core'
ss.source_files = "Libraries/Text/*.{h,m}"
ss.preserve_paths = "Libraries/Text/*.js"
end
s.subspec 'RCTVibration' do |ss|
ss.dependency 'React/Core'
ss.source_files = "Libraries/Vibration/*.{h,m}"
ss.preserve_paths = "Libraries/Vibration/*.js"
ss.dependency 'React/Core'
ss.source_files = "Libraries/Vibration/*.{h,m}"
ss.preserve_paths = "Libraries/Vibration/*.js"
end
s.subspec 'RCTWebSocket' do |ss|
ss.dependency 'React/Core'
ss.source_files = "Libraries/WebSocket/*.{h,m}"
ss.preserve_paths = "Libraries/WebSocket/*.js"
ss.dependency 'React/Core'
ss.source_files = "Libraries/WebSocket/*.{h,m}"
ss.preserve_paths = "Libraries/WebSocket/*.js"
end
s.subspec 'RCTLinkingIOS' do |ss|
ss.dependency 'React/Core'
ss.source_files = "Libraries/LinkingIOS/*.{h,m}"
ss.preserve_paths = "Libraries/LinkingIOS/*.js"
ss.dependency 'React/Core'
ss.source_files = "Libraries/LinkingIOS/*.{h,m}"
ss.preserve_paths = "Libraries/LinkingIOS/*.js"
end
s.subspec 'RCTTest' do |ss|
ss.dependency 'React/Core'
ss.source_files = "Libraries/RCTTest/**/*.{h,m}"
ss.preserve_paths = "Libraries/RCTTest/**/*.js"
ss.frameworks = "XCTest"
ss.dependency 'React/Core'
ss.source_files = "Libraries/RCTTest/**/*.{h,m}"
ss.preserve_paths = "Libraries/RCTTest/**/*.js"
ss.frameworks = "XCTest"
end
end
+1 -1
View File
@@ -1,4 +1,4 @@
VERSION_NAME=1000.0.0-master
VERSION_NAME=0.27.0
GROUP=com.facebook.react
POM_NAME=ReactNative
@@ -41,14 +41,15 @@ ProxyExecutor::~ProxyExecutor() {
}
void ProxyExecutor::loadApplicationScript(
const std::string& script,
const std::string&,
const std::string& sourceURL) {
static auto loadApplicationScript =
jni::findClassStatic(EXECUTOR_BASECLASS)->getMethod<void(jstring, jstring)>("loadApplicationScript");
jni::findClassStatic(EXECUTOR_BASECLASS)->getMethod<void(jstring)>("loadApplicationScript");
// The proxy ignores the script data passed in.
loadApplicationScript(
m_executor.get(),
jni::make_jstring(script).get(),
jni::make_jstring(sourceURL).get());
}
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "react-native",
"version": "1000.0.0",
"version": "0.27.0",
"description": "A framework for building native apps using React",
"license": "BSD-3-Clause",
"repository": {
@@ -126,7 +126,7 @@
"react-native": "local-cli/wrong-react-native.js"
},
"peerDependencies": {
"react": "15.1.0-alpha.1"
"react": "15.1.0"
},
"dependencies": {
"absolute-path": "^0.0.0",
@@ -158,7 +158,7 @@
"mkdirp": "^0.5.1",
"module-deps": "^3.9.1",
"node-fetch": "^1.3.3",
"node-haste": "~2.11.0",
"node-haste": "~2.12.0",
"opn": "^3.0.2",
"optimist": "^0.6.1",
"progress": "^1.1.8",
@@ -189,7 +189,7 @@
"flow-bin": "^0.25.0",
"jest-cli": "11.0.2",
"portfinder": "0.4.0",
"react": "^15.1.0-alpha.1",
"react": "15.1.0",
"shelljs": "0.6.0"
}
}
}
+9 -5
View File
@@ -51,7 +51,7 @@ class AssetServer {
}
get(assetPath, platform = null) {
const assetData = getAssetDataFromName(assetPath);
const assetData = getAssetDataFromName(assetPath, new Set([platform]));
return this._getAssetRecord(assetPath, platform).then(record => {
for (let i = 0; i < record.scales.length; i++) {
if (record.scales[i] >= assetData.resolution) {
@@ -64,7 +64,7 @@ class AssetServer {
}
getAssetData(assetPath, platform = null) {
const nameData = getAssetDataFromName(assetPath);
const nameData = getAssetDataFromName(assetPath, new Set([platform]));
const data = {
name: nameData.name,
type: nameData.type,
@@ -115,7 +115,7 @@ class AssetServer {
.then(res => {
const dir = res[0];
const files = res[1];
const assetData = getAssetDataFromName(filename);
const assetData = getAssetDataFromName(filename, new Set([platform]));
const map = this._buildAssetMap(dir, files, platform);
@@ -166,8 +166,8 @@ class AssetServer {
});
}
_buildAssetMap(dir, files) {
const assets = files.map(getAssetDataFromName);
_buildAssetMap(dir, files, platform) {
const assets = files.map(this._getAssetDataFromName.bind(this, new Set([platform])));
const map = Object.create(null);
assets.forEach(function(asset, i) {
const file = files[i];
@@ -194,6 +194,10 @@ class AssetServer {
return map;
}
_getAssetDataFromName(platform, file) {
return getAssetDataFromName(file, platform);
}
}
function getAssetKey(assetName, platform) {
+10 -5
View File
@@ -60,12 +60,17 @@ if (buildBranch.indexOf(`-stable`) !== -1) {
exit(0);
}
// ['latest', 'v0.33.0', 'v0.33.0-rc', 'v0.33.0-rc1', 'v0.33.0-rc2', 'v0.34.0', '']
const tagsWithVersion = exec(`git tag -l --points-at HEAD`).stdout.split(/\s/)
// ['v0.33.0', 'v0.33.0-rc', 'v0.33.0-rc1', 'v0.33.0-rc2', 'v0.34.0']
.filter(version => !!version && version.indexOf(`v${branchVersion}`) === 0)
// 34c034298dc9cad5a4553964a5a324450fda0385
const currentCommit = exec(`git rev-parse HEAD`, {silent: true}).stdout.trim();
// [34c034298dc9cad5a4553964a5a324450fda0385, refs/heads/0.33-stable, refs/tags/latest, refs/tags/v0.33.1, refs/tags/v0.34.1-rc]
const tagsWithVersion = exec(`git ls-remote origin | grep ${currentCommit}`, {silent: true})
.stdout.split(/\s/)
// ['refs/tags/v0.33.0', 'refs/tags/v0.33.0-rc', 'refs/tags/v0.33.0-rc1', 'refs/tags/v0.33.0-rc2', 'refs/tags/v0.34.0']
.filter(version => !!version && version.indexOf(`refs/tags/v${branchVersion}`) === 0)
// ['refs/tags/v0.33.0', 'refs/tags/v0.33.0-rc', 'refs/tags/v0.33.0-rc1', 'refs/tags/v0.33.0-rc2']
.filter(version => version.indexOf(branchVersion) !== -1)
// ['v0.33.0', 'v0.33.0-rc', 'v0.33.0-rc1', 'v0.33.0-rc2']
.filter(version => version.indexOf(branchVersion) !== -1);
.map(version => version.slice(`refs/tags/`.length));
if (tagsWithVersion.length === 0) {
echo(`Error: Can't find version tag in current commit. To deploy to NPM you must add tag v0.XY.Z[-rc] to your commit`);