@stryker-mutator/instrumenter
Advanced tools
Comparing version 5.4.1 to 5.5.0
@@ -6,2 +6,18 @@ # Change Log | ||
# [5.5.0](https://github.com/stryker-mutator/stryker-js/compare/v5.4.1...v5.5.0) (2021-11-23) | ||
### Bug Fixes | ||
* **instrumenter:** don't mutate TS generics ([#3268](https://github.com/stryker-mutator/stryker-js/issues/3268)) ([88d6eaf](https://github.com/stryker-mutator/stryker-js/commit/88d6eaff7b9ffab7f45c76e8f348a131798f7671)) | ||
### Features | ||
* **mutators:** Implement missing AssignmentOperatorMutator ([#3203](https://github.com/stryker-mutator/stryker-js/issues/3203)) ([95b694b](https://github.com/stryker-mutator/stryker-js/commit/95b694b89430af58ec085bea07883372976fbb02)) | ||
## [5.4.1](https://github.com/stryker-mutator/stryker-js/compare/v5.4.0...v5.4.1) (2021-09-30) | ||
@@ -8,0 +24,0 @@ |
@@ -18,2 +18,3 @@ "use strict"; | ||
const optional_chaining_mutator_1 = require("./optional-chaining-mutator"); | ||
const assignment_operator_mutator_1 = require("./assignment-operator-mutator"); | ||
exports.allMutators = [ | ||
@@ -34,3 +35,4 @@ arithmetic_operator_mutator_1.arithmeticOperatorMutator, | ||
optional_chaining_mutator_1.optionalChainingMutator, | ||
assignment_operator_mutator_1.assignmentOperatorMutator, | ||
]; | ||
//# sourceMappingURL=mutate.js.map |
@@ -123,3 +123,4 @@ "use strict"; | ||
tsTypeAnnotationNodeTypes.includes(path.node.type) || | ||
isDeclareVariableStatement(path)); | ||
isDeclareVariableStatement(path) || | ||
isDeclareModule(path)); | ||
} | ||
@@ -135,2 +136,11 @@ exports.isTypeNode = isTypeNode; | ||
} | ||
/** | ||
* Determines whether or not a node is a string literal that is the name of a module. | ||
* @example | ||
* declare module "express" {}; | ||
*/ | ||
function isDeclareModule(path) { | ||
var _a; | ||
return path.isTSModuleDeclaration() && ((_a = path.node.declare) !== null && _a !== void 0 ? _a : false); | ||
} | ||
const tsTypeAnnotationNodeTypes = Object.freeze([ | ||
@@ -141,6 +151,6 @@ 'TSAsExpression', | ||
'TSTypeAliasDeclaration', | ||
'TSModuleDeclaration', | ||
'TSEnumDeclaration', | ||
'TSDeclareFunction', | ||
'TSTypeParameterInstantiation', | ||
'TSTypeParameterDeclaration', | ||
]); | ||
@@ -147,0 +157,0 @@ const flowTypeAnnotationNodeTypes = Object.freeze([ |
{ | ||
"name": "@stryker-mutator/instrumenter", | ||
"version": "5.4.1", | ||
"version": "5.5.0", | ||
"description": "The code instrumenter used in Stryker, the JavaScript mutation testing framework", | ||
@@ -33,11 +33,11 @@ "main": "dist/src/index.js", | ||
"dependencies": { | ||
"@babel/core": "~7.15.5", | ||
"@babel/generator": "~7.15.0", | ||
"@babel/parser": "~7.15.0", | ||
"@babel/plugin-proposal-class-properties": "^7.12.1", | ||
"@babel/plugin-proposal-decorators": "~7.15.4 ", | ||
"@babel/plugin-proposal-private-methods": "^7.12.1", | ||
"@babel/preset-typescript": "~7.15.0 ", | ||
"@stryker-mutator/api": "5.4.1", | ||
"@stryker-mutator/util": "5.4.1", | ||
"@babel/core": "~7.16.0", | ||
"@babel/generator": "~7.16.0", | ||
"@babel/parser": "~7.16.2", | ||
"@babel/plugin-proposal-class-properties": "~7.16.0", | ||
"@babel/plugin-proposal-decorators": "~7.16.0 ", | ||
"@babel/plugin-proposal-private-methods": "~7.16.0", | ||
"@babel/preset-typescript": "~7.16.0 ", | ||
"@stryker-mutator/api": "5.5.0", | ||
"@stryker-mutator/util": "5.5.0", | ||
"angular-html-parser": "~1.8.0", | ||
@@ -47,7 +47,6 @@ "weapon-regex": "~0.6.0" | ||
"devDependencies": { | ||
"@babel/preset-react": "~7.14.5", | ||
"@stryker-mutator/test-helpers": "5.4.1", | ||
"@types/babel__core": "~7.1.10", | ||
"@types/babel__generator": "~7.6.2", | ||
"@types/babel__parser": "~7.1.1", | ||
"@babel/preset-react": "~7.16.0", | ||
"@stryker-mutator/test-helpers": "5.5.0", | ||
"@types/babel__core": "^7.1.16", | ||
"@types/babel__generator": "^7.6.3", | ||
"@types/chai-jest-snapshot": "~1.3.5", | ||
@@ -57,3 +56,3 @@ "babel-plugin-transform-decorators-legacy": "~1.3.5", | ||
}, | ||
"gitHead": "65118a02e5bad93ea95308c94458651131b8971e" | ||
"gitHead": "00bc8b9513ad49582d657c1a66d00562870f725b" | ||
} |
@@ -16,2 +16,3 @@ import { arithmeticOperatorMutator } from './arithmetic-operator-mutator'; | ||
import { optionalChainingMutator } from './optional-chaining-mutator'; | ||
import { assignmentOperatorMutator } from './assignment-operator-mutator'; | ||
@@ -33,2 +34,3 @@ export const allMutators: NodeMutator[] = [ | ||
optionalChainingMutator, | ||
assignmentOperatorMutator, | ||
]; |
@@ -134,3 +134,4 @@ import { INSTRUMENTER_CONSTANTS as ID } from '@stryker-mutator/api/core'; | ||
tsTypeAnnotationNodeTypes.includes(path.node.type) || | ||
isDeclareVariableStatement(path) | ||
isDeclareVariableStatement(path) || | ||
isDeclareModule(path) | ||
); | ||
@@ -148,2 +149,11 @@ } | ||
/** | ||
* Determines whether or not a node is a string literal that is the name of a module. | ||
* @example | ||
* declare module "express" {}; | ||
*/ | ||
function isDeclareModule(path: NodePath): boolean { | ||
return path.isTSModuleDeclaration() && (path.node.declare ?? false); | ||
} | ||
const tsTypeAnnotationNodeTypes: ReadonlyArray<types.Node['type']> = Object.freeze([ | ||
@@ -154,6 +164,6 @@ 'TSAsExpression', | ||
'TSTypeAliasDeclaration', | ||
'TSModuleDeclaration', | ||
'TSEnumDeclaration', | ||
'TSDeclareFunction', | ||
'TSTypeParameterInstantiation', | ||
'TSTypeParameterDeclaration', | ||
]); | ||
@@ -160,0 +170,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
268234
7
268
3968
+ Added@babel/core@7.16.12(transitive)
+ Added@babel/generator@7.16.8(transitive)
+ Added@babel/parser@7.16.12(transitive)
+ Added@babel/plugin-proposal-class-properties@7.16.7(transitive)
+ Added@babel/plugin-proposal-decorators@7.16.7(transitive)
+ Added@babel/plugin-proposal-private-methods@7.16.11(transitive)
+ Added@babel/preset-typescript@7.16.7(transitive)
+ Added@stryker-mutator/api@5.5.0(transitive)
+ Added@stryker-mutator/util@5.5.0(transitive)
+ Addedmutation-testing-metrics@1.7.6(transitive)
+ Addedmutation-testing-report-schema@1.7.6(transitive)
- Removed@babel/core@7.15.8(transitive)
- Removed@babel/generator@7.15.8(transitive)
- Removed@babel/parser@7.15.8(transitive)
- Removed@babel/plugin-proposal-class-properties@7.18.6(transitive)
- Removed@babel/plugin-proposal-decorators@7.15.8(transitive)
- Removed@babel/plugin-proposal-private-methods@7.18.6(transitive)
- Removed@babel/preset-typescript@7.15.0(transitive)
- Removed@stryker-mutator/api@5.4.1(transitive)
- Removed@stryker-mutator/util@5.4.1(transitive)
- Removedmutation-testing-metrics@1.7.5(transitive)
- Removedmutation-testing-report-schema@1.7.4(transitive)
Updated@babel/core@~7.16.0
Updated@babel/generator@~7.16.0
Updated@babel/parser@~7.16.2
Updated@stryker-mutator/api@5.5.0
Updated@stryker-mutator/util@5.5.0