diff --git a/package.json b/package.json index 4fd91f9fd2..e06fa98e25 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "gulp-watch": "^4.3.5", "istanbul": "^0.3.5", "lerna": "^1.0.0", - "lodash": "^3.10.0", + "lodash": "^4.2.0", "matcha": "^0.6.0", "mkdirp": "^0.5.1", "mocha": "2.2.0", diff --git a/packages/babel-cli/package.json b/packages/babel-cli/package.json index dba7dae579..11d1cf9374 100644 --- a/packages/babel-cli/package.json +++ b/packages/babel-cli/package.json @@ -17,7 +17,7 @@ "convert-source-map": "^1.1.0", "fs-readdir-recursive": "^0.1.0", "glob": "^5.0.5", - "lodash": "^3.2.0", + "lodash": "^4.2.0", "log-symbols": "^1.0.2", "output-file-sync": "^1.1.0", "path-exists": "^1.0.0", diff --git a/packages/babel-cli/src/babel/index.js b/packages/babel-cli/src/babel/index.js index dd39333f28..f23f6f43d1 100755 --- a/packages/babel-cli/src/babel/index.js +++ b/packages/babel-cli/src/babel/index.js @@ -5,11 +5,11 @@ require("babel-core"); let pathExists = require("path-exists"); let commander = require("commander"); -let kebabCase = require("lodash/string/kebabCase"); +let kebabCase = require("lodash/kebabCase"); let options = require("babel-core").options; let util = require("babel-core").util; -let uniq = require("lodash/array/uniq"); -let each = require("lodash/collection/each"); +let uniq = require("lodash/uniq"); +let each = require("lodash/each"); let glob = require("glob"); each(options, function (option, key) { diff --git a/packages/babel-cli/test/index.js b/packages/babel-cli/test/index.js index 31a2fd4cde..158815a06c 100644 --- a/packages/babel-cli/test/index.js +++ b/packages/babel-cli/test/index.js @@ -48,7 +48,7 @@ var assertTest = function (stdout, stderr, opts) { if (opts.stderr) { if (opts.stderrContains) { - assert.ok(_.contains(stderr, expectStderr), "stderr " + JSON.stringify(stderr) + " didn't contain " + JSON.stringify(expectStderr)); + assert.ok(_.includes(stderr, expectStderr), "stderr " + JSON.stringify(stderr) + " didn't contain " + JSON.stringify(expectStderr)); } else { chai.expect(stderr).to.equal(expectStderr, "stderr didn't match"); } @@ -62,7 +62,7 @@ var assertTest = function (stdout, stderr, opts) { if (opts.stdout) { if (opts.stdoutContains) { - assert.ok(_.contains(stdout, expectStdout), "stdout " + JSON.stringify(stdout) + " didn't contain " + JSON.stringify(expectStdout)); + assert.ok(_.includes(stdout, expectStdout), "stdout " + JSON.stringify(stdout) + " didn't contain " + JSON.stringify(expectStdout)); } else { chai.expect(stdout).to.equal(expectStdout, "stdout didn't match"); } diff --git a/packages/babel-core/package.json b/packages/babel-core/package.json index 2f3d95616a..f58104b71f 100644 --- a/packages/babel-core/package.json +++ b/packages/babel-core/package.json @@ -37,7 +37,7 @@ "convert-source-map": "^1.1.0", "debug": "^2.1.1", "json5": "^0.4.0", - "lodash": "^3.10.0", + "lodash": "^4.2.0", "minimatch": "^2.0.3", "path-exists": "^1.0.0", "path-is-absolute": "^1.0.0", diff --git a/packages/babel-core/src/api/node.js b/packages/babel-core/src/api/node.js index 4cd086ea0b..f3c9e915ea 100644 --- a/packages/babel-core/src/api/node.js +++ b/packages/babel-core/src/api/node.js @@ -1,4 +1,4 @@ -import isFunction from "lodash/lang/isFunction"; +import isFunction from "lodash/isFunction"; import fs from "fs"; // diff --git a/packages/babel-core/src/helpers/merge.js b/packages/babel-core/src/helpers/merge.js index 8d3b4e7f63..5a695f6afa 100644 --- a/packages/babel-core/src/helpers/merge.js +++ b/packages/babel-core/src/helpers/merge.js @@ -1,9 +1,9 @@ -import merge from "lodash/object/merge"; +import mergeWith from "lodash/mergeWith"; export default function (dest?: Object, src?: Object): ?Object { if (!dest || !src) return; - return merge(dest, src, function (a, b) { + return mergeWith(dest, src, function (a, b) { if (b && Array.isArray(a)) { let newArray = b.slice(0); diff --git a/packages/babel-core/src/tools/build-external-helpers.js b/packages/babel-core/src/tools/build-external-helpers.js index ebc98b6ecd..a26febd34b 100644 --- a/packages/babel-core/src/tools/build-external-helpers.js +++ b/packages/babel-core/src/tools/build-external-helpers.js @@ -4,7 +4,7 @@ import * as helpers from "babel-helpers"; import generator from "babel-generator"; import * as messages from "babel-messages"; import template from "babel-template"; -import each from "lodash/collection/each"; +import each from "lodash/each"; import * as t from "babel-types"; let buildUmdWrapper = template(` diff --git a/packages/babel-core/src/transformation/file/index.js b/packages/babel-core/src/transformation/file/index.js index 1a16d77982..e4f5dbcbcb 100644 --- a/packages/babel-core/src/transformation/file/index.js +++ b/packages/babel-core/src/transformation/file/index.js @@ -12,7 +12,7 @@ import { NodePath, Hub, Scope } from "babel-traverse"; import sourceMap from "source-map"; import generate from "babel-generator"; import codeFrame from "babel-code-frame"; -import defaults from "lodash/object/defaults"; +import defaults from "lodash/defaults"; import traverse from "babel-traverse"; import Logger from "./logger"; import Store from "../../store"; diff --git a/packages/babel-core/src/transformation/file/options/option-manager.js b/packages/babel-core/src/transformation/file/options/option-manager.js index 4a5f025138..ee59b46a70 100644 --- a/packages/babel-core/src/transformation/file/options/option-manager.js +++ b/packages/babel-core/src/transformation/file/options/option-manager.js @@ -9,8 +9,8 @@ import resolve from "../../../helpers/resolve"; import json5 from "json5"; import isAbsolute from "path-is-absolute"; import pathExists from "path-exists"; -import cloneDeep from "lodash/lang/cloneDeep"; -import clone from "lodash/lang/clone"; +import cloneDeepWith from "lodash/cloneDeepWith"; +import clone from "lodash/clone"; import merge from "../../../helpers/merge"; import config from "./config"; import removed from "./removed"; @@ -208,7 +208,7 @@ export default class OptionManager { } // - let opts = cloneDeep(rawOpts, (val) => { + let opts = cloneDeepWith(rawOpts, (val) => { if (val instanceof Plugin) { return val; } diff --git a/packages/babel-core/src/transformation/internal-plugins/block-hoist.js b/packages/babel-core/src/transformation/internal-plugins/block-hoist.js index c1934abf43..afd312b1de 100644 --- a/packages/babel-core/src/transformation/internal-plugins/block-hoist.js +++ b/packages/babel-core/src/transformation/internal-plugins/block-hoist.js @@ -1,5 +1,5 @@ import Plugin from "../plugin"; -import sortBy from "lodash/collection/sortBy"; +import sortBy from "lodash/sortBy"; export default new Plugin({ /** diff --git a/packages/babel-core/src/transformation/plugin.js b/packages/babel-core/src/transformation/plugin.js index 641ed06b40..e378fb68d9 100644 --- a/packages/babel-core/src/transformation/plugin.js +++ b/packages/babel-core/src/transformation/plugin.js @@ -4,8 +4,8 @@ import OptionManager from "./file/options/option-manager"; import * as messages from "babel-messages"; import Store from "../store"; import traverse from "babel-traverse"; -import assign from "lodash/object/assign"; -import clone from "lodash/lang/clone"; +import assign from "lodash/assign"; +import clone from "lodash/clone"; const GLOBAL_VISITOR_PROPS = ["enter", "exit"]; diff --git a/packages/babel-core/src/util.js b/packages/babel-core/src/util.js index d19fd40261..0ee5e62a96 100644 --- a/packages/babel-core/src/util.js +++ b/packages/babel-core/src/util.js @@ -1,10 +1,10 @@ -import escapeRegExp from "lodash/string/escapeRegExp"; -import startsWith from "lodash/string/startsWith"; -import isBoolean from "lodash/lang/isBoolean"; +import escapeRegExp from "lodash/escapeRegExp"; +import startsWith from "lodash/startsWith"; +import isBoolean from "lodash/isBoolean"; import minimatch from "minimatch"; -import contains from "lodash/collection/contains"; -import isString from "lodash/lang/isString"; -import isRegExp from "lodash/lang/isRegExp"; +import includes from "lodash/includes"; +import isString from "lodash/isString"; +import isRegExp from "lodash/isRegExp"; import path from "path"; import slash from "slash"; @@ -17,7 +17,7 @@ export { inherits, inspect } from "util"; export function canCompile(filename: string, altExts?: Array): boolean { let exts = altExts || canCompile.EXTENSIONS; let ext = path.extname(filename); - return contains(exts, ext); + return includes(exts, ext); } /** diff --git a/packages/babel-core/test/util.js b/packages/babel-core/test/util.js index 918c1dd3fe..e6ee23ca1a 100644 --- a/packages/babel-core/test/util.js +++ b/packages/babel-core/test/util.js @@ -57,7 +57,7 @@ suite("util", function () { assert.deepEqual(util.regexify(false), /.^/); assert.deepEqual(util.regexify(null), /.^/); assert.deepEqual(util.regexify(""), /.^/); - assert.deepEqual(util.regexify(["foo", "bar"]), /\x66oo|\x62ar/i); + assert.deepEqual(util.regexify(["foo", "bar"]), /foo|bar/i); assert.deepEqual(util.regexify("foobar"), /(?:(?=.)foobar)/i); assert.deepEqual(util.regexify(/foobar/), /foobar/); diff --git a/packages/babel-generator/package.json b/packages/babel-generator/package.json index 5c3b281a6c..2f530af17c 100644 --- a/packages/babel-generator/package.json +++ b/packages/babel-generator/package.json @@ -16,7 +16,7 @@ "babel-types": "^6.8.0", "detect-indent": "^3.0.1", "is-integer": "^1.0.4", - "lodash": "^3.10.1", + "lodash": "^4.2.0", "repeating": "^1.1.3", "source-map": "^0.5.0", "trim-right": "^1.0.1" diff --git a/packages/babel-generator/src/generators/expressions.js b/packages/babel-generator/src/generators/expressions.js index d3062e3de9..02d236e9a9 100644 --- a/packages/babel-generator/src/generators/expressions.js +++ b/packages/babel-generator/src/generators/expressions.js @@ -1,7 +1,7 @@ /* eslint max-len: 0 */ import isInteger from "is-integer"; -import isNumber from "lodash/lang/isNumber"; +import isNumber from "lodash/isNumber"; import * as t from "babel-types"; import * as n from "../node"; diff --git a/packages/babel-generator/src/node/whitespace.js b/packages/babel-generator/src/node/whitespace.js index 2126c9110b..12489b7275 100644 --- a/packages/babel-generator/src/node/whitespace.js +++ b/packages/babel-generator/src/node/whitespace.js @@ -1,6 +1,6 @@ -import isBoolean from "lodash/lang/isBoolean"; -import each from "lodash/collection/each"; -import map from "lodash/collection/map"; +import isBoolean from "lodash/isBoolean"; +import each from "lodash/each"; +import map from "lodash/map"; import * as t from "babel-types"; type WhitespaceObject = { diff --git a/packages/babel-helper-builder-react-jsx/package.json b/packages/babel-helper-builder-react-jsx/package.json index 86402e3c4d..67232db119 100644 --- a/packages/babel-helper-builder-react-jsx/package.json +++ b/packages/babel-helper-builder-react-jsx/package.json @@ -9,6 +9,6 @@ "babel-runtime": "^6.0.0", "babel-types": "^6.8.0", "esutils": "^2.0.0", - "lodash": "^3.10.0" + "lodash": "^4.2.0" } } diff --git a/packages/babel-helper-define-map/package.json b/packages/babel-helper-define-map/package.json index 2c6366bc98..7284b37f02 100644 --- a/packages/babel-helper-define-map/package.json +++ b/packages/babel-helper-define-map/package.json @@ -7,7 +7,7 @@ "main": "lib/index.js", "dependencies": { "babel-runtime": "^6.0.0", - "lodash": "^3.10.0", + "lodash": "^4.2.0", "babel-types": "^6.8.0", "babel-helper-function-name": "^6.8.0" } diff --git a/packages/babel-helper-define-map/src/index.js b/packages/babel-helper-define-map/src/index.js index aa0e2af5a7..131b02a8c7 100644 --- a/packages/babel-helper-define-map/src/index.js +++ b/packages/babel-helper-define-map/src/index.js @@ -1,8 +1,8 @@ /* eslint max-len: 0 */ import nameFunction from "babel-helper-function-name"; -import each from "lodash/collection/each"; -import has from "lodash/object/has"; +import each from "lodash/each"; +import has from "lodash/has"; import * as t from "babel-types"; function toKind(node: Object) { diff --git a/packages/babel-helper-fixtures/package.json b/packages/babel-helper-fixtures/package.json index d8859b401c..aad2b13ca1 100644 --- a/packages/babel-helper-fixtures/package.json +++ b/packages/babel-helper-fixtures/package.json @@ -8,7 +8,7 @@ "main": "lib/index.js", "dependencies": { "babel-runtime": "^6.0.0", - "lodash": "^3.10.0", + "lodash": "^4.2.0", "path-exists": "^1.0.0", "trim-right": "^1.0.1", "try-resolve": "^1.0.0" diff --git a/packages/babel-helper-regex/package.json b/packages/babel-helper-regex/package.json index c0409f2c76..fb1cdef3ad 100644 --- a/packages/babel-helper-regex/package.json +++ b/packages/babel-helper-regex/package.json @@ -7,7 +7,7 @@ "main": "lib/index.js", "dependencies": { "babel-runtime": "^6.0.0", - "lodash": "^3.10.0", + "lodash": "^4.2.0", "babel-types": "^6.8.0" } } diff --git a/packages/babel-helper-regex/src/index.js b/packages/babel-helper-regex/src/index.js index afe76e5c43..b59a30f7d5 100644 --- a/packages/babel-helper-regex/src/index.js +++ b/packages/babel-helper-regex/src/index.js @@ -1,4 +1,4 @@ -import pull from "lodash/array/pull"; +import pull from "lodash/pull"; import * as t from "babel-types"; export function is(node: Object, flag: string): boolean { diff --git a/packages/babel-helper-transform-fixture-test-runner/package.json b/packages/babel-helper-transform-fixture-test-runner/package.json index d34e5b2f84..d0dff63705 100644 --- a/packages/babel-helper-transform-fixture-test-runner/package.json +++ b/packages/babel-helper-transform-fixture-test-runner/package.json @@ -16,6 +16,6 @@ "source-map": "^0.5.0", "babel-code-frame": "^6.8.0", "chai": "^2.2.0", - "lodash": "^3.10.0" + "lodash": "^4.2.0" } } diff --git a/packages/babel-helper-transform-fixture-test-runner/src/index.js b/packages/babel-helper-transform-fixture-test-runner/src/index.js index 5dbf3db89e..1c016287ac 100644 --- a/packages/babel-helper-transform-fixture-test-runner/src/index.js +++ b/packages/babel-helper-transform-fixture-test-runner/src/index.js @@ -121,12 +121,12 @@ export default function ( let suites = getFixtures(fixturesLoc); for (let testSuite of suites) { - if (_.contains(suiteOpts.ignoreSuites, testSuite.title)) continue; + if (_.includes(suiteOpts.ignoreSuites, testSuite.title)) continue; suite(name + "/" + testSuite.title, function () { for (let task of testSuite.tests) { - if (_.contains(suiteOpts.ignoreTasks, task.title) || - _.contains(suiteOpts.ignoreTasks, testSuite.title + "/" + task.title)) continue; + if (_.includes(suiteOpts.ignoreTasks, task.title) || + _.includes(suiteOpts.ignoreTasks, testSuite.title + "/" + task.title)) continue; test(task.title, !task.disabled && function () { function runTask() { diff --git a/packages/babel-plugin-transform-es2015-block-scoping/package.json b/packages/babel-plugin-transform-es2015-block-scoping/package.json index 127511c316..b437b2dfc2 100644 --- a/packages/babel-plugin-transform-es2015-block-scoping/package.json +++ b/packages/babel-plugin-transform-es2015-block-scoping/package.json @@ -9,7 +9,7 @@ "babel-traverse": "^6.8.0", "babel-types": "^6.8.0", "babel-template": "^6.8.0", - "lodash": "^3.10.0", + "lodash": "^4.2.0", "babel-runtime": "^6.0.0" }, "keywords": [ diff --git a/packages/babel-plugin-transform-es2015-block-scoping/src/index.js b/packages/babel-plugin-transform-es2015-block-scoping/src/index.js index d41e2dd544..2e26b9ab1d 100644 --- a/packages/babel-plugin-transform-es2015-block-scoping/src/index.js +++ b/packages/babel-plugin-transform-es2015-block-scoping/src/index.js @@ -6,8 +6,8 @@ import type File from "../../../file"; import traverse from "babel-traverse"; import { visitor as tdzVisitor } from "./tdz"; import * as t from "babel-types"; -import values from "lodash/object/values"; -import extend from "lodash/object/extend"; +import values from "lodash/values"; +import extend from "lodash/extend"; import template from "babel-template"; export default function () { diff --git a/packages/babel-plugin-transform-es2015-function-name/test/fixtures/function-name/modules-2/actual.js b/packages/babel-plugin-transform-es2015-function-name/test/fixtures/function-name/modules-2/actual.js index bbf1ec86aa..08a44cbfe5 100644 --- a/packages/babel-plugin-transform-es2015-function-name/test/fixtures/function-name/modules-2/actual.js +++ b/packages/babel-plugin-transform-es2015-function-name/test/fixtures/function-name/modules-2/actual.js @@ -1,4 +1,4 @@ -import last from "lodash/array/last" +import last from "lodash/last" export default class Container { last(key) { diff --git a/packages/babel-plugin-transform-es2015-function-name/test/fixtures/function-name/modules-2/expected.js b/packages/babel-plugin-transform-es2015-function-name/test/fixtures/function-name/modules-2/expected.js index dc2a8f943d..bd17524c7e 100644 --- a/packages/babel-plugin-transform-es2015-function-name/test/fixtures/function-name/modules-2/expected.js +++ b/packages/babel-plugin-transform-es2015-function-name/test/fixtures/function-name/modules-2/expected.js @@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _last2 = require("lodash/array/last"); +var _last2 = require("lodash/last"); var _last3 = babelHelpers.interopRequireDefault(_last2); diff --git a/packages/babel-plugin-transform-proto-to-assign/package.json b/packages/babel-plugin-transform-proto-to-assign/package.json index fdca3ae255..331ee67932 100644 --- a/packages/babel-plugin-transform-proto-to-assign/package.json +++ b/packages/babel-plugin-transform-proto-to-assign/package.json @@ -10,7 +10,7 @@ ], "dependencies": { "babel-runtime": "^6.0.0", - "lodash": "^3.9.3" + "lodash": "^4.2.0" }, "devDependencies": { "babel-helper-plugin-test-runner": "^6.8.0" diff --git a/packages/babel-plugin-transform-proto-to-assign/src/index.js b/packages/babel-plugin-transform-proto-to-assign/src/index.js index 648ee983b3..d17f857c18 100644 --- a/packages/babel-plugin-transform-proto-to-assign/src/index.js +++ b/packages/babel-plugin-transform-proto-to-assign/src/index.js @@ -1,6 +1,6 @@ /* eslint max-len: 0 */ -import pull from "lodash/array/pull"; +import pull from "lodash/pull"; export default function ({ types: t }) { function isProtoKey(node) { diff --git a/packages/babel-preset-es2015/test/traceur.js b/packages/babel-preset-es2015/test/traceur.js index 41af8f4298..dd3fd5f70a 100644 --- a/packages/babel-preset-es2015/test/traceur.js +++ b/packages/babel-preset-es2015/test/traceur.js @@ -80,7 +80,7 @@ require("babel-helper-transform-fixture-test-runner")(__dirname + "/fixtures/tra }, { }, function (opts, task) { - if (_.contains(task.exec.loc, "module.js")) { + if (_.includes(task.exec.loc, "module.js")) { opts.plugins.push("transform-es2015-modules-commonjs"); } else { opts.sourceType = "script"; diff --git a/packages/babel-register/package.json b/packages/babel-register/package.json index 0822e8cd69..dcc7f87db4 100644 --- a/packages/babel-register/package.json +++ b/packages/babel-register/package.json @@ -12,7 +12,7 @@ "babel-runtime": "^6.0.0", "core-js": "^2.1.0", "home-or-tmp": "^1.0.0", - "lodash": "^3.10.0", + "lodash": "^4.2.0", "mkdirp": "^0.5.1", "path-exists": "^1.0.0", "source-map-support": "^0.2.10" diff --git a/packages/babel-register/src/node.js b/packages/babel-register/src/node.js index 36b877da16..c786f3dccd 100644 --- a/packages/babel-register/src/node.js +++ b/packages/babel-register/src/node.js @@ -1,9 +1,9 @@ -import deepClone from "lodash/lang/cloneDeep"; +import deepClone from "lodash/cloneDeep"; import sourceMapSupport from "source-map-support"; import * as registerCache from "./cache"; -import extend from "lodash/object/extend"; +import extend from "lodash/extend"; import * as babel from "babel-core"; -import each from "lodash/collection/each"; +import each from "lodash/each"; import { util, OptionManager } from "babel-core"; import fs from "fs"; import path from "path"; diff --git a/packages/babel-runtime/scripts/build-dist.js b/packages/babel-runtime/scripts/build-dist.js index 1b7c4511e5..44c64207e1 100644 --- a/packages/babel-runtime/scripts/build-dist.js +++ b/packages/babel-runtime/scripts/build-dist.js @@ -1,5 +1,5 @@ var outputFile = require("output-file-sync"); -var each = require("lodash/collection/each"); +var each = require("lodash/each"); var fs = require("fs"); var _ = require("lodash"); diff --git a/packages/babel-template/package.json b/packages/babel-template/package.json index 8f9d500b9c..12c19e1472 100644 --- a/packages/babel-template/package.json +++ b/packages/babel-template/package.json @@ -12,6 +12,6 @@ "babel-traverse": "^6.8.0", "babel-types": "^6.8.0", "babel-runtime": "^6.0.0", - "lodash": "^3.10.1" + "lodash": "^4.2.0" } } diff --git a/packages/babel-template/src/index.js b/packages/babel-template/src/index.js index 14c2286d23..53b236b7bd 100644 --- a/packages/babel-template/src/index.js +++ b/packages/babel-template/src/index.js @@ -1,8 +1,8 @@ /* eslint max-len: 0 */ -import cloneDeep from "lodash/lang/cloneDeep"; -import assign from "lodash/object/assign"; -import has from "lodash/object/has"; +import cloneDeep from "lodash/cloneDeep"; +import assign from "lodash/assign"; +import has from "lodash/has"; import traverse from "babel-traverse"; import * as babylon from "babylon"; import * as t from "babel-types"; diff --git a/packages/babel-traverse/package.json b/packages/babel-traverse/package.json index 046abf6417..6bf1cfa9d3 100644 --- a/packages/babel-traverse/package.json +++ b/packages/babel-traverse/package.json @@ -16,7 +16,7 @@ "debug": "^2.2.0", "globals": "^8.3.0", "invariant": "^2.2.0", - "lodash": "^3.10.1", + "lodash": "^4.2.0", "repeating": "^1.1.3" } } diff --git a/packages/babel-traverse/src/index.js b/packages/babel-traverse/src/index.js index 77390f13ad..28f46d13c3 100644 --- a/packages/babel-traverse/src/index.js +++ b/packages/babel-traverse/src/index.js @@ -3,7 +3,7 @@ import TraversalContext from "./context"; import * as visitors from "./visitors"; import * as messages from "babel-messages"; -import includes from "lodash/collection/includes"; +import includes from "lodash/includes"; import * as t from "babel-types"; import * as cache from "./cache"; diff --git a/packages/babel-traverse/src/path/index.js b/packages/babel-traverse/src/path/index.js index 9b877eac05..1b5b589190 100644 --- a/packages/babel-traverse/src/path/index.js +++ b/packages/babel-traverse/src/path/index.js @@ -6,7 +6,7 @@ import * as virtualTypes from "./lib/virtual-types"; import buildDebug from "debug"; import invariant from "invariant"; import traverse from "../index"; -import assign from "lodash/object/assign"; +import assign from "lodash/assign"; import Scope from "../scope"; import * as t from "babel-types"; import { path as pathCache } from "../cache"; diff --git a/packages/babel-traverse/src/path/introspection.js b/packages/babel-traverse/src/path/introspection.js index 278efc0713..be7a2755c5 100644 --- a/packages/babel-traverse/src/path/introspection.js +++ b/packages/babel-traverse/src/path/introspection.js @@ -1,7 +1,7 @@ // This file contains methods responsible for introspecting the current path for certain values. import type NodePath from "./index"; -import includes from "lodash/collection/includes"; +import includes from "lodash/includes"; import * as t from "babel-types"; /** diff --git a/packages/babel-traverse/src/scope/index.js b/packages/babel-traverse/src/scope/index.js index 7e8176637c..556bc95496 100644 --- a/packages/babel-traverse/src/scope/index.js +++ b/packages/babel-traverse/src/scope/index.js @@ -1,11 +1,11 @@ /* eslint max-len: 0 */ -import includes from "lodash/collection/includes"; +import includes from "lodash/includes"; import repeating from "repeating"; import Renamer from "./lib/renamer"; import type NodePath from "../path"; import traverse from "../index"; -import defaults from "lodash/object/defaults"; +import defaults from "lodash/defaults"; import * as messages from "babel-messages"; import Binding from "./binding"; import globals from "globals"; diff --git a/packages/babel-traverse/src/visitors.js b/packages/babel-traverse/src/visitors.js index 6f0f4f9d9a..e67824995b 100644 --- a/packages/babel-traverse/src/visitors.js +++ b/packages/babel-traverse/src/visitors.js @@ -1,7 +1,7 @@ import * as virtualTypes from "./path/lib/virtual-types"; import * as messages from "babel-messages"; import * as t from "babel-types"; -import clone from "lodash/lang/clone"; +import clone from "lodash/clone"; /** * explode() will take a visitor object with all of the various shorthands diff --git a/packages/babel-types/package.json b/packages/babel-types/package.json index 8adde9b387..b64ccb4747 100644 --- a/packages/babel-types/package.json +++ b/packages/babel-types/package.json @@ -11,7 +11,7 @@ "babel-runtime": "^6.0.0", "babel-traverse": "^6.8.0", "esutils": "^2.0.2", - "lodash": "^3.10.1", + "lodash": "^4.2.0", "to-fast-properties": "^1.0.1" } } diff --git a/packages/babel-types/src/converters.js b/packages/babel-types/src/converters.js index c10e38e63d..852c183ee3 100644 --- a/packages/babel-types/src/converters.js +++ b/packages/babel-types/src/converters.js @@ -1,7 +1,7 @@ -import isPlainObject from "lodash/lang/isPlainObject"; -import isNumber from "lodash/lang/isNumber"; -import isRegExp from "lodash/lang/isRegExp"; -import isString from "lodash/lang/isString"; +import isPlainObject from "lodash/isPlainObject"; +import isNumber from "lodash/isNumber"; +import isRegExp from "lodash/isRegExp"; +import isString from "lodash/isString"; import type { Scope } from "babel-traverse"; import * as t from "./index"; diff --git a/packages/babel-types/src/index.js b/packages/babel-types/src/index.js index fe968f9f7a..945d288a22 100644 --- a/packages/babel-types/src/index.js +++ b/packages/babel-types/src/index.js @@ -1,8 +1,8 @@ import toFastProperties from "to-fast-properties"; -import compact from "lodash/array/compact"; -import loClone from "lodash/lang/clone"; -import each from "lodash/collection/each"; -import uniq from "lodash/array/uniq"; +import compact from "lodash/compact"; +import loClone from "lodash/clone"; +import each from "lodash/each"; +import uniq from "lodash/uniq"; let t = exports;