Socket
Socket
Sign inDemoInstall

@stryker-mutator/typescript-checker

Package Overview
Dependencies
189
Maintainers
4
Versions
69
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.1.1 to 7.2.0

dist/test/helpers.d.ts

19

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc