Skip to content
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

fix(config): deprecate function based config #2499

Merged
merged 6 commits into from Sep 26, 2020

Conversation

bartekleon
Copy link
Member

@bartekleon bartekleon commented Sep 25, 2020

Export a function from you're config file is deprecated. Please export an object, or use a json file.

Fixes: #2429

@@ -30,6 +30,7 @@ export default class ConfigReader {
const configModule = this.loadConfigModule();
let options: StrykerOptions;
if (typeof configModule === 'function') {
this.log.warn('Usage of `module.export = function(config) {}` is deprecated. Please use `module.export = {} or JSON file respectively');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
this.log.warn('Usage of `module.export = function(config) {}` is deprecated. Please use `module.export = {} or JSON file respectively');
this.log.warn('Usage of `module.export = function(config) {}` is deprecated. Please use `module.export = {}` or a "stryker.conf.json" file. For more details, see https://stryker-mutator.io/blog/2020-03-11/stryker-version-3#new-config-format');

@bartekleon
Copy link
Member Author

done :)

@nicojs nicojs changed the title fix(#2429): deprecation of function based config fix(config): deprecate function based config Sep 26, 2020
@nicojs
Copy link
Member

nicojs commented Sep 26, 2020

Thanks! I've also updated the bug report issue template. Will merge when green

@nicojs nicojs merged commit 8ea3c18 into stryker-mutator:epic/mutation-switching Sep 26, 2020
@bartekleon bartekleon deleted the #2429 branch September 26, 2020 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deprecate support of module.export = function(config) {}
2 participants