Update core libraries for React 0.14 final

Summary: All minor changes since we were already on the beta: most notable is that destructors are required in pooling to help prevent memory leaks.

public

Reviewed By: sebmarkbage

Differential Revision: D2608692

fb-gh-sync-id: acdad38768f7f48c0f0e7e44cbff6f0db316f4ca
This commit is contained in:
Ben Alpert 2015-11-06 19:50:10 -08:00 committed by facebook-github-bot-7
parent ef0b3e9338
commit 1d1006449e
3 changed files with 59 additions and 37 deletions

View File

@ -13,37 +13,58 @@ var path = require('path');
// Don't forget to everything listed here to `testConfig.json`
// modulePathIgnorePatterns.
var sharedBlacklist = [
'node_modules/react-tools/src/React.js',
'node_modules/react-tools/src/renderers/shared/event/EventPropagators.js',
'node_modules/react-tools/src/renderers/shared/event/eventPlugins/ResponderEventPlugin.js',
'node_modules/react-tools/src/shared/vendor/core/ExecutionEnvironment.js',
'node_modules/react-tools/docs/js/react.js',
'node_modules/react-tools/src/package.json',
'node_modules/react-haste/renderers/shared/event/eventPlugins/ResponderEventPlugin.js',
'node_modules/react-haste/React.js',
// Those conflicts with the ones in react-tools/. We need to blacklist the
// For each of these fbjs files (especially the non-forks/stubs), we should
// consider deleting the conflicting copy and just using the fbjs version.
'node_modules/fbjs-haste/__forks__/Map.js',
'node_modules/fbjs-haste/__forks__/Promise.js',
'node_modules/fbjs-haste/__forks__/fetch.js',
'node_modules/fbjs-haste/core/Deferred.js',
'node_modules/fbjs-haste/core/PromiseMap.js',
'node_modules/fbjs-haste/core/areEqual.js',
'node_modules/fbjs-haste/core/flattenArray.js',
'node_modules/fbjs-haste/core/isEmpty.js',
'node_modules/fbjs-haste/core/removeFromArray.js',
'node_modules/fbjs-haste/core/resolveImmediate.js',
'node_modules/fbjs-haste/core/sprintf.js',
'node_modules/fbjs-haste/crypto/crc32.js',
'node_modules/fbjs-haste/fetch/fetchWithRetries.js',
'node_modules/fbjs-haste/functional/everyObject.js',
'node_modules/fbjs-haste/functional/filterObject.js',
'node_modules/fbjs-haste/functional/forEachObject.js',
'node_modules/fbjs-haste/functional/someObject.js',
'node_modules/fbjs-haste/request/xhrSimpleDataSerializer.js',
'node_modules/fbjs-haste/stubs/ErrorUtils.js',
'node_modules/fbjs-haste/stubs/URI.js',
'node_modules/fbjs-haste/useragent/UserAgent.js',
'node_modules/fbjs-haste/utils/nullthrows.js',
// Those conflicts with the ones in fbjs-haste/. We need to blacklist the
// internal version otherwise they won't work in open source.
'downstream/core/invariant.js',
'downstream/key-mirror/keyMirror.js',
'downstream/core/CSSCore.js',
'downstream/core/TouchEventUtils.js',
'downstream/core/camelize.js',
'downstream/core/createArrayFromMixed.js',
'downstream/core/createNodesFromMarkup.js',
'downstream/core/dom/containsNode.js',
'downstream/core/dom/focusNode.js',
'downstream/core/dom/getActiveElement.js',
'downstream/core/dom/getUnboundedScrollPosition.js',
'downstream/core/dom/isNode.js',
'downstream/core/dom/isTextNode.js',
'downstream/core/emptyFunction.js',
'downstream/core/emptyObject.js',
'downstream/key-mirror/keyOf.js',
'downstream/core/dom/isNode.js',
'downstream/core/TouchEventUtils.js',
'downstream/core/nativeRequestAnimationFrame.js',
'downstream/core/dom/containsNode.js',
'downstream/core/dom/isTextNode.js',
'downstream/functional/mapObject.js',
'downstream/core/camelize.js',
'downstream/core/hyphenate.js',
'downstream/core/createArrayFromMixed.js',
'downstream/core/toArray.js',
'downstream/core/dom/getActiveElement.js',
'downstream/core/dom/focusNode.js',
'downstream/core/dom/getUnboundedScrollPosition.js',
'downstream/core/createNodesFromMarkup.js',
'downstream/core/CSSCore.js',
'downstream/core/getMarkupWrap.js',
'downstream/core/hyphenate.js',
'downstream/core/hyphenateStyleName.js',
'downstream/core/invariant.js',
'downstream/core/nativeRequestAnimationFrame.js',
'downstream/core/toArray.js',
'downstream/functional/mapObject.js',
'downstream/key-mirror/keyMirror.js',
'downstream/key-mirror/keyOf.js',
];
// Raw unescaped patterns in case you need to use wildcards

