Upgrade lodash from 3.x to 4.x

This commit is contained in:
Miroslav Bajtoš 2018-02-19 11:40:52 +01:00
parent 5060032d26
commit 81cdf6b42d
No known key found for this signature in database
GPG Key ID: 6F2304BA9361C7E3
2 changed files with 3 additions and 3 deletions

View File

@ -469,7 +469,7 @@ function tryResolveAppPath(rootDir, relativePath, resolveOptions) {
function loadModelDefinition(rootDir, jsonFile, allFiles, scriptExtensions) {
var definition = require(jsonFile);
var basename = path.basename(jsonFile, path.extname(jsonFile));
definition.name = definition.name || _.capitalize(_.camelCase(basename));
definition.name = definition.name || _.upperFirst(_.camelCase(basename));
// find a matching file with a supported extension like `.js` or `.coffee`
var sourceFile = fixFileExtension(jsonFile, allFiles, scriptExtensions);
@ -626,7 +626,7 @@ function resolveMiddlewarePath(rootDir, middleware, config) {
var MIDDLEWARE_PATH_PARAM_REGEX = /^\$!(\.\/|\.\.\/)/;
function resolveMiddlewareParams(rootDir, params) {
return cloneDeep(params, function resolvePathParam(value) {
return _.cloneDeepWith(params, function resolvePathParam(value) {
if (typeof value === 'string' && MIDDLEWARE_PATH_PARAM_REGEX.test(value)) {
return path.resolve(rootDir, value.slice(2));
} else {

View File

@ -27,7 +27,7 @@
"async": "~0.9.0",
"commondir": "0.0.1",
"debug": "^2.0.0",
"lodash": "^3.6.0",
"lodash": "^4.17.5",
"semver": "^4.1.0",
"strong-globalize": "^2.6.2",
"toposort": "^0.2.10"