Skip to content

Commit 3a3d10d

Browse files
LinusUjimthedev
authored andcommitted
refactor(configLoader): remove deprecated czConfig (#417)
BREAKING CHANGE: czConfig is no longer read for config
1 parent 4783f4b commit 3a3d10d

File tree

3 files changed

+1
-14
lines changed

3 files changed

+1
-14
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ This just tells Commitizen which adapter we actually want our contributors to us
9090
* full relative file names
9191
* absolute paths.
9292

93-
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.
93+
Please note that in previous version of Commitizen we used czConfig. **czConfig has been removed** from Commitizen 3.0.0.
9494

9595
#### Optional: Install and run Commitizen locally
9696

src/configLoader/getNormalizedConfig.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,6 @@ function getNormalizedConfig (config, content) {
1111
// Use the npm config key, be good citizens
1212
if (content.config && content.config.commitizen) {
1313
return content.config.commitizen;
14-
} else if (content.czConfig) { // Old method, will be deprecated in 3.0.0
15-
16-
// Suppress during test
17-
if (typeof global.it !== 'function')
18-
{
19-
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");
20-
}
21-
return content.czConfig;
2214
}
2315
} else {
2416
// .cz.json or .czrc

test/tests/configLoader.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,7 @@ describe('configLoader', function () {
3030
}
3131
};
3232

33-
let oldStyleConfig = {
34-
czConfig: 'myOldConfig'
35-
};
36-
3733
expect(getNormalizedConfig(config, npmStyleConfig)).to.equal('myNpmConfig');
38-
expect(getNormalizedConfig(config, oldStyleConfig)).to.equal('myOldConfig');
3934

4035
});
4136

0 commit comments

Comments
 (0)