From a8a501b5cf7acf39d0723b436b3d31f54fe26766 Mon Sep 17 00:00:00 2001 From: David Aurelio Date: Wed, 2 Mar 2016 04:27:13 -0800 Subject: [PATCH] Remove knowledge of fbjs from the packager MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- blacklist.js | 49 ---------------------------- package.json | 2 +- react-packager/src/Resolver/index.js | 1 - 3 files changed, 1 insertion(+), 51 deletions(-) diff --git a/blacklist.js b/blacklist.js index ee369e1a..27ec2899 100644 --- a/blacklist.js +++ b/blacklist.js @@ -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\/.*/, diff --git a/package.json b/package.json index 117369a7..cf2306f0 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "0.1.3", + "version": "0.1.4", "name": "react-native-packager", "description": "Build native apps with React!", "repository": { diff --git a/react-packager/src/Resolver/index.js b/react-packager/src/Resolver/index.js index 76d8d5af..d60e0fb2 100644 --- a/react-packager/src/Resolver/index.js +++ b/react-packager/src/Resolver/index.js @@ -84,7 +84,6 @@ class Resolver { (opts.blacklistRE && opts.blacklistRE.test(filepath)); }, providesModuleNodeModules: [ - 'fbjs', 'react', 'react-native', // Parse requires AsyncStorage. They will