Upgrade to lodash v4 (#660)

* npm install lodash-2

Someone handily published a lodash-2 v4.17.4 - it is exactly the same as lodash v4.17.4, so it is safe to use during the migration.

* use lodash-2 in tests

* update tests to split utils vs lodash

* remove Utils.nextTick usage

Utils.nextTick with a single argument is the same as process.nextTick

* lowercase utils

Because it seems that this is the coding style in this repo

* upgrade lodash in grunt/*

* keep lodash-2 as a dev dep for now

* use lodash-2 in scripts

* use snakeCase from utils

It was a mistake in my previous commit to not update this usage

* fix naming gruntUtils vs utils

As all three - gruntUtils, utils and lodash (_) are getting passed into templates, it makes sense to keep the naming consistent

* fix naming gruntUtils vs utils

As all three - gruntUtils, utils and lodash (_) are getting passed into templates, it makes sense to keep the naming consistent

* split utils vs lodash in scripts/generate

Also use lodash-2 where it is easy to do so

* use utils.get until lodash upgrade

* remove lodash.isempty; lodash-2 now used in prod (in src/lib/apis/ code)

* unbundle lodash from utils

* upgrade to lodash 4

* remove lodash.get and lodash.trimEnd

* clean out unused code

* clean out unused code

* fix a breaking change listed under "notable changes" rather than under "breaking changes"...
This commit is contained in:
Dominykas Blyžė
2018-05-14 21:37:23 +03:00
committed by Spencer
parent 4cd2b3e506
commit f1de944809
67 changed files with 355 additions and 394 deletions

View File

@ -1,7 +1,7 @@
var root = require('find-root')(__dirname);
var rel = require('path').resolve.bind(null, root);
var rootReq = function (p) { return require(rel(p)); };
var _ = rootReq('src/lib/utils');
var utils = rootReq('src/lib/utils');
var grunt = require('grunt');
var JENKINS_REPORTER = rel('test/utils/jenkins-reporter.js');
@ -65,7 +65,7 @@ var config = {
grunt.registerTask('mocha_integration', function (branch) {
grunt.config.set(
'mochacov.integration.src',
'test/integration/yaml_suite/index_' + _.snakeCase(branch) + '.js'
'test/integration/yaml_suite/index_' + utils.snakeCase(branch) + '.js'
);
grunt.task.run('mochacov:integration');
});
@ -73,7 +73,7 @@ grunt.registerTask('mocha_integration', function (branch) {
grunt.registerTask('mocha_jenkins_integration', function (branch) {
grunt.config.set(
'mochacov.jenkins_integration.src',
'test/integration/yaml_suite/index_' + _.snakeCase(branch) + '.js'
'test/integration/yaml_suite/index_' + utils.snakeCase(branch) + '.js'
);
grunt.task.run('mochacov:jenkins_integration');
});