From 81cdf6b42d93b094cf75a69e04308355ae73d50d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Bajto=C5=A1?= Date: Mon, 19 Feb 2018 11:40:52 +0100 Subject: [PATCH] Upgrade lodash from 3.x to 4.x --- lib/compiler.js | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/compiler.js b/lib/compiler.js index 94e8979..71a745f 100644 --- a/lib/compiler.js +++ b/lib/compiler.js @@ -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 { diff --git a/package.json b/package.json index 26d1742..3025be4 100644 --- a/package.json +++ b/package.json @@ -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"