Upgrade to lodash 4 (#3315)

* Upgrade to lodash 4

* Fix incorrect require in babel-runtime/scripts

* Replace cloneDeep with cloneDeepWith where applicable
This commit is contained in:
Jordan Klassen
2016-05-13 14:15:14 -07:00
committed by Henry Zhu
parent 2607f35b9f
commit dc1f40540d
46 changed files with 76 additions and 76 deletions

View File

@@ -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",

View File

@@ -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) {

View File

@@ -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");
}