From dc088990e609ea63c3c48908abef61eda0cd09d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linus=20Unneb=C3=A4ck?= Date: Sun, 8 Jan 2017 22:19:48 +0100 Subject: [PATCH] refactor(configLoader): remove deprecated czConfig BREAKING CHANGE: czConfig is no longer read for config --- README.md | 2 +- src/configLoader/getNormalizedConfig.js | 8 -------- test/tests/configLoader.js | 5 ----- 3 files changed, 1 insertion(+), 14 deletions(-) diff --git a/README.md b/README.md index f0805df4..70ed9345 100644 --- a/README.md +++ b/README.md @@ -90,7 +90,7 @@ This just tells Commitizen which adapter we actually want our contributors to us * full relative file names * absolute paths. -Please note that in previous version of Commitizen we used czConfig. **czConfig has been deprecated** and you should migrate to the new format before Commitizen 3.0.0. +Please note that in previous version of Commitizen we used czConfig. **czConfig has been removed** from Commitizen 3.0.0. #### Optional: Install and run Commitizen locally diff --git a/src/configLoader/getNormalizedConfig.js b/src/configLoader/getNormalizedConfig.js index 22b495b0..f9e385a9 100644 --- a/src/configLoader/getNormalizedConfig.js +++ b/src/configLoader/getNormalizedConfig.js @@ -11,14 +11,6 @@ function getNormalizedConfig (config, content) { // Use the npm config key, be good citizens if (content.config && content.config.commitizen) { return content.config.commitizen; - } 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: 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 diff --git a/test/tests/configLoader.js b/test/tests/configLoader.js index 2473cd7f..67168ac4 100644 --- a/test/tests/configLoader.js +++ b/test/tests/configLoader.js @@ -30,12 +30,7 @@ describe('configLoader', function () { } }; - let oldStyleConfig = { - czConfig: 'myOldConfig' - }; - expect(getNormalizedConfig(config, npmStyleConfig)).to.equal('myNpmConfig'); - expect(getNormalizedConfig(config, oldStyleConfig)).to.equal('myOldConfig'); });