mirror of https://github.com/status-im/metro.git
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:
parent
ef0b3e9338
commit
1d1006449e
71
blacklist.js
71
blacklist.js
|
@ -13,37 +13,58 @@ var path = require('path');
|
||||||
// Don't forget to everything listed here to `testConfig.json`
|
// Don't forget to everything listed here to `testConfig.json`
|
||||||
// modulePathIgnorePatterns.
|
// modulePathIgnorePatterns.
|
||||||
var sharedBlacklist = [
|
var sharedBlacklist = [
|
||||||
'node_modules/react-tools/src/React.js',
|
'node_modules/react-haste/renderers/shared/event/eventPlugins/ResponderEventPlugin.js',
|
||||||
'node_modules/react-tools/src/renderers/shared/event/EventPropagators.js',
|
'node_modules/react-haste/React.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',
|
|
||||||
|
|
||||||
// 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.
|
// internal version otherwise they won't work in open source.
|
||||||
'downstream/core/invariant.js',
|
'downstream/core/CSSCore.js',
|
||||||
'downstream/key-mirror/keyMirror.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/emptyFunction.js',
|
||||||
'downstream/core/emptyObject.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/getMarkupWrap.js',
|
||||||
|
'downstream/core/hyphenate.js',
|
||||||
'downstream/core/hyphenateStyleName.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
|
// Raw unescaped patterns in case you need to use wildcards
|
||||||
|
|
|
@ -2245,9 +2245,9 @@ describe('DependencyGraph', function() {
|
||||||
'require("wontWork");',
|
'require("wontWork");',
|
||||||
].join('\n'),
|
].join('\n'),
|
||||||
'node_modules': {
|
'node_modules': {
|
||||||
'react-tools': {
|
'react-haste': {
|
||||||
'package.json': JSON.stringify({
|
'package.json': JSON.stringify({
|
||||||
name: 'react-tools',
|
name: 'react-haste',
|
||||||
main: 'main.js',
|
main: 'main.js',
|
||||||
}),
|
}),
|
||||||
'main.js': [
|
'main.js': [
|
||||||
|
@ -2315,7 +2315,7 @@ describe('DependencyGraph', function() {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'shouldWork',
|
id: 'shouldWork',
|
||||||
path: '/root/node_modules/react-tools/main.js',
|
path: '/root/node_modules/react-haste/main.js',
|
||||||
dependencies: ['submodule'],
|
dependencies: ['submodule'],
|
||||||
isAsset: false,
|
isAsset: false,
|
||||||
isAsset_DEPRECATED: false,
|
isAsset_DEPRECATED: false,
|
||||||
|
@ -2325,7 +2325,7 @@ describe('DependencyGraph', function() {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'submodule/main.js',
|
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: [],
|
dependencies: [],
|
||||||
isAsset: false,
|
isAsset: false,
|
||||||
isAsset_DEPRECATED: false,
|
isAsset_DEPRECATED: false,
|
||||||
|
@ -2338,9 +2338,9 @@ describe('DependencyGraph', function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
pit('should not be confused by prev occuring whitelisted names', function() {
|
pit('should not be confused by prev occuring whitelisted names', function() {
|
||||||
var root = '/react-tools';
|
var root = '/react-haste';
|
||||||
fs.__setMockFilesystem({
|
fs.__setMockFilesystem({
|
||||||
'react-tools': {
|
'react-haste': {
|
||||||
'index.js': [
|
'index.js': [
|
||||||
'/**',
|
'/**',
|
||||||
' * @providesModule index',
|
' * @providesModule index',
|
||||||
|
@ -2348,9 +2348,9 @@ describe('DependencyGraph', function() {
|
||||||
'require("shouldWork");',
|
'require("shouldWork");',
|
||||||
].join('\n'),
|
].join('\n'),
|
||||||
'node_modules': {
|
'node_modules': {
|
||||||
'react-tools': {
|
'react-haste': {
|
||||||
'package.json': JSON.stringify({
|
'package.json': JSON.stringify({
|
||||||
name: 'react-tools',
|
name: 'react-haste',
|
||||||
main: 'main.js',
|
main: 'main.js',
|
||||||
}),
|
}),
|
||||||
'main.js': [
|
'main.js': [
|
||||||
|
@ -2369,12 +2369,12 @@ describe('DependencyGraph', function() {
|
||||||
assetExts: ['png', 'jpg'],
|
assetExts: ['png', 'jpg'],
|
||||||
cache: cache,
|
cache: cache,
|
||||||
});
|
});
|
||||||
return getOrderedDependenciesAsJSON(dgraph, '/react-tools/index.js').then(function(deps) {
|
return getOrderedDependenciesAsJSON(dgraph, '/react-haste/index.js').then(function(deps) {
|
||||||
expect(deps)
|
expect(deps)
|
||||||
.toEqual([
|
.toEqual([
|
||||||
{
|
{
|
||||||
id: 'index',
|
id: 'index',
|
||||||
path: '/react-tools/index.js',
|
path: '/react-haste/index.js',
|
||||||
dependencies: ['shouldWork'],
|
dependencies: ['shouldWork'],
|
||||||
isAsset: false,
|
isAsset: false,
|
||||||
isAsset_DEPRECATED: false,
|
isAsset_DEPRECATED: false,
|
||||||
|
@ -2384,7 +2384,7 @@ describe('DependencyGraph', function() {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'shouldWork',
|
id: 'shouldWork',
|
||||||
path: '/react-tools/node_modules/react-tools/main.js',
|
path: '/react-haste/node_modules/react-haste/main.js',
|
||||||
dependencies: [],
|
dependencies: [],
|
||||||
isAsset: false,
|
isAsset: false,
|
||||||
isAsset_DEPRECATED: false,
|
isAsset_DEPRECATED: false,
|
||||||
|
|
|
@ -49,7 +49,8 @@ const validateOpts = declareOpts({
|
||||||
providesModuleNodeModules: {
|
providesModuleNodeModules: {
|
||||||
type: 'array',
|
type: 'array',
|
||||||
default: [
|
default: [
|
||||||
'react-tools',
|
'fbjs-haste',
|
||||||
|
'react-haste',
|
||||||
'react-native',
|
'react-native',
|
||||||
// Parse requires AsyncStorage. They will
|
// Parse requires AsyncStorage. They will
|
||||||
// change that to require('react-native') which
|
// change that to require('react-native') which
|
||||||
|
|
Loading…
Reference in New Issue