@cplieger/deadset-ts 8.0.0-dev.14 → 8.0.0-dev.16

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 (149) hide show
  1. package/dist/src/alias-chain.js +2 -2
  2. package/dist/src/analysis.js +43 -38
  3. package/dist/src/commands/read.js +6 -7
  4. package/dist/src/conformance-record.js +1 -1
  5. package/dist/src/consumers.js +4 -2
  6. package/dist/src/contract/config.generated.js +1 -1
  7. package/dist/src/contract/contract.generated.js +120 -2
  8. package/dist/src/dependencies.js +81 -49
  9. package/dist/src/entries/build-scripts.js +222 -0
  10. package/dist/src/{configuration-files.js → entries/configuration-files.js} +20 -58
  11. package/dist/src/{convention-rows.js → entries/convention-rows.js} +120 -27
  12. package/dist/src/entries/conventions.js +739 -0
  13. package/dist/src/{html-entries.js → entries/html-entries.js} +3 -3
  14. package/dist/src/{mdx-entries.js → entries/mdx-entries.js} +2 -2
  15. package/dist/src/entries/run-directories.js +77 -0
  16. package/dist/src/entries/sources.js +144 -0
  17. package/dist/src/entries/static-module.js +669 -0
  18. package/dist/src/entries/test-runners.js +684 -0
  19. package/dist/src/{workflow-steps.js → entries/workflow-steps.js} +18 -8
  20. package/dist/src/extensions.js +37 -0
  21. package/dist/src/facts.js +38 -0
  22. package/dist/src/file-facts.js +1 -1
  23. package/dist/src/findings/emitters.js +5 -8
  24. package/dist/src/findings/self-check.js +36 -20
  25. package/dist/src/findings-pass.js +5 -6
  26. package/dist/src/framework-lifecycle.js +1 -1
  27. package/dist/src/fs/manifest.js +15 -20
  28. package/dist/src/generated-file.js +172 -29
  29. package/dist/src/graph.js +2 -5
  30. package/dist/src/index.js +1 -1
  31. package/dist/src/injection-container.js +1 -1
  32. package/dist/src/inventory/commonjs.js +507 -0
  33. package/dist/src/inventory/enumerate.js +167 -0
  34. package/dist/src/inventory/syntax.js +236 -0
  35. package/dist/src/inventory.js +305 -705
  36. package/dist/src/javascript-file.js +26 -11
  37. package/dist/src/load/classify.js +28 -9
  38. package/dist/src/load/diagnostics.js +8 -1
  39. package/dist/src/load/discover.js +16 -8
  40. package/dist/src/load/package-scope.js +56 -0
  41. package/dist/src/load/plan.js +2 -2
  42. package/dist/src/load/synthesize.js +5 -5
  43. package/dist/src/load/workspace-manifests.js +1 -1
  44. package/dist/src/matrix.js +6 -13
  45. package/dist/src/outside-tests.js +1 -1
  46. package/dist/src/paths.js +16 -0
  47. package/dist/src/platform-calls.js +78 -0
  48. package/dist/src/platform-symbols.js +140 -0
  49. package/dist/src/position.js +41 -0
  50. package/dist/src/ref.js +11 -20
  51. package/dist/src/references.js +281 -50
  52. package/dist/src/resolve.js +1 -1
  53. package/dist/src/{configured-declarations.js → roots/configured-declarations.js} +4 -4
  54. package/dist/src/{entry-point-gaps.js → roots/entry-point-gaps.js} +5 -8
  55. package/dist/src/{manifest.js → roots/manifest.js} +4 -4
  56. package/dist/src/roots/published-reach.js +412 -0
  57. package/dist/src/roots/root-set.js +489 -0
  58. package/dist/src/roots/unseen-loads.js +208 -0
  59. package/dist/src/serialization-contract.js +1 -1
  60. package/dist/src/session.js +3 -0
  61. package/dist/src/source-files.js +5 -9
  62. package/dist/src/suppress-inline.js +33 -81
  63. package/dist/src/suppress.js +30 -32
  64. package/dist/src/test-support.js +4 -2
  65. package/dist/src/verbs/analyze.js +13 -1
  66. package/dist/src/verbs/describe.js +5 -3
  67. package/jsr.json +1 -1
  68. package/package.json +3 -3
  69. package/src/alias-chain.ts +2 -2
  70. package/src/analysis.ts +77 -53
  71. package/src/automatic-types.ts +1 -1
  72. package/src/commands/read.ts +6 -8
  73. package/src/conformance-record.ts +1 -1
  74. package/src/consumers.ts +5 -1
  75. package/src/contract/config.generated.ts +1 -1
  76. package/src/contract/contract.generated.ts +139 -2
  77. package/src/dependencies.ts +98 -50
  78. package/src/entries/build-scripts.ts +292 -0
  79. package/src/{configuration-files.ts → entries/configuration-files.ts} +23 -75
  80. package/src/{convention-rows.ts → entries/convention-rows.ts} +167 -28
  81. package/src/{conventions.ts → entries/conventions.ts} +347 -522
  82. package/src/{html-entries.ts → entries/html-entries.ts} +5 -5
  83. package/src/{mdx-entries.ts → entries/mdx-entries.ts} +4 -4
  84. package/src/entries/run-directories.ts +108 -0
  85. package/src/entries/sources.ts +266 -0
  86. package/src/entries/static-module.ts +857 -0
  87. package/src/entries/test-runners.ts +868 -0
  88. package/src/{workflow-steps.ts → entries/workflow-steps.ts} +29 -11
  89. package/src/exempt.ts +3 -2
  90. package/src/extensions.ts +45 -0
  91. package/src/facts.ts +44 -0
  92. package/src/file-facts.ts +2 -2
  93. package/src/findings/emitters.ts +14 -10
  94. package/src/findings/self-check.ts +41 -22
  95. package/src/findings/visibility-narrowing.ts +1 -1
  96. package/src/findings-pass.ts +5 -12
  97. package/src/framework-lifecycle.ts +1 -1
  98. package/src/fs/manifest.ts +25 -21
  99. package/src/generated-file.ts +240 -36
  100. package/src/graph.ts +3 -6
  101. package/src/index.ts +1 -1
  102. package/src/injection-container.ts +1 -1
  103. package/src/inventory/commonjs.ts +696 -0
  104. package/src/inventory/enumerate.ts +203 -0
  105. package/src/inventory/syntax.ts +311 -0
  106. package/src/inventory.ts +424 -878
  107. package/src/javascript-file.ts +29 -12
  108. package/src/load/classify.ts +49 -13
  109. package/src/load/diagnostics.ts +11 -1
  110. package/src/load/discover.ts +28 -12
  111. package/src/load/package-scope.ts +74 -0
  112. package/src/load/plan.ts +11 -2
  113. package/src/load/synthesize.ts +6 -6
  114. package/src/load/test-globals.ts +1 -1
  115. package/src/load/workspace-manifests.ts +1 -1
  116. package/src/load/workspace-run.ts +1 -1
  117. package/src/matrix.ts +7 -14
  118. package/src/outside-tests.ts +1 -1
  119. package/src/paths.ts +18 -0
  120. package/src/platform-calls.ts +119 -0
  121. package/src/platform-symbols.ts +205 -0
  122. package/src/position.ts +42 -0
  123. package/src/ref.ts +11 -20
  124. package/src/references.ts +383 -73
  125. package/src/report.ts +1 -1
  126. package/src/resolve.ts +1 -1
  127. package/src/{configured-declarations.ts → roots/configured-declarations.ts} +7 -7
  128. package/src/{entry-point-gaps.ts → roots/entry-point-gaps.ts} +5 -8
  129. package/src/{manifest.ts → roots/manifest.ts} +5 -5
  130. package/src/roots/published-reach.ts +481 -0
  131. package/src/{roots.ts → roots/root-set.ts} +203 -630
  132. package/src/roots/unseen-loads.ts +307 -0
  133. package/src/serialization-contract.ts +1 -1
  134. package/src/session.ts +17 -1
  135. package/src/source-files.ts +5 -10
  136. package/src/suppress-inline.ts +53 -89
  137. package/src/suppress.ts +48 -33
  138. package/src/test-support.ts +8 -3
  139. package/src/verbs/analyze.ts +17 -4
  140. package/src/verbs/describe.ts +5 -2
  141. package/src/verbs/explain.ts +1 -1
  142. package/dist/src/build-scripts.js +0 -418
  143. package/dist/src/conventions.js +0 -907
  144. package/dist/src/entry-points.js +0 -513
  145. package/dist/src/roots.js +0 -865
  146. package/dist/src/unseen-loads.js +0 -100
  147. package/src/build-scripts.ts +0 -536
  148. package/src/entry-points.ts +0 -661
  149. package/src/unseen-loads.ts +0 -134
