Use lodash.throttle instead of lodash/throttle to prevent requiring the whole lodash lib

Reviewed By: jeanlauliac

Differential Revision: D6774508

fbshipit-source-id: bc06adda862a3ac2eb4499d941a99a03a5928952
This commit is contained in:
Peter van der Zee 2018-01-23 01:38:06 -08:00 committed by Facebook Github Bot
parent 51c38629df
commit 8097f8d6e5
5 changed files with 9 additions and 3 deletions

View File

@ -12,6 +12,7 @@
"cleanup-release": "test ! -e build && mv src build && mv src.real src" "cleanup-release": "test ! -e build && mv src build && mv src.real src"
}, },
"dependencies": { "dependencies": {
"lodash": "^4.16.6" "lodash": "^4.16.6",
"lodash.throttle": "^4.1.1"
} }
} }

View File

@ -13,7 +13,7 @@
'use strict'; 'use strict';
const readline = require('readline'); const readline = require('readline');
const throttle = require('lodash/throttle'); const throttle = require('lodash.throttle');
const tty = require('tty'); const tty = require('tty');
const util = require('util'); const util = require('util');

View File

@ -41,6 +41,7 @@
"json5": "^0.4.0", "json5": "^0.4.0",
"left-pad": "^1.1.3", "left-pad": "^1.1.3",
"lodash": "^4.16.6", "lodash": "^4.16.6",
"lodash.throttle": "^4.1.1",
"merge-stream": "^1.0.1", "merge-stream": "^1.0.1",
"metro-core": "0.24.6", "metro-core": "0.24.6",
"metro-source-map": "0.24.6", "metro-source-map": "0.24.6",

View File

@ -15,7 +15,7 @@
const chalk = require('chalk'); const chalk = require('chalk');
const path = require('path'); const path = require('path');
const reporting = require('./reporting'); const reporting = require('./reporting');
const throttle = require('lodash/throttle'); const throttle = require('lodash.throttle');
const { const {
AmbiguousModuleResolutionError, AmbiguousModuleResolutionError,

View File

@ -3517,6 +3517,10 @@ lodash.templatesettings@^4.0.0:
dependencies: dependencies:
lodash._reinterpolate "~3.0.0" lodash._reinterpolate "~3.0.0"
lodash.throttle@^4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/lodash.throttle/-/lodash.throttle-4.1.1.tgz#c23e91b710242ac70c37f1e1cda9274cc39bf2f4"
lodash@^4.0.0, lodash@^4.1.0, lodash@^4.13.1, lodash@^4.14.0, lodash@^4.15.0, lodash@^4.16.6, lodash@^4.17.4, lodash@^4.2.0, lodash@^4.2.1, lodash@^4.3.0, lodash@^4.6.1: lodash@^4.0.0, lodash@^4.1.0, lodash@^4.13.1, lodash@^4.14.0, lodash@^4.15.0, lodash@^4.16.6, lodash@^4.17.4, lodash@^4.2.0, lodash@^4.2.1, lodash@^4.3.0, lodash@^4.6.1:
version "4.17.4" version "4.17.4"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae"