@stryker-mutator/typescript-checker
Advanced tools
Comparing version 7.1.1 to 7.2.0
{ | ||
"name": "@stryker-mutator/typescript-checker", | ||
"version": "7.1.1", | ||
"version": "7.2.0", | ||
"description": "A typescript type checker plugin to be used in Stryker, the JavaScript mutation testing framework", | ||
"files": [ | ||
"dist", | ||
"src-generated", | ||
"src" | ||
], | ||
"exports": { | ||
@@ -42,15 +47,15 @@ ".": { | ||
"dependencies": { | ||
"@stryker-mutator/api": "7.1.1", | ||
"@stryker-mutator/util": "7.1.1", | ||
"@stryker-mutator/api": "7.2.0", | ||
"@stryker-mutator/util": "7.2.0", | ||
"semver": "~7.5.0" | ||
}, | ||
"devDependencies": { | ||
"@stryker-mutator/test-helpers": "7.1.1", | ||
"@types/semver": "7.5.0" | ||
"@stryker-mutator/test-helpers": "7.2.0", | ||
"@types/semver": "7.5.3" | ||
}, | ||
"peerDependencies": { | ||
"@stryker-mutator/core": "~7.1.0", | ||
"@stryker-mutator/core": "~7.2.0", | ||
"typescript": ">=3.6" | ||
}, | ||
"gitHead": "b869d38fffa894b095985c257c72230c15d43cc8" | ||
"gitHead": "fa746b5cb7a2ee91a232809a0adb0cf955996648" | ||
} |
@@ -7,3 +7,7 @@ import ts from 'typescript'; | ||
private sourceFile: ts.SourceFile | undefined; | ||
constructor(public content: string, public fileName: string, public modifiedTime = new Date()) { | ||
constructor( | ||
public content: string, | ||
public fileName: string, | ||
public modifiedTime = new Date(), | ||
) { | ||
this.originalContent = content; | ||
@@ -44,3 +48,3 @@ } | ||
throw new Error( | ||
`Tried to check file "${this.fileName}" (which is part of your typescript project), but no watcher is registered for it. Changes would go unnoticed. This probably means that you need to expand the files that are included in your project.` | ||
`Tried to check file "${this.fileName}" (which is part of your typescript project), but no watcher is registered for it. Changes would go unnoticed. This probably means that you need to expand the files that are included in your project.`, | ||
); | ||
@@ -47,0 +51,0 @@ } |
@@ -8,3 +8,7 @@ import { Mutant } from '@stryker-mutator/api/core'; | ||
export class TSFileNode { | ||
constructor(public fileName: string, public parents: TSFileNode[], public children: TSFileNode[]) {} | ||
constructor( | ||
public fileName: string, | ||
public parents: TSFileNode[], | ||
public children: TSFileNode[], | ||
) {} | ||
@@ -11,0 +15,0 @@ public getAllParentReferencesIncludingSelf(allParentReferences: Set<TSFileNode> = new Set<TSFileNode>()): Set<TSFileNode> { |
@@ -12,3 +12,3 @@ import fs from 'fs'; | ||
export const strykerValidationSchema: typeof import('../schema/typescript-checker-options.json') = JSON.parse( | ||
fs.readFileSync(new URL('../schema/typescript-checker-options.json', import.meta.url), 'utf-8') | ||
fs.readFileSync(new URL('../schema/typescript-checker-options.json', import.meta.url), 'utf-8'), | ||
); |
@@ -90,3 +90,3 @@ import path from 'path'; | ||
return parsedConfig.config?.references.map((reference: ts.ProjectReference) => | ||
path.resolve(fromDirName, ts.resolveProjectReferencePath(reference)) | ||
path.resolve(fromDirName, ts.resolveProjectReferencePath(reference)), | ||
); | ||
@@ -93,0 +93,0 @@ } |
@@ -46,3 +46,7 @@ import { EOL } from 'os'; | ||
constructor(private readonly logger: Logger, options: StrykerOptions, private readonly tsCompiler: TypescriptCompiler) { | ||
constructor( | ||
private readonly logger: Logger, | ||
options: StrykerOptions, | ||
private readonly tsCompiler: TypescriptCompiler, | ||
) { | ||
this.options = options as TypescriptCheckerOptionsWithStrykerOptions; | ||
@@ -106,3 +110,3 @@ } | ||
errorsMap: Record<string, ts.Diagnostic[]>, | ||
nodes: Map<string, TSFileNode> | ||
nodes: Map<string, TSFileNode>, | ||
): Promise<Record<string, ts.Diagnostic[]>> { | ||
@@ -124,4 +128,4 @@ const errors = await this.tsCompiler.check(mutants); | ||
}' was reported without a corresponding file. This shouldn't happen. Please open an issue using this link: ${strykerReportBugUrl( | ||
`[BUG]: TypeScript checker reports compile error without a corresponding file: ${error.messageText}` | ||
)}` | ||
`[BUG]: TypeScript checker reports compile error without a corresponding file: ${error.messageText}`, | ||
)}`, | ||
); | ||
@@ -135,4 +139,4 @@ } | ||
}). This file is not part of your project, or referenced from your project. This shouldn't happen, please open an issue using this link: ${strykerReportBugUrl( | ||
`[BUG]: TypeScript checker reports compile error in an unrelated file: ${error.messageText}` | ||
)}` | ||
`[BUG]: TypeScript checker reports compile error in an unrelated file: ${error.messageText}`, | ||
)}`, | ||
); | ||
@@ -139,0 +143,0 @@ } |
@@ -51,3 +51,7 @@ import path from 'path'; | ||
constructor(private readonly log: Logger, private readonly options: StrykerOptions, private readonly fs: HybridFileSystem) { | ||
constructor( | ||
private readonly log: Logger, | ||
private readonly options: StrykerOptions, | ||
private readonly fs: HybridFileSystem, | ||
) { | ||
this.tsconfigFile = toPosixFileName(this.options.tsconfigFile); | ||
@@ -127,3 +131,3 @@ this.allTSConfigFiles = new Set([path.resolve(this.tsconfigFile)]); | ||
.filter((importFile) => !importFile.includes('/node_modules/') && file.fileName !== importFile) | ||
.flatMap((importFile) => this.resolveTSInputFile(importFile)) | ||
.flatMap((importFile) => this.resolveTSInputFile(importFile)), | ||
), | ||
@@ -151,3 +155,3 @@ }); | ||
summary.code !== FILE_CHANGE_DETECTED_DIAGNOSTIC_CODE && this.currentTask.resolve(); | ||
} | ||
}, | ||
); | ||
@@ -190,3 +194,3 @@ | ||
throw new Error( | ||
`Node for file '${fileName}' could not be found. This should not happen. This shouldn't happen, please open an issue on the stryker-js github` | ||
`Node for file '${fileName}' could not be found. This should not happen. This shouldn't happen, please open an issue on the stryker-js github`, | ||
); | ||
@@ -266,4 +270,4 @@ } | ||
`The tsconfig file does not exist at: "${path.resolve( | ||
this.tsconfigFile | ||
)}". Please configure the tsconfig file in your stryker.conf file using "${propertyPath<StrykerOptions>()('tsconfigFile')}"` | ||
this.tsconfigFile, | ||
)}". Please configure the tsconfig file in your stryker.conf file using "${propertyPath<StrykerOptions>()('tsconfigFile')}"`, | ||
); | ||
@@ -270,0 +274,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
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
357180
114
2642
4
+ Added@babel/core@7.23.9(transitive)
+ Added@babel/generator@7.23.6(transitive)
+ Added@babel/parser@7.23.9(transitive)
+ Added@babel/plugin-proposal-decorators@7.23.9(transitive)
+ Added@babel/preset-typescript@7.23.3(transitive)
+ Added@stryker-mutator/api@7.2.0(transitive)
+ Added@stryker-mutator/core@7.2.0(transitive)
+ Added@stryker-mutator/instrumenter@7.2.0(transitive)
+ Added@stryker-mutator/util@7.2.0(transitive)
+ Addedconvert-source-map@2.0.0(transitive)
+ Addedexeca@8.0.1(transitive)
+ Addedget-stream@8.0.1(transitive)
+ Addedhuman-signals@5.0.0(transitive)
+ Addedmutation-testing-elements@2.0.3(transitive)
+ Addedmutation-testing-metrics@2.0.3(transitive)
+ Addedmutation-testing-report-schema@2.0.3(transitive)
- Removed@babel/core@7.22.20(transitive)
- Removed@babel/generator@7.22.15(transitive)
- Removed@babel/parser@7.22.16(transitive)
- Removed@babel/plugin-proposal-class-properties@7.18.6(transitive)
- Removed@babel/plugin-proposal-decorators@7.22.15(transitive)
- Removed@babel/plugin-proposal-private-methods@7.18.6(transitive)
- Removed@babel/preset-typescript@7.22.15(transitive)
- Removed@stryker-mutator/api@7.1.1(transitive)
- Removed@stryker-mutator/core@7.1.1(transitive)
- Removed@stryker-mutator/instrumenter@7.1.1(transitive)
- Removed@stryker-mutator/util@7.1.1(transitive)
- Removedconvert-source-map@1.9.0(transitive)
- Removedexeca@7.1.1(transitive)
- Removedget-stream@6.0.1(transitive)
- Removedhuman-signals@4.3.1(transitive)
- Removedmutation-testing-elements@2.0.1(transitive)
- Removedmutation-testing-metrics@2.0.1(transitive)
- Removedmutation-testing-report-schema@2.0.1(transitive)
- Removedtslib@2.6.0(transitive)
Updated@stryker-mutator/api@7.2.0
Updated@stryker-mutator/util@7.2.0