Remove knowledge of fbjs from the packager

Summary:Follow-up to https://github.com/facebook/react-native/pull/5084

This…
- changes all requires within RN to `require('fbjs/lib/…')`
- updates `.flowconfig`
- updates `packager/blacklist.js`
- adapts tests
- removes things from `Libraries/vendor/{core,emitter}` that are also in fbjs
- removes knowledge of `fbjs` from the packager

Closes https://github.com/facebook/react-native/pull/5084

Reviewed By: bestander

Differential Revision: D2926835

fb-gh-sync-id: 2095e22b2f38e032599d1f2601722b3560e8b6e9
shipit-source-id: 2095e22b2f38e032599d1f2601722b3560e8b6e9
This commit is contained in:
David Aurelio 2016-03-02 04:27:13 -08:00 committed by Facebook Github Bot 2
parent 5309991ba6
commit a8a501b5cf
3 changed files with 1 additions and 51 deletions

View File

@ -17,57 +17,8 @@ var sharedBlacklist = [
'node_modules/react/lib/React.js', 'node_modules/react/lib/React.js',
'node_modules/react/lib/ReactDOM.js', 'node_modules/react/lib/ReactDOM.js',
// For each of these fbjs files (especially the non-forks/stubs), we should
// consider deleting the conflicting copy and just using the fbjs version.
//
// fbjs forks: // fbjs forks:
'node_modules/fbjs/lib/Map.js', 'node_modules/fbjs/lib/Map.js',
'node_modules/fbjs/lib/Promise.js',
'node_modules/fbjs/lib/fetch.js',
// fbjs stubs:
'node_modules/fbjs/lib/ErrorUtils.js',
'node_modules/fbjs/lib/URI.js',
// fbjs modules:
'node_modules/fbjs/lib/Deferred.js',
'node_modules/fbjs/lib/PromiseMap.js',
'node_modules/fbjs/lib/UserAgent.js',
'node_modules/fbjs/lib/areEqual.js',
'node_modules/fbjs/lib/base62.js',
'node_modules/fbjs/lib/crc32.js',
'node_modules/fbjs/lib/everyObject.js',
'node_modules/fbjs/lib/fetchWithRetries.js',
'node_modules/fbjs/lib/filterObject.js',
'node_modules/fbjs/lib/flattenArray.js',
'node_modules/fbjs/lib/forEachObject.js',
'node_modules/fbjs/lib/isEmpty.js',
'node_modules/fbjs/lib/nullthrows.js',
'node_modules/fbjs/lib/removeFromArray.js',
'node_modules/fbjs/lib/resolveImmediate.js',
'node_modules/fbjs/lib/someObject.js',
'node_modules/fbjs/lib/sprintf.js',
'node_modules/fbjs/lib/xhrSimpleDataSerializer.js',
// Those conflicts with the ones in fbjs/. We need to blacklist the
// internal version otherwise they won't work in open source.
'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/core/getMarkupWrap.js',
'downstream/core/hyphenate.js',
'downstream/core/hyphenateStyleName.js',
'downstream/core/invariant.js',
'downstream/core/nativeRequestAnimationFrame.js',
'downstream/core/toArray.js',
/website\/node_modules\/.*/, /website\/node_modules\/.*/,

View File

@ -1,5 +1,5 @@
{ {
"version": "0.1.3", "version": "0.1.4",
"name": "react-native-packager", "name": "react-native-packager",
"description": "Build native apps with React!", "description": "Build native apps with React!",
"repository": { "repository": {

View File

@ -84,7 +84,6 @@ class Resolver {
(opts.blacklistRE && opts.blacklistRE.test(filepath)); (opts.blacklistRE && opts.blacklistRE.test(filepath));
}, },
providesModuleNodeModules: [ providesModuleNodeModules: [
'fbjs',
'react', 'react',
'react-native', 'react-native',
// Parse requires AsyncStorage. They will // Parse requires AsyncStorage. They will