View File

@ -2245,9 +2245,9 @@ describe('DependencyGraph', function() {
'require("wontWork");',
].join('\n'),
'node_modules': {
'react-tools': {
'react-haste': {
'package.json': JSON.stringify({
name: 'react-tools',
name: 'react-haste',
main: 'main.js',
}),
'main.js': [
@ -2315,7 +2315,7 @@ describe('DependencyGraph', function() {
},
{
id: 'shouldWork',
path: '/root/node_modules/react-tools/main.js',
path: '/root/node_modules/react-haste/main.js',
dependencies: ['submodule'],
isAsset: false,
isAsset_DEPRECATED: false,
@ -2325,7 +2325,7 @@ describe('DependencyGraph', function() {
},
{
id: 'submodule/main.js',
path: '/root/node_modules/react-tools/node_modules/submodule/main.js',
path: '/root/node_modules/react-haste/node_modules/submodule/main.js',
dependencies: [],
isAsset: false,
isAsset_DEPRECATED: false,
@ -2338,9 +2338,9 @@ describe('DependencyGraph', function() {
});
pit('should not be confused by prev occuring whitelisted names', function() {
var root = '/react-tools';
var root = '/react-haste';
fs.__setMockFilesystem({
'react-tools': {
'react-haste': {
'index.js': [
'/**',
' * @providesModule index',
@ -2348,9 +2348,9 @@ describe('DependencyGraph', function() {
'require("shouldWork");',
].join('\n'),
'node_modules': {
'react-tools': {
'react-haste': {
'package.json': JSON.stringify({
name: 'react-tools',
name: 'react-haste',
main: 'main.js',
}),
'main.js': [
@ -2369,12 +2369,12 @@ describe('DependencyGraph', function() {
assetExts: ['png', 'jpg'],
cache: cache,
});
return getOrderedDependenciesAsJSON(dgraph, '/react-tools/index.js').then(function(deps) {
return getOrderedDependenciesAsJSON(dgraph, '/react-haste/index.js').then(function(deps) {
expect(deps)
.toEqual([
{
id: 'index',
path: '/react-tools/index.js',
path: '/react-haste/index.js',
dependencies: ['shouldWork'],
isAsset: false,
isAsset_DEPRECATED: false,
@ -2384,7 +2384,7 @@ describe('DependencyGraph', function() {
},
{
id: 'shouldWork',
path: '/react-tools/node_modules/react-tools/main.js',
path: '/react-haste/node_modules/react-haste/main.js',
dependencies: [],
isAsset: false,
isAsset_DEPRECATED: false,

View File

@ -49,7 +49,8 @@ const validateOpts = declareOpts({
providesModuleNodeModules: {
type: 'array',
default: [
'react-tools',
'fbjs-haste',
'react-haste',
'react-native',
// Parse requires AsyncStorage. They will
// change that to require('react-native') which