@systemfsoftware/stryker-js-typescript-checker 0.1.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 (55) hide show
  1. package/.turbo/turbo-build.log +15 -0
  2. package/.turbo/turbo-lint.log +3 -0
  3. package/LICENSE +21 -0
  4. package/dist/index.d.mts +122 -0
  5. package/dist/index.mjs +602 -0
  6. package/oxlint.config.ts +9 -0
  7. package/package.json +37 -0
  8. package/schema/typescript-checker-options.json +22 -0
  9. package/src/fs/hybrid-file-system.ts +118 -0
  10. package/src/fs/index.ts +2 -0
  11. package/src/fs/script-file.ts +44 -0
  12. package/src/grouping/create-groups.ts +77 -0
  13. package/src/grouping/ts-file-node.ts +54 -0
  14. package/src/index.ts +18 -0
  15. package/src/plugin-tokens.ts +2 -0
  16. package/src/tsconfig-helpers.ts +168 -0
  17. package/src/typescript-checker-options-with-stryker-options.ts +9 -0
  18. package/src/typescript-checker.ts +223 -0
  19. package/src/typescript-compiler.ts +406 -0
  20. package/test/integration/e2e-plugin-entry.it.spec.ts +153 -0
  21. package/test/integration/project-references.it.spec.ts +146 -0
  22. package/test/integration/project-with-ts-buildinfo.it.spec.ts +92 -0
  23. package/test/integration/single-project.it.spec.ts +263 -0
  24. package/test/integration/typescript-checkers-errors.it.spec.ts +87 -0
  25. package/test/unit/fs/hybrid-file-system.spec.ts +109 -0
  26. package/test/unit/grouping/create-groups.spec.ts +122 -0
  27. package/test/unit/grouping/ts-file-node.spec.ts +132 -0
  28. package/testResources/errors/compile-error/add.ts +3 -0
  29. package/testResources/errors/compile-error/tsconfig.json +6 -0
  30. package/testResources/errors/empty-dir/.gitkeep +0 -0
  31. package/testResources/errors/invalid-tsconfig/tsconfig.json +1 -0
  32. package/testResources/project-references/src/index.ts +5 -0
  33. package/testResources/project-references/src/job.ts +6 -0
  34. package/testResources/project-references/src/src.tsbuildinfo +1 -0
  35. package/testResources/project-references/src/tsconfig.json +10 -0
  36. package/testResources/project-references/tsconfig.root.json +7 -0
  37. package/testResources/project-references/tsconfig.settings.json +17 -0
  38. package/testResources/project-references/utils/math.ts +3 -0
  39. package/testResources/project-references/utils/text.ts +3 -0
  40. package/testResources/project-references/utils/tsconfig.json +7 -0
  41. package/testResources/project-references/utils/utils.tsbuildinfo +1 -0
  42. package/testResources/project-with-ts-buildinfo/do-not-delete.tsbuildinfo +1 -0
  43. package/testResources/project-with-ts-buildinfo/src/index.ts +3 -0
  44. package/testResources/project-with-ts-buildinfo/tsconfig.json +17 -0
  45. package/testResources/single-project/src/counter.ts +9 -0
  46. package/testResources/single-project/src/errorInFileAbove2Mutants/counter.ts +9 -0
  47. package/testResources/single-project/src/errorInFileAbove2Mutants/todo-counter.ts +7 -0
  48. package/testResources/single-project/src/errorInFileAbove2Mutants/todo.spec.ts +11 -0
  49. package/testResources/single-project/src/errorInFileAbove2Mutants/todo.ts +22 -0
  50. package/testResources/single-project/src/not-type-checked.js +1 -0
  51. package/testResources/single-project/src/todo.spec.ts +11 -0
  52. package/testResources/single-project/src/todo.ts +22 -0
  53. package/testResources/single-project/tsconfig.json +15 -0
  54. package/tsconfig.json +10 -0
  55. package/vitest.config.ts +11 -0
@@ -0,0 +1,22 @@
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
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "compilerOptions": {
3
+ "strict": true,
4
+ "target": "es5",
5
+ "moduleResolution": "node",
6
+ "module": "commonjs",
7
+ "outDir": "dist",
8
+
9
+ // These settings should be overridden by the typescript checker
10
+ "noUnusedLocals": true,
11
+ "noUnusedParameters": true,
12
+
13
+ "types": []
14
+ }
15
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,10 @@
1
+ {
2
+ "extends": "@systemfsoftware/tsconfig/tsc/no-dom/library",
3
+ "compilerOptions": {
4
+ "outDir": "dist",
5
+ "rootDir": ".",
6
+ "types": ["node"]
7
+ },
8
+ "include": ["src", "test"],
9
+ "exclude": ["node_modules", "dist"]
10
+ }
@@ -0,0 +1,11 @@
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
+ },
11
+ })