Skip to content

refactor(configLoader): remove deprecated czConfig #417

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 9, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 0 additions & 8 deletions src/configLoader/getNormalizedConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 0 additions & 5 deletions test/tests/configLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');

});

Expand Down