Skip to content

Commit

Permalink
JS: Switch to nullthrows Package [2/4]
Browse files Browse the repository at this point in the history
Reviewed By: zertosh

Differential Revision: D9733366

fbshipit-source-id: ec46638dda5753f046420eb6a32f7d3f63156f06
  • Loading branch information
yungsters authored and facebook-github-bot committed Sep 10, 2018
1 parent 3e5833b commit b61383b
Showing 11 changed files with 15 additions and 8 deletions.
1 change: 1 addition & 0 deletions packages/metro-visualizer/package.json
Original file line number Diff line number Diff line change
@@ -27,6 +27,7 @@
"fbjs": "0.8.17",
"filesize": "^3.6.1",
"fuzzy-search": "^2.1.0",
"nullthrows": "^1.1.0",
"react": "16.4.1",
"react-dom": "^16.4.1",
"react-router-dom": "^4.2.2",
2 changes: 1 addition & 1 deletion packages/metro-visualizer/src/app/index.js
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ const GraphApp = require('./graph/GraphApp');
const React = require('react');
const ReactDOM = require('react-dom');

const nullthrows = require('fbjs/lib/nullthrows');
const nullthrows = require('nullthrows');

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

1 change: 1 addition & 0 deletions packages/metro/package.json
Original file line number Diff line number Diff line change
@@ -85,6 +85,7 @@
"mime-types": "2.1.11",
"mkdirp": "^0.5.1",
"node-fetch": "^2.2.0",
"nullthrows": "^1.1.0",
"react-transform-hmr": "^1.0.4",
"resolve": "^1.5.0",
"rimraf": "^2.5.4",
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@
const fullSourceMapObject = require('./sourceMapObject');
const getAppendScripts = require('../../lib/getAppendScripts');
const getTransitiveDependencies = require('./helpers/getTransitiveDependencies');
const nullthrows = require('fbjs/lib/nullthrows');
const nullthrows = require('nullthrows');
const path = require('path');

const {createRamBundleGroups} = require('../../Bundler/util');
2 changes: 1 addition & 1 deletion packages/metro/src/DeltaBundler/traverseDependencies.js
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@

'use strict';

const nullthrows = require('fbjs/lib/nullthrows');
const nullthrows = require('nullthrows');

import type {TransformResultDependency} from '../ModuleGraph/types.flow';
import type {Dependency, Graph, Module, Options} from './types.flow';
2 changes: 1 addition & 1 deletion packages/metro/src/HmrServer.js
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@
const formatBundlingError = require('./lib/formatBundlingError');
const getEntryAbsolutePath = require('./lib/getEntryAbsolutePath');
const hmrJSBundle = require('./DeltaBundler/Serializers/hmrJSBundle');
const nullthrows = require('fbjs/lib/nullthrows');
const nullthrows = require('nullthrows');
const parseCustomTransformOptions = require('./lib/parseCustomTransformOptions');
const url = require('url');

2 changes: 1 addition & 1 deletion packages/metro/src/ModuleGraph/node-haste/Package.js
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@

'use strict';

const nullthrows = require('fbjs/lib/nullthrows');
const nullthrows = require('nullthrows');
const path = require('path');

import type {PackageData} from '../types.flow';
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@

'use strict';

const nullthrows = require('fbjs/lib/nullthrows');
const nullthrows = require('nullthrows');

const generate = require('@babel/generator').default;
const template = require('@babel/template').default;
2 changes: 1 addition & 1 deletion packages/metro/src/Server.js
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ const debug = require('debug')('Metro:Server');
const formatBundlingError = require('./lib/formatBundlingError');
const getPrependedScripts = require('./lib/getPrependedScripts');
const mime = require('mime-types');
const nullthrows = require('fbjs/lib/nullthrows');
const nullthrows = require('nullthrows');
const parseCustomTransformOptions = require('./lib/parseCustomTransformOptions');
const parsePlatformFilePath = require('./node-haste/lib/parsePlatformFilePath');
const path = require('path');
2 changes: 1 addition & 1 deletion packages/metro/src/lib/parseCustomTransformOptions.js
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@

'use strict';

const nullthrows = require('fbjs/lib/nullthrows');
const nullthrows = require('nullthrows');

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

5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
@@ -5497,6 +5497,11 @@ npmlog@^4.0.2, npmlog@^4.1.2:
gauge "~2.7.3"
set-blocking "~2.0.0"

nullthrows@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/nullthrows/-/nullthrows-1.1.0.tgz#832bb19ef7fedab989f81675c846e2858a3917a2"
integrity sha512-YoigDq49JRqVCUlb4XlwZirXQiNCoXdwoyfklXJAEYHN+XKHWgDkrcWxNgxEtP7N+XF9Akp7Lr6wLq8HZxLttw==

number-is-nan@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d"

0 comments on commit b61383b

Please sign in to comment.