From 349b2e8d7754c4b8a2655fb341cfee3f5e411819 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Sat, 5 May 2018 16:28:10 +0000 Subject: [PATCH] fix(package): update cosmiconfig to version 5.0.0 --- lib/get-config.js | 13 ++++++++++++- package.json | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/lib/get-config.js b/lib/get-config.js index c64adfe6..1937c546 100644 --- a/lib/get-config.js +++ b/lib/get-config.js @@ -7,8 +7,19 @@ const {repoUrl} = require('./git'); const PLUGINS_DEFINITIONS = require('./definitions/plugins'); const plugins = require('./plugins'); +const CONFIG_NAME = 'release'; +const CONFIG_FILES = [ + 'package.json', + `.${CONFIG_NAME}rc`, + `.${CONFIG_NAME}rc.json`, + `.${CONFIG_NAME}rc.yaml`, + `.${CONFIG_NAME}rc.yml`, + `.${CONFIG_NAME}rc.js`, + `${CONFIG_NAME}.config.js`, +]; + module.exports = async (opts, logger) => { - const {config} = (await cosmiconfig('release', {rcExtensions: true}).load(process.cwd())) || {}; + const {config} = (await cosmiconfig(CONFIG_NAME, {searchPlaces: CONFIG_FILES}).search()) || {}; // Merge config file options and CLI/API options let options = {...config, ...opts}; const pluginsPath = {}; diff --git a/package.json b/package.json index 4d8ea896..ad3e9935 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "@semantic-release/release-notes-generator": "^6.0.0", "aggregate-error": "^1.0.0", "chalk": "^2.3.0", - "cosmiconfig": "^4.0.0", + "cosmiconfig": "^5.0.1", "debug": "^3.1.0", "env-ci": "^2.0.0", "execa": "^0.10.0",