diff --git a/src/configLoader/getNormalizedConfig.js b/src/configLoader/getNormalizedConfig.js index 9a745af7..96a10858 100644 --- a/src/configLoader/getNormalizedConfig.js +++ b/src/configLoader/getNormalizedConfig.js @@ -11,16 +11,15 @@ function getNormalizedConfig(config, content) { // Use the npm config key, be good citizens if(content.config && content.config.commitizen) { return content.config.commitizen; - } else { - - // Old method, will be deprecated in 3.0.0 + } else if(content.czConfig) { // Old method, will be deprecated in 3.0.0 + + // Suppress during test if(typeof global.it !== 'function') { - console.error("\n********\nWARNING: You are using czConfig in your package.json. czConfig will be deprecated in Commitizen 3. \nPlease use this instead:\n{\n \"config\": {\n \"commitizen\": {\n \"path\": \"./path/to/adapter\"\n }\n }\n}\nFor more information, see: http://commitizen.github.io/cz-cli/\n********\n"); + console.error("\n********\nWARNING: This repository's package.json is using czConfig. czConfig will be deprecated in Commitizen 3. \nPlease use this instead:\n{\n \"config\": {\n \"commitizen\": {\n \"path\": \"./path/to/adapter\"\n }\n }\n}\nFor more information, see: http://commitizen.github.io/cz-cli/\n********\n"); } return content.czConfig; } - } else { // .cz.json or .czrc return content;