@@ -8,37 +8,40 @@
8
8
  */
9
9
 
10
10
  import {
11
- isCallExpression,
12
- isExportDeclaration,
13
- isIdentifier,
14
- isImportDeclaration,
15
11
  isNoSubstitutionTemplateLiteral,
16
12
  isStringLiteral,
17
- SyntaxKind,
18
13
  type Node,
19
14
  type SourceFile,
20
15
  } from "@typescript/native/ast";
21
- import type { Host } from "./host.ts";
22
- import { ancestors, dirnamePath, joinPath, relativePath, resolvePath } from "./paths.ts";
23
- import type { SourceFiles } from "./source-files.ts";
24
- import { bytewise } from "./text/compare.ts";
25
- import { isRecord } from "./json-document.ts";
26
- import { filesIn } from "./fs/tree.ts";
16
+ import { relativeSpecifiers } from "./static-module.ts";
17
+ import type { Host } from "../host.ts";
18
+ import { ancestors, dirnamePath, joinPath, relativePath, resolvePath } from "../paths.ts";
19
+ import type { SourceFiles } from "../source-files.ts";
20
+ import { bytewise } from "../text/compare.ts";
21
+ import { isRecord } from "../json-document.ts";
22
+ import { filesIn } from "../fs/tree.ts";
27
23
  import {
28
24
  DEPENDENCY_SECTIONS,
29
25
  holdsManifest,
30
26
  inInstalledPackages,
31
27
  manifestAt,
32
28
  readJSON,
33
- } from "./fs/manifest.ts";
34
- import { readCommands } from "./commands/read.ts";
35
- import { manifestCommands } from "./manifest.ts";
29
+ } from "../fs/manifest.ts";
30
+ import { readCommands } from "../commands/read.ts";
31
+ import { manifestCommands } from "../roots/manifest.ts";
32
+ import { APPENDED_EXTENSIONS, extensionOf, MODULE_EXTENSIONS } from "../extensions.ts";
33
+
34
+ /** The extensions of a configuration module, as an expression's alternatives. */
35
+ const MODULE_NAME = MODULE_EXTENSIONS.map((one) => one.slice(1)).join("|");
36
36
 
37
37
  /** A configuration module's name, each form with the spelling a root reports it by. */
38
38
  const MODULE_FORMS: readonly { readonly name: RegExp; readonly form: string }[] = [
39
- { name: /^[\w-]+\.config\.(?:js|mjs|cjs|ts|mts|cts)$/u, form: "<stem>.config.<ext>" },
40
39
  {
41
- name: /^[\w-]+\.[\w-]+\.config\.(?:js|mjs|cjs|ts|mts|cts)$/u,
40
+ name: new RegExp(String.raw`^[\w-]+\.config\.(?:${MODULE_NAME})$`, "u"),
41
+ form: "<stem>.config.<ext>",
42
+ },
43
+ {
44
+ name: new RegExp(String.raw`^[\w-]+\.[\w-]+\.config\.(?:${MODULE_NAME})$`, "u"),
42
45
  form: "<stem>.<qualifier>.config.<ext>",
43
46
  },
44
47
  { name: /^\.[\w-]+rc\.(?:js|mjs|cjs)$/u, form: ".<stem>rc.<ext>" },
@@ -58,9 +61,6 @@ const COUNTERPARTS: readonly (readonly [string, readonly string[]])[] = [
58
61
  [".cjs", [".cts"]],
59
62
  ];
60
63
 
61
- /** The extensions appended to a relative specifier from a configuration file, in order. */
62
- const APPENDED = [".ts", ".tsx", ".mts", ".cts", ".js", ".jsx", ".mjs", ".cjs"] as const;
63
-
64
64
  /** The extensions the program's module resolution appends to a specifier written without one. */
65
65
  export const RESOLVED_EXTENSIONS = [
66
66
  ".ts",
@@ -116,9 +116,6 @@ export interface OutsideModule {
116
116
  readonly manifestDirs: readonly string[];
117
117
  }
118
118
 
119
- /** The extensions of a module a configuration flag may name. */
120
- const MODULE_EXTENSIONS = [".js", ".mjs", ".cjs", ".ts", ".mts", ".cts"] as const;
121
-
122
119
  /**
123
120
  * The files the command strings of the manifest in one directory name after a configuration
124
121
  * flag, as `commands/read.ts` reads them against the directory each command runs in, each a
@@ -143,7 +140,7 @@ function scriptConfigurations(host: Host, root: string, dir: string): readonly s
143
140
  }
144
141
 
145
142
  /** The configuration files one project holds and sits beside. */
146
- interface ConfigurationFiles {
143
+ export interface ConfigurationFiles {
147
144
  /**
148
145
  * Every own file that is a configuration module, with the form its name has and the
149
146
  * directory of the manifest whose dependencies its strings are read against.
@@ -295,55 +292,6 @@ export function configurationFiles(
295
292
  };
296
293
  }
297
294
 
298
- /** The literal module specifier one `require(...)` or `import(...)` call names, if any. */
299
- function calledSpecifier(node: Node): Node | undefined {
300
- if (!isCallExpression(node) || node.arguments.length !== 1) {
301
- return undefined;
302
- }
303
- const callee = node.expression;
304
- const loads =
305
- callee.kind === SyntaxKind.ImportKeyword || (isIdentifier(callee) && callee.text === "require");
306
- return loads ? node.arguments[0] : undefined;
307
- }
308
-
309
- /**
310
- * The relative specifiers one file's imports and re-exports name, and those its
311
- * `require(...)` and `import(...)` calls name by a literal.
312
- */
313
- export function relativeSpecifiers(file: SourceFile): readonly string[] {
314
- const known = specifiersOf.get(file);
315
- if (known !== undefined) {
316
- return known;
317
- }
318
- const found: string[] = [];
319
- const named = (specifier: Node | undefined): void => {
320
- if (
321
- specifier !== undefined &&
322
- (isStringLiteral(specifier) || isNoSubstitutionTemplateLiteral(specifier)) &&
323
- RELATIVE_PREFIXES.some((prefix) => specifier.text.startsWith(prefix))
324
- ) {
325
- found.push(specifier.text);
326
- }
327
- };
328
- const visit = (node: Node): void => {
329
- named(calledSpecifier(node));
330
- node.forEachChild(visit);
331
- };
332
- for (const statement of file.statements) {
333
- named(
334
- isImportDeclaration(statement) || isExportDeclaration(statement)
335
- ? statement.moduleSpecifier
336
- : undefined,
337
- );
338
- visit(statement);
339
- }
340
- specifiersOf.set(file, found);
341
- return found;
342
- }
343
-
344
- /** What {@link relativeSpecifiers} found in each file, which every project of a run reads alike. */
345
- const specifiersOf = new WeakMap<SourceFile, readonly string[]>();
346
-
347
295
  /**
348
296
  * The files no program holds that a chain from `seeds` reads: each seed, and each file
349
297
  * below the target root one imports, re-exports or loads by a relative specifier that no
@@ -371,7 +319,7 @@ export function outsideChain(
371
319
  export function specifierCandidates(dir: string, specifier: string): readonly string[] {
372
320
  const path = resolvePath(dir, specifier);
373
321
  const candidates: string[] = [];
374
- if (APPENDED.some((extension) => path.endsWith(extension))) {
322
+ if (extensionOf(path, APPENDED_EXTENSIONS) !== undefined) {
375
323
  candidates.push(path);
376
324
  }
377
325
  for (const [extension, counterparts] of COUNTERPARTS) {
@@ -380,8 +328,8 @@ export function specifierCandidates(dir: string, specifier: string): readonly st
380
328
  candidates.push(...counterparts.map((one) => stem + one));
381
329
  }
382
330
  }
383
- candidates.push(...APPENDED.map((extension) => path + extension));
384
- candidates.push(...APPENDED.map((extension) => joinPath(path, `index${extension}`)));
331
+ candidates.push(...APPENDED_EXTENSIONS.map((extension) => path + extension));
332
+ candidates.push(...APPENDED_EXTENSIONS.map((extension) => joinPath(path, `index${extension}`)));
385
333
  return candidates;
386
334
  }
387
335
 
@@ -7,6 +7,17 @@
7
7
  * directory one of the row's moves resolves to.
8
8
  */
9
9
 
10
+ import { braced, MODULE_EXTENSIONS } from "../extensions.ts";
11
+ import {
12
+ AVA_6,
13
+ AVA_8,
14
+ JEST_29,
15
+ JEST_30,
16
+ MOCHA_10,
17
+ MOCHA_12,
18
+ type TestRunner,
19
+ } from "./test-runners.ts";
20
+
10
21
  /** A call whose first argument is the object a property is read from. */
11
22
  export interface OptionsCall {
12
23
  /** The module specifier the configuration file imports the callee from. */
@@ -17,7 +28,11 @@ export interface OptionsCall {
17
28
 
18
29
  /** One configuration property, and the configuration files it is read from. */
19
30
  export interface MoveReading {
20
- /** The property's path through nested object literals, its keys joined by `.`. */
31
+ /**
32
+ * The property's path through nested object literals, its keys joined by `.`; in a
33
+ * test-file property a `*` key stands for every element of an array and every member of
34
+ * an object, each read as an object of its own.
35
+ */
21
36
  readonly property: string;
22
37
  /** Globs naming the configuration files, matched in the manifest's directory alone. */
23
38
  readonly files: readonly string[];
@@ -79,6 +94,28 @@ export interface TestFileReading extends MoveReading {
79
94
  readonly roots: readonly string[];
80
95
  }
81
96
 
97
+ /**
98
+ * One configuration's test directory and test-file patterns, whose matching files the
99
+ * runner runs as tests. Each element of the projects property is read the same way, a
100
+ * member it does not write taken from the configuration's own.
101
+ */
102
+ export interface TestDirectoryReading {
103
+ /** Globs naming the configuration files, matched in the manifest's directory alone. */
104
+ readonly files: readonly string[];
105
+ /** The property naming the directory, read against the configuration file's directory. */
106
+ readonly directory: string;
107
+ /**
108
+ * The property naming the patterns, each matched as Playwright matches one: anywhere
109
+ * below the directory, so a pattern gains a leading `**` segment unless it starts with
110
+ * one, and without regard to case.
111
+ */
112
+ readonly match: string;
113
+ /** The pattern that holds where no object names one. */
114
+ readonly defaultMatch: string;
115
+ /** The property listing the projects. */
116
+ readonly projects: string;
117
+ }
118
+
82
119
  /** One member of the declaring `package.json` whose strings name the tool's entries. */
83
120
  export interface ManifestEntryKey {
84
121
  /** The member's path through nested objects, its keys joined by `.`, a `*` key standing for every member. */
@@ -129,6 +166,10 @@ export interface ConventionRow {
129
166
  readonly selections?: readonly MoveReading[];
130
167
  /** The properties whose strings name a file the test runner loads beside the tests, a test file. */
131
168
  readonly testFiles?: readonly TestFileReading[];
169
+ /** The configurations whose test directory and patterns name the test files the runner runs. */
170
+ readonly testDirectories?: readonly TestDirectoryReading[];
171
+ /** The reader of the files the row's test runner runs, from its configuration and the manifest's scripts. */
172
+ readonly testRunner?: TestRunner;
132
173
  /**
133
174
  * The members whose strings name a package the tool loads: the package itself, a
134
175
  * subpath of it, or the package followed by `:` and a name.
@@ -146,7 +187,7 @@ export interface ConventionRow {
146
187
 
147
188
  const SCRIPT = "{js,jsx,ts,tsx}";
148
189
  const MODULE = "{js,mjs,ts,mts}";
149
- const ANY_MODULE = "{js,mjs,cjs,ts,mts,cts}";
190
+ const ANY_MODULE = braced(MODULE_EXTENSIONS);
150
191
  const VITE_CONFIG = `vite.config.${ANY_MODULE}`;
151
192
  /** The legacy configuration files of ESLint: JSON, YAML or a CommonJS module. */
152
193
  const ESLINTRC = [".eslintrc", ".eslintrc.json", ".eslintrc.{yml,yaml}", ".eslintrc.{js,cjs}"];
@@ -195,6 +236,64 @@ const VITEST_CONFIG = `{vitest,vite}.config.${ANY_MODULE}`;
195
236
  */
196
237
  const VITEST_ROOTS = ["test.root", "root"] as const;
197
238
 
239
+ /** The members of a Vitest configuration's `test` object that name setup files. */
240
+ const VITEST_SETUP = ["setupFiles", "globalSetup"] as const;
241
+
242
+ /** Vitest's workspace files, which Vitest 4 no longer reads (https://vitest.dev/guide/workspace). */
243
+ const VITEST_WORKSPACE = `{vitest.workspace,vitest.projects}.${ANY_MODULE}`;
244
+
245
+ /**
246
+ * The Vitest row over one range: its configuration's setup files, those of each inline
247
+ * project of `test.projects`, and, where `workspace`, the workspace file with the setup
248
+ * files of each inline project it lists.
249
+ */
250
+ function vitestRow(range: string, workspace: boolean): ConventionRow {
251
+ const inline = (each: string, files: string): readonly TestFileReading[] =>
252
+ VITEST_SETUP.map((member) => ({
253
+ property: `${each}.test.${member}`,
254
+ files: [files],
255
+ roots: VITEST_ROOTS,
256
+ }));
257
+ return {
258
+ name: "vitest",
259
+ package: "vitest",
260
+ range,
261
+ entries: [
262
+ `**/{vitest,vite}.config.${ANY_MODULE}`,
263
+ `**/{vitest,vite}.config.*.${ANY_MODULE}`,
264
+ `**/{vitest,vite}.*.config.${ANY_MODULE}`,
265
+ ...(workspace ? [VITEST_WORKSPACE] : []),
266
+ ],
267
+ moves: [],
268
+ shortNames: [
269
+ {
270
+ property: "test.coverage.provider",
271
+ files: [VITEST_CONFIG],
272
+ package: "@vitest/coverage-{}",
273
+ },
274
+ ],
275
+ selections: [
276
+ { property: "test.coverage.include", files: [VITEST_CONFIG] },
277
+ { property: "test.coverage.exclude", files: [VITEST_CONFIG] },
278
+ ],
279
+ testFiles: [
280
+ ...VITEST_SETUP.map((member) => ({
281
+ property: `test.${member}`,
282
+ files: [VITEST_CONFIG],
283
+ roots: VITEST_ROOTS,
284
+ })),
285
+ ...inline("test.projects.*", VITEST_CONFIG),
286
+ ...(workspace ? inline("*", VITEST_WORKSPACE) : []),
287
+ ],
288
+ };
289
+ }
290
+
291
+ const PLAYWRIGHT_CONFIG = `playwright.config.${ANY_MODULE}`;
292
+
293
+ /** Playwright's own test-file pattern (https://playwright.dev/docs/api/class-testconfig#test-config-test-match). */
294
+ const PLAYWRIGHT_TEST_MATCH =
295
+ "**/*.{spec,test}.{js,ts,jsx,tsx,cjs,cts,cjsx,ctsx,mjs,mts,mjsx,mtsx}";
296
+
198
297
  /** The entry files of an Angular CLI project, at the workspace root or below `projects`. */
199
298
  const ANGULAR_ENTRIES = [
200
299
  "src/{main,main.server,server,polyfills,test}.ts",
@@ -305,6 +404,22 @@ export const CONVENTION_ROWS: readonly ConventionRow[] = [
305
404
  },
306
405
  ],
307
406
  },
407
+ {
408
+ name: "ava",
409
+ package: "ava",
410
+ range: ">=6.0.0 <8.0.0",
411
+ entries: [],
412
+ moves: [],
413
+ testRunner: AVA_6,
414
+ },
415
+ {
416
+ name: "ava",
417
+ package: "ava",
418
+ range: ">=8.0.0 <9.0.0",
419
+ entries: [],
420
+ moves: [],
421
+ testRunner: AVA_8,
422
+ },
308
423
  {
309
424
  name: "babel",
310
425
  package: "@babel/core",
@@ -359,6 +474,38 @@ export const CONVENTION_ROWS: readonly ConventionRow[] = [
359
474
  entries: [`{,src/}app/**/*.${SCRIPT}`],
360
475
  moves: [],
361
476
  },
477
+ {
478
+ name: "jest",
479
+ package: "jest",
480
+ range: ">=29.0.0 <30.0.0",
481
+ entries: [],
482
+ moves: [],
483
+ testRunner: JEST_29,
484
+ },
485
+ {
486
+ name: "jest",
487
+ package: "jest",
488
+ range: ">=30.0.0 <31.0.0",
489
+ entries: [],
490
+ moves: [],
491
+ testRunner: JEST_30,
492
+ },
493
+ {
494
+ name: "mocha",
495
+ package: "mocha",
496
+ range: ">=10.0.0 <12.0.0",
497
+ entries: [],
498
+ moves: [],
499
+ testRunner: MOCHA_10,
500
+ },
501
+ {
502
+ name: "mocha",
503
+ package: "mocha",
504
+ range: ">=12.0.0 <13.0.0",
505
+ entries: [],
506
+ moves: [],
507
+ testRunner: MOCHA_12,
508
+ },
362
509
  {
363
510
  name: "next",
364
511
  bundles: true,
@@ -469,6 +616,22 @@ export const CONVENTION_ROWS: readonly ConventionRow[] = [
469
616
  { key: "targets.*.source", directory: false },
470
617
  ],
471
618
  },
619
+ {
620
+ name: "playwright",
621
+ package: "@playwright/test",
622
+ range: ">=1.0.0 <2.0.0",
623
+ entries: [PLAYWRIGHT_CONFIG],
624
+ moves: [],
625
+ testDirectories: [
626
+ {
627
+ files: [PLAYWRIGHT_CONFIG],
628
+ directory: "testDir",
629
+ match: "testMatch",
630
+ defaultMatch: PLAYWRIGHT_TEST_MATCH,
631
+ projects: "projects",
632
+ },
633
+ ],
634
+ },
472
635
  {
473
636
  name: "prettier",
474
637
  package: "prettier",
@@ -825,30 +988,6 @@ export const CONVENTION_ROWS: readonly ConventionRow[] = [
825
988
  ],
826
989
  moves: [],
827
990
  },
828
- {
829
- name: "vitest",
830
- package: "vitest",
831
- range: ">=3.2.0 <6.0.0",
832
- entries: [
833
- `**/{vitest,vite}.config.${ANY_MODULE}`,
834
- `**/{vitest,vite}.config.*.${ANY_MODULE}`,
835
- `**/{vitest,vite}.*.config.${ANY_MODULE}`,
836
- ],
837
- moves: [],
838
- shortNames: [
839
- {
840
- property: "test.coverage.provider",
841
- files: [VITEST_CONFIG],
842
- package: "@vitest/coverage-{}",
843
- },
844
- ],
845
- selections: [
846
- { property: "test.coverage.include", files: [VITEST_CONFIG] },
847
- { property: "test.coverage.exclude", files: [VITEST_CONFIG] },
848
- ],
849
- testFiles: [
850
- { property: "test.setupFiles", files: [VITEST_CONFIG], roots: VITEST_ROOTS },
851
- { property: "test.globalSetup", files: [VITEST_CONFIG], roots: VITEST_ROOTS },
852
- ],
853
- },
991
+ vitestRow(">=3.2.0 <4.0.0", true),
992
+ vitestRow(">=4.0.0 <6.0.0", false),
854
993
  ];