Skip to content

Commit e554ac6

Browse files
davidaureliopglotov
authored andcommitted
Remove knowledge of fbjs from the packager
Summary:Follow-up to facebook#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#5084 Reviewed By: bestander Differential Revision: D2926835 fb-gh-sync-id: 2095e22b2f38e032599d1f2601722b3560e8b6e9 shipit-source-id: 2095e22b2f38e032599d1f2601722b3560e8b6e9
1 parent a1fd382 commit e554ac6

File tree

98 files changed

+232
-402
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+232
-402
lines changed

.flowconfig

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,8 @@
1515
# Ignore react and fbjs where there are overlaps, but don't ignore
1616
# anything that react-native relies on
1717
.*/node_modules/fbjs/lib/Map.js
18-
.*/node_modules/fbjs/lib/Promise.js
1918
.*/node_modules/fbjs/lib/fetch.js
2019
.*/node_modules/fbjs/lib/ExecutionEnvironment.js
21-
.*/node_modules/fbjs/lib/isEmpty.js
22-
.*/node_modules/fbjs/lib/crc32.js
2320
.*/node_modules/fbjs/lib/ErrorUtils.js
2421

2522
# Flow has a built-in definition for the 'react' module which we prefer to use
@@ -28,6 +25,11 @@
2825
.*/node_modules/react/lib/React.js
2926
.*/node_modules/react/lib/ReactDOM.js
3027

28+
.*/__mocks__/.*
29+
.*/__tests__/.*
30+
31+
.*/commoner/test/source/widget/share.js
32+
3133
# Ignore commoner tests
3234
.*/node_modules/commoner/test/.*
3335

Examples/Movies/SearchScreen.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ var {
2727
} = React;
2828
var TimerMixin = require('react-timer-mixin');
2929

30-
var invariant = require('invariant');
30+
var invariant = require('fbjs/lib/invariant');
3131
var dismissKeyboard = require('dismissKeyboard');
3232

3333
var MovieCell = require('./MovieCell');

Examples/UIExplorer/createExamplePage.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ var ReactNative = require('ReactNative');
2424
var UIExplorerBlock = require('./UIExplorerBlock');
2525
var UIExplorerPage = require('./UIExplorerPage');
2626

27-
var invariant = require('invariant');
27+
var invariant = require('fbjs/lib/invariant');
2828

2929
import type { Example, ExampleModule } from 'ExampleTypes';
3030

IntegrationTests/IntegrationTestHarnessTest.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*/
1111
'use strict';
1212

13-
var requestAnimationFrame = require('requestAnimationFrame');
13+
var requestAnimationFrame = require('fbjs/lib/requestAnimationFrame');
1414
var React = require('react-native');
1515
var {
1616
Text,

IntegrationTests/LoggingTestModule.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212

1313
var BatchedBridge = require('BatchedBridge');
1414

15-
var warning = require('warning');
16-
var invariant = require('invariant');
15+
var warning = require('fbjs/lib/warning');
16+
var invariant = require('fbjs/lib/invariant');
1717

1818
var LoggingTestModule = {
1919
logToConsole: function(str) {

IntegrationTests/SimpleSnapshotTest.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
'use strict';
1212

1313
var React = require('react-native');
14-
var requestAnimationFrame = require('requestAnimationFrame');
14+
var requestAnimationFrame = require('fbjs/lib/requestAnimationFrame');
1515

1616
var {
1717
StyleSheet,

Libraries/ActionSheetIOS/ActionSheetIOS.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
var RCTActionSheetManager = require('NativeModules').ActionSheetManager;
1515

16-
var invariant = require('invariant');
16+
var invariant = require('fbjs/lib/invariant');
1717
var processColor = require('processColor');
1818

1919
var ActionSheetIOS = {

Libraries/Animated/src/AnimatedImplementation.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ var SpringConfig = require('SpringConfig');
2020
var ViewStylePropTypes = require('ViewStylePropTypes');
2121

2222
var flattenStyle = require('flattenStyle');
23-
var invariant = require('invariant');
24-
var requestAnimationFrame = require('requestAnimationFrame');
23+
var invariant = require('fbjs/lib/invariant');
24+
var requestAnimationFrame = require('fbjs/lib/requestAnimationFrame');
2525

2626
import type { InterpolationConfigType } from 'Interpolation';
2727

Libraries/AppRegistry/AppRegistry.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
var BatchedBridge = require('BatchedBridge');
1515
var ReactNative = require('ReactNative');
1616

17-
var invariant = require('invariant');
17+
var invariant = require('fbjs/lib/invariant');
1818
var renderApplication = require('renderApplication');
1919

2020
if (__DEV__) {

Libraries/AppState/AppState.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ var RCTDeviceEventEmitter = require('RCTDeviceEventEmitter');
1717
var RCTAppState = NativeModules.AppState;
1818

1919
var logError = require('logError');
20-
var invariant = require('invariant');
20+
var invariant = require('fbjs/lib/invariant');
2121

2222
var _eventHandlers = {
2323
change: new Map(),

0 commit comments

Comments
 (0)