diff --git a/Libraries/Components/RefreshControl/RefreshControl.js b/Libraries/Components/RefreshControl/RefreshControl.js index 9b287cc4a..57d381d4e 100644 --- a/Libraries/Components/RefreshControl/RefreshControl.js +++ b/Libraries/Components/RefreshControl/RefreshControl.js @@ -15,7 +15,7 @@ const React = require('React'); const {NativeComponent} = require('ReactNative'); const requireNativeComponent = require('requireNativeComponent'); -const nullthrows = require('fbjs/lib/nullthrows'); +const nullthrows = require('nullthrows'); import type {ColorValue} from 'StyleSheetTypes'; import type {ViewProps} from 'ViewPropTypes'; diff --git a/Libraries/Components/ScrollResponder.js b/Libraries/Components/ScrollResponder.js index 548efba80..08d627513 100644 --- a/Libraries/Components/ScrollResponder.js +++ b/Libraries/Components/ScrollResponder.js @@ -19,7 +19,7 @@ const TextInputState = require('TextInputState'); const UIManager = require('UIManager'); const invariant = require('fbjs/lib/invariant'); -const nullthrows = require('fbjs/lib/nullthrows'); +const nullthrows = require('nullthrows'); const performanceNow = require('fbjs/lib/performanceNow'); const warning = require('fbjs/lib/warning'); diff --git a/Libraries/Experimental/WindowedListView.js b/Libraries/Experimental/WindowedListView.js index 15f1d0b4a..36573558c 100644 --- a/Libraries/Experimental/WindowedListView.js +++ b/Libraries/Experimental/WindowedListView.js @@ -24,7 +24,7 @@ const clamp = require('clamp'); const deepDiffer = require('deepDiffer'); const infoLog = require('infoLog'); const invariant = require('fbjs/lib/invariant'); -const nullthrows = require('fbjs/lib/nullthrows'); +const nullthrows = require('nullthrows'); import type {NativeMethodsMixinType} from 'ReactNativeTypes'; diff --git a/Libraries/Text/Text.js b/Libraries/Text/Text.js index 1974dbeab..749183c3e 100644 --- a/Libraries/Text/Text.js +++ b/Libraries/Text/Text.js @@ -18,7 +18,7 @@ const Touchable = require('Touchable'); const UIManager = require('UIManager'); const createReactNativeComponentClass = require('createReactNativeComponentClass'); -const nullthrows = require('fbjs/lib/nullthrows'); +const nullthrows = require('nullthrows'); const processColor = require('processColor'); import type {PressEvent} from 'CoreEventTypes'; diff --git a/flow/fbjs.js b/flow/fbjs.js index 9106e436d..35ef6a98e 100644 --- a/flow/fbjs.js +++ b/flow/fbjs.js @@ -14,7 +14,3 @@ declare module 'fbjs/lib/invariant' { ...args: Array ) => void; } - -declare module 'fbjs/lib/nullthrows' { - declare module.exports: (value: ?T) => T; -} diff --git a/package.json b/package.json index 6d65d7d36..9767f7543 100644 --- a/package.json +++ b/package.json @@ -68,7 +68,6 @@ "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", @@ -181,6 +180,7 @@ "node-fetch": "^2.2.0", "node-notifier": "^5.2.1", "npmlog": "^2.0.4", + "nullthrows": "^1.1.0", "opn": "^3.0.2", "optimist": "^0.6.1", "plist": "^3.0.0",