@systemfsoftware/stryker-js-typescript-checker 1.2.3 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/CHANGELOG.md +65 -0
  2. package/LICENSE +203 -21
  3. package/README.md +31 -0
  4. package/dist/index.d.mts +19 -19
  5. package/dist/index.mjs +132 -120
  6. package/package.json +24 -11
  7. package/.turbo/turbo-build.log +0 -21
  8. package/AGENTS.md +0 -7
  9. package/oxlint.config.ts +0 -9
  10. package/src/fs/hybrid-file-system.ts +0 -118
  11. package/src/fs/index.ts +0 -2
  12. package/src/fs/script-file.ts +0 -44
  13. package/src/grouping/create-groups.ts +0 -77
  14. package/src/grouping/ts-file-node.ts +0 -54
  15. package/src/index.ts +0 -18
  16. package/src/plugin-tokens.ts +0 -2
  17. package/src/tsconfig-helpers.ts +0 -187
  18. package/src/typescript-checker-options-with-stryker-options.ts +0 -9
  19. package/src/typescript-checker.ts +0 -223
  20. package/src/typescript-compiler.ts +0 -412
  21. package/test/integration/e2e-plugin-entry.it.spec.ts +0 -153
  22. package/test/integration/nodenext-project.it.spec.ts +0 -101
  23. package/test/integration/project-references.it.spec.ts +0 -146
  24. package/test/integration/project-with-ts-buildinfo.it.spec.ts +0 -92
  25. package/test/integration/single-project.it.spec.ts +0 -298
  26. package/test/integration/tsconfig-helpers.it.spec.ts +0 -218
  27. package/test/integration/typescript-checkers-errors.it.spec.ts +0 -112
  28. package/test/unit/fs/hybrid-file-system.spec.ts +0 -109
  29. package/test/unit/grouping/create-groups.spec.ts +0 -122
  30. package/test/unit/grouping/ts-file-node.spec.ts +0 -132
  31. package/testResources/errors/compile-error/add.ts +0 -3
  32. package/testResources/errors/compile-error/tsconfig.json +0 -5
  33. package/testResources/errors/empty-dir/.gitkeep +0 -0
  34. package/testResources/errors/invalid-tsconfig/tsconfig.json +0 -1
  35. package/testResources/nodenext-project/package.json +0 -6
  36. package/testResources/nodenext-project/src/index.ts +0 -5
  37. package/testResources/nodenext-project/src/util.ts +0 -3
  38. package/testResources/nodenext-project/tsconfig.json +0 -16
  39. package/testResources/project-references/src/index.ts +0 -5
  40. package/testResources/project-references/src/job.ts +0 -6
  41. package/testResources/project-references/src/tsconfig.json +0 -10
  42. package/testResources/project-references/tsconfig.root.json +0 -7
  43. package/testResources/project-references/tsconfig.settings.json +0 -15
  44. package/testResources/project-references/utils/math.ts +0 -3
  45. package/testResources/project-references/utils/text.ts +0 -3
  46. package/testResources/project-references/utils/tsconfig.json +0 -7
  47. package/testResources/project-with-ts-buildinfo/src/index.ts +0 -3
  48. package/testResources/project-with-ts-buildinfo/tsconfig.json +0 -15
  49. package/testResources/single-project/src/counter.ts +0 -9
  50. package/testResources/single-project/src/errorInFileAbove2Mutants/counter.ts +0 -9
  51. package/testResources/single-project/src/errorInFileAbove2Mutants/todo-counter.ts +0 -7
  52. package/testResources/single-project/src/errorInFileAbove2Mutants/todo.spec.ts +0 -11
  53. package/testResources/single-project/src/errorInFileAbove2Mutants/todo.ts +0 -22
  54. package/testResources/single-project/src/not-type-checked.js +0 -1
  55. package/testResources/single-project/src/todo.spec.ts +0 -11
  56. package/testResources/single-project/src/todo.ts +0 -22
  57. package/testResources/single-project/tsconfig.json +0 -15
  58. package/tsconfig.json +0 -26
  59. package/tsdown.config.ts +0 -16
  60. package/vitest.config.ts +0 -13
