-
Notifications
You must be signed in to change notification settings - Fork 250
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
Add support for mutating Javascript vNext #429
Comments
@nicojs What do you think of this message? |
Just to make sure I understand what is changing.... ES5 will still be supported, just through this new module. Is this correct or are you saying you are dropping support for mutating ES5 code once this is released? |
@j-truax that is correct. Since Stryker is now language agnostic we've chosen to move out the code for mutating JavaScript. This new implementation is based on babel, which can be a pretty large dependency, especially if you don't need it (for example, when mutating typescript code). So Stryker itself won't be mutating code anymore (which is a little bit ironic for a mutation testing framework). We will give people some heads-up time with this deprecation warning. How about: |
@nicojs Thanks for the clarification. Glad we are not losing ES5 support 👍 And yes that is ironic 😄 for a mutation framework. Either message seems sufficient to me |
I've changed the message to your suggestion @nicojs 👍 |
Is this going to support any babel plugin? (JSX, Flow, stage-2 etc?) |
@FezVrasta Not in the initial version but we plan on adding it later on. If you look at this line we don't specify any options object. In the future we could pass an options object with a plugins sections. This however won't fix everything as the stryker plugin may not know how to mutate the code. Note that this plugin is merely for mutating the code. If the input was ES2017 code, the output will be ES2017. In order to run ES2017 code in your environment you may have to transpile it to ES5. That will be handled by a plugin like stryker-babel-transpiler which we plan on developing in the future. Is your code open source? If not, a demo project would help us test the plugins early on 👍 |
Not open source sorry, anyway it's just a create-react-app 👍 |
* Add stryker-javascript-mutator package that is compatible with modern JavaScript features such as arrow functions. * Deprecate the `ES5Mutator` * Remove `UnaryNotMutator` as it is already present in the `PrefixUnaryExpressionMutator` * Make the `ConditionalExpressionMutator` also mutate to `true` Fixes #429
We should add support for mutating JavaScript vNext (6, 7, etc).
This issue tracks the work done on branch stryker-es6-mutator
Todo:
IdentitifiedNode
This issue is closely related to #133
The text was updated successfully, but these errors were encountered: