Skip to content

Commit b61383b

Browse files
yungstersfacebook-github-bot
authored andcommitted
JS: Switch to nullthrows Package [2/4]
Reviewed By: zertosh Differential Revision: D9733366 fbshipit-source-id: ec46638dda5753f046420eb6a32f7d3f63156f06
1 parent 3e5833b commit b61383b

11 files changed

Lines changed: 15 additions & 8 deletions

File tree

packages/metro-visualizer/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"fbjs": "0.8.17",
2828
"filesize": "^3.6.1",
2929
"fuzzy-search": "^2.1.0",
30+
"nullthrows": "^1.1.0",
3031
"react": "16.4.1",
3132
"react-dom": "^16.4.1",
3233
"react-router-dom": "^4.2.2",

packages/metro-visualizer/src/app/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const GraphApp = require('./graph/GraphApp');
1717
const React = require('react');
1818
const ReactDOM = require('react-dom');
1919

20-
const nullthrows = require('fbjs/lib/nullthrows');
20+
const nullthrows = require('nullthrows');
2121

2222
const {HashRouter, Route} = require('react-router-dom');
2323

packages/metro/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
"mime-types": "2.1.11",
8686
"mkdirp": "^0.5.1",
8787
"node-fetch": "^2.2.0",
88+
"nullthrows": "^1.1.0",
8889
"react-transform-hmr": "^1.0.4",
8990
"resolve": "^1.5.0",
9091
"rimraf": "^2.5.4",

packages/metro/src/DeltaBundler/Serializers/getRamBundleInfo.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
const fullSourceMapObject = require('./sourceMapObject');
1414
const getAppendScripts = require('../../lib/getAppendScripts');
1515
const getTransitiveDependencies = require('./helpers/getTransitiveDependencies');
16-
const nullthrows = require('fbjs/lib/nullthrows');
16+
const nullthrows = require('nullthrows');
1717
const path = require('path');
1818

1919
const {createRamBundleGroups} = require('../../Bundler/util');

packages/metro/src/DeltaBundler/traverseDependencies.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-
const nullthrows = require('fbjs/lib/nullthrows');
13+
const nullthrows = require('nullthrows');
1414

1515
import type {TransformResultDependency} from '../ModuleGraph/types.flow';
1616
import type {Dependency, Graph, Module, Options} from './types.flow';

packages/metro/src/HmrServer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
const formatBundlingError = require('./lib/formatBundlingError');
1414
const getEntryAbsolutePath = require('./lib/getEntryAbsolutePath');
1515
const hmrJSBundle = require('./DeltaBundler/Serializers/hmrJSBundle');
16-
const nullthrows = require('fbjs/lib/nullthrows');
16+
const nullthrows = require('nullthrows');
1717
const parseCustomTransformOptions = require('./lib/parseCustomTransformOptions');
1818
const url = require('url');
1919

packages/metro/src/ModuleGraph/node-haste/Package.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-
const nullthrows = require('fbjs/lib/nullthrows');
13+
const nullthrows = require('nullthrows');
1414
const path = require('path');
1515

1616
import type {PackageData} from '../types.flow';

packages/metro/src/ModuleGraph/worker/collectDependencies.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-
const nullthrows = require('fbjs/lib/nullthrows');
13+
const nullthrows = require('nullthrows');
1414

1515
const generate = require('@babel/generator').default;
1616
const template = require('@babel/template').default;

packages/metro/src/Server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const debug = require('debug')('Metro:Server');
2626
const formatBundlingError = require('./lib/formatBundlingError');
2727
const getPrependedScripts = require('./lib/getPrependedScripts');
2828
const mime = require('mime-types');
29-
const nullthrows = require('fbjs/lib/nullthrows');
29+
const nullthrows = require('nullthrows');
3030
const parseCustomTransformOptions = require('./lib/parseCustomTransformOptions');
3131
const parsePlatformFilePath = require('./node-haste/lib/parsePlatformFilePath');
3232
const path = require('path');

packages/metro/src/lib/parseCustomTransformOptions.js

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

1212
'use strict';
1313

14-
const nullthrows = require('fbjs/lib/nullthrows');
14+
const nullthrows = require('nullthrows');
1515

1616
import type {CustomTransformOptions} from '../JSTransformer/worker';
1717

0 commit comments

Comments
 (0)