@@ -1,5 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "types": []
4
- }
5
- }
File without changes
@@ -1 +0,0 @@
1
- invalid tsconfig file
@@ -1,6 +0,0 @@
1
- {
2
- "name": "nodenext-project",
3
- "version": "0.0.0",
4
- "private": true,
5
- "type": "module"
6
- }
@@ -1,5 +0,0 @@
1
- import { evenOdd } from './util.js'
2
-
3
- const numbers = [1, 2, 3, 4]
4
-
5
- export const groupedWithEs2024ObjectGroupBy = Object.groupBy(numbers, evenOdd)
@@ -1,3 +0,0 @@
1
- export function evenOdd(value: number): string {
2
- return value % 2 === 0 ? 'even' : 'odd'
3
- }
@@ -1,16 +0,0 @@
1
- {
2
- "$schema": "https://json.schemastore.org/tsconfig",
3
- "compilerOptions": {
4
- "strict": true,
5
- "module": "NodeNext",
6
-
7
- // `moduleResolution` is deliberately absent and `target` is deliberately newer
8
- // than es2022: the checker must not supply either. See nodenext-project.it.spec.ts.
9
- "target": "es2024",
10
-
11
- "verbatimModuleSyntax": true,
12
- "outDir": "dist",
13
- "types": []
14
- },
15
- "include": ["src/**/*.ts"]
16
- }
@@ -1,5 +0,0 @@
1
- import { count } from '../utils/math.js'
2
-
3
- export function countArrayLength(todo: any[]): number {
4
- return count(todo)
5
- }
@@ -1,6 +0,0 @@
1
- import { toUpperCase } from '../utils/text.js'
2
-
3
- export function start(): void {
4
- const logText = 'Starting job'
5
- console.log(toUpperCase(logText))
6
- }
@@ -1,10 +0,0 @@
1
- {
2
- "extends": "../tsconfig.settings",
3
- "compilerOptions": {
4
- "tsBuildInfoFile": "src.tsbuildinfo",
5
- "outDir": "../dist/src"
6
- },
7
- "references": [
8
- { "path": "../utils" }
9
- ]
10
- }
@@ -1,7 +0,0 @@
1
- {
2
- "files": [],
3
- "references": [
4
- { "path": "./src" },
5
- { "path": "./utils" }
6
- ]
7
- }
@@ -1,15 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "strict": true,
4
- "module": "commonjs",
5
- "composite": true,
6
- "declaration": true,
7
- "declarationMap": true,
8
-
9
- // These settings should be overridden by the typescript checker
10
- "noUnusedLocals": true,
11
- "noUnusedParameters": true,
12
-
13
- "types": []
14
- }
15
- }
@@ -1,3 +0,0 @@
1
- export function count(array: any[]) {
2
- return array.length
3
- }
@@ -1,3 +0,0 @@
1
- export function toUpperCase(text: string) {
2
- return text.toUpperCase()
3
- }
@@ -1,7 +0,0 @@
1
- {
2
- "extends": "../tsconfig.settings",
3
- "compilerOptions": {
4
- "outDir": "../dist/utils",
5
- "tsBuildInfoFile": "utils.tsbuildinfo"
6
- }
7
- }
@@ -1,3 +0,0 @@
1
- export function add(a: number, b: number) {
2
- return a + b
3
- }
@@ -1,15 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "strict": true,
4
- "module": "commonjs",
5
- "outDir": "dist",
6
-
7
- // These settings should be overridden by the typescript checker
8
- "noUnusedLocals": true,
9
- "noUnusedParameters": true,
10
-
11
- "types": [],
12
- "incremental": true,
13
- "tsBuildInfoFile": "do-not-delete.tsbuildinfo"
14
- }
15
- }
@@ -1,9 +0,0 @@
1
- export class Counter {
2
- constructor(private currentNumber: number) {}
3
- public increment(numberToIncrementBy = 1): number {
4
- return (this.currentNumber += numberToIncrementBy)
5
- }
6
- get getCurrentNumber(): number {
7
- return this.currentNumber
8
- }
9
- }
@@ -1,9 +0,0 @@
1
- export class Counter {
2
- constructor(private currentNumber: number) {}
3
- public increment(numberToIncrementBy = 1) {
4
- return (this.currentNumber += numberToIncrementBy)
5
- }
6
- get getCurrentNumber(): number {
7
- return this.currentNumber
8
- }
9
- }
@@ -1,7 +0,0 @@
1
- import { Counter } from './counter'
2
- import { TodoList } from './todo'
3
-
4
- const counter = new Counter(1)
5
- const todoList = new TodoList()
6
- todoList.createTodoItem('test', 'test description')
7
- const newCount: number = counter.increment()
@@ -1,11 +0,0 @@
1
- import { TodoList } from './todo.js'
2
-
3
- const list = new TodoList()
4
- const n: number = list.createTodoItem('Mow lawn', 'Mow moving forward.')
5
- console.log(n)
6
-
7
- function addTodo(name = 'test', description = 'test') {
8
- list.createTodoItem(name, description)
9
- }
10
-
11
- addTodo()
@@ -1,22 +0,0 @@
1
- export interface ITodo {
2
- name: string
3
- description: string
4
- completed: boolean
5
- }
6
-
7
- class Todo implements ITodo {
8
- constructor(public name: string, public description: string, public completed: boolean) {}
9
- }
10
-
11
- export class TodoList {
12
- public static allTodos: Todo[] = []
13
- createTodoItem(name: string, description: string) {
14
- let newItem = new Todo(name, description, false)
15
- let totalCount: number = TodoList.allTodos.push(newItem)
16
- return totalCount
17
- }
18
-
19
- allTodoItems(): ITodo[] {
20
- return TodoList.allTodos
21
- }
22
- }
@@ -1 +0,0 @@
1
- const foo = 'bar'
@@ -1,11 +0,0 @@
1
- import { TodoList } from './todo.js'
2
-
3
- const list = new TodoList()
4
- const n: number = list.createTodoItem('Mow lawn', 'Mow moving forward.')
5
- console.log(n)
6
-
7
- function addTodo(name = 'test', description = 'test') {
8
- list.createTodoItem(name, description)
9
- }
10
-
11
- addTodo()
@@ -1,22 +0,0 @@
1
- export interface ITodo {
2
- name: string
3
- description: string
4
- completed: boolean
5
- }
6
-
7
- class Todo implements ITodo {
8
- constructor(public name: string, public description: string, public completed: boolean) {}
9
- }
10
-
11
- export class TodoList {
12
- public static allTodos: Todo[] = []
13
- createTodoItem(name: string, description: string) {
14
- let newItem = new Todo(name, description, false)
15
- let totalCount: number = TodoList.allTodos.push(newItem)
16
- return totalCount
17
- }
18
-
19
- allTodoItems(): ITodo[] {
20
- return TodoList.allTodos
21
- }
22
- }
@@ -1,15 +0,0 @@
1
- {
2
- "$schema": "https://json.schemastore.org/tsconfig",
3
- "compilerOptions": {
4
- "strict": true,
5
- "module": "commonjs",
6
- "outDir": "dist",
7
-
8
- // These settings should be overridden by the typescript checker
9
- "noUnusedLocals": true,
10
- "noUnusedParameters": true,
11
-
12
- "types": []
13
- },
14
- "include": ["src/**/*.ts"]
15
- }
package/tsconfig.json DELETED
@@ -1,26 +0,0 @@
1
- {
2
- "extends": "@systemfsoftware/tsconfig/tsc/no-dom/library",
3
- "compilerOptions": {
4
- "outDir": "dist",
5
- "rootDir": ".",
6
- "types": [
7
- "node"
8
- ],
9
- // Fork of @stryker-mutator/typescript-checker: the leaf AGENTS.md mandates a minimal upstream
10
- // diff, so the constitution policy in @systemfsoftware/tsconfig/effect is deliberately NOT
11
- // extended here. The Effect Language Service runs at its own defaults — correctness tier only.
12
- "plugins": [
13
- {
14
- "name": "@effect/language-service"
15
- }
16
- ]
17
- },
18
- "include": [
19
- "src",
20
- "test"
21
- ],
22
- "exclude": [
23
- "node_modules",
24
- "dist"
25
- ]
26
- }
package/tsdown.config.ts DELETED
@@ -1,16 +0,0 @@
1
- import { defineConfig } from 'tsdown'
2
-
3
- export default defineConfig({
4
- entry: {
5
- index: './src/index.ts',
6
- },
7
- format: 'esm',
8
- dts: true,
9
- exports: { devExports: '@systemfsoftware/source' },
10
- // `jsr:` specs publish as `npm:@jsr/std__jsonc@…`, which exists only on npm.jsr.io, so a
11
- // default-registry consumer cannot install it. Inlining the parser (a leaf, no runtime
12
- // imports) keeps the published artifact free of any `@jsr` dep. Dropping this line
13
- // reintroduces an uninstallable release — verified by packing and installing the tarball.
14
- noExternal: ['@std/jsonc'],
15
- clean: false,
16
- })
package/vitest.config.ts DELETED
@@ -1,13 +0,0 @@
1
- import { defineConfig } from '@systemfsoftware/vitest-config'
2
-
3
- export default defineConfig({
4
- test: {
5
- exclude: [
6
- '**/node_modules/**',
7
- '**/.stryker-tmp/**',
8
- '**/testResources/**',
9
- ],
10
- testTimeout: 30000,
11
- hookTimeout: 30000,
12
- },
13
- })