JS: Switch to `nullthrows` Package [1/4]
Summary: Switches to the `nullthrows` package instead of using `fbjs/lib/nullthrows`. The version of `nullthrows` in `fbjs` is outdated and already missing features that exist in the standalone `nullthrows` package. Also, this mitigates the inevitable collision between `nullthrows` (as a Haste module) and `nullthrows` (as a `node_modules` dependency). Reviewed By: zertosh Differential Revision: D9733178 fbshipit-source-id: 1b589d48c1ed57cebf2088b796ad72e212534c0a
This commit is contained in:
parent
1830f9baae
commit
5023b105e4
|
@ -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';
|
||||
|
|
|
@ -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');
|
||||
|
||||
|
|
|
@ -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';
|
||||
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -14,7 +14,3 @@ declare module 'fbjs/lib/invariant' {
|
|||
...args: Array<any>
|
||||
) => void;
|
||||
}
|
||||
|
||||
declare module 'fbjs/lib/nullthrows' {
|
||||
declare module.exports: <T>(value: ?T) => T;
|
||||
}
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue