Skip to content

Commit

Permalink
Remove knowledge of fbjs from the packager
Browse files Browse the repository at this point in the history
Summary:Follow-up to facebook/react-native#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 facebook/react-native#5084

Reviewed By: bestander

Differential Revision: D2926835

fb-gh-sync-id: 2095e22b2f38e032599d1f2601722b3560e8b6e9
shipit-source-id: 2095e22b2f38e032599d1f2601722b3560e8b6e9
  • Loading branch information
davidaurelio authored and Facebook Github Bot 2 committed Mar 2, 2016
1 parent 5309991 commit a8a501b
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 51 deletions.
49 changes: 0 additions & 49 deletions blacklist.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,57 +17,8 @@ var sharedBlacklist = [
'node_modules/react/lib/React.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:
'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\/.*/,

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.1.3",
"version": "0.1.4",
"name": "react-native-packager",
"description": "Build native apps with React!",
"repository": {
Expand Down
1 change: 0 additions & 1 deletion react-packager/src/Resolver/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ class Resolver {
(opts.blacklistRE && opts.blacklistRE.test(filepath));
},
providesModuleNodeModules: [
'fbjs',
'react',
'react-native',
// Parse requires AsyncStorage. They will
Expand Down

0 comments on commit a8a501b

Please sign in to comment.