@cplieger/deadset-ts 8.0.0-dev.15 → 8.0.0-dev.17
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.
- package/dist/src/alias-chain.js +0 -5
- package/dist/src/amd.js +81 -0
- package/dist/src/analysis.js +94 -54
- package/dist/src/augmentations.js +23 -24
- package/dist/src/bindings.js +382 -0
- package/dist/src/calls.js +25 -8
- package/dist/src/commands/read.js +6 -7
- package/dist/src/commands/tools.js +5 -9
- package/dist/src/component-files.js +3 -2
- package/dist/src/conformance-record.js +1 -1
- package/dist/src/consumers.js +9 -10
- package/dist/src/contextual-uses.js +1 -17
- package/dist/src/contract/config.generated.js +5 -2
- package/dist/src/contract/contract.generated.js +119 -2
- package/dist/src/contract/report.generated.js +6 -2
- package/dist/src/dependencies.js +98 -71
- package/dist/src/destructuring.js +1 -19
- package/dist/src/element-access.js +179 -164
- package/dist/src/entries/build-scripts.js +222 -0
- package/dist/src/{configuration-files.js → entries/configuration-files.js} +22 -64
- package/dist/src/{convention-rows.js → entries/convention-rows.js} +120 -27
- package/dist/src/entries/conventions.js +739 -0
- package/dist/src/{html-entries.js → entries/html-entries.js} +9 -12
- package/dist/src/{mdx-entries.js → entries/mdx-entries.js} +3 -3
- package/dist/src/entries/run-directories.js +77 -0
- package/dist/src/entries/sources.js +144 -0
- package/dist/src/entries/static-module.js +670 -0
- package/dist/src/entries/test-runners.js +684 -0
- package/dist/src/{workflow-steps.js → entries/workflow-steps.js} +18 -8
- package/dist/src/extensions.js +37 -0
- package/dist/src/facts.js +38 -0
- package/dist/src/findings/completion.js +40 -4
- package/dist/src/findings/emitters.js +5 -8
- package/dist/src/{implementations.js → findings/implementations.js} +3 -3
- package/dist/src/{in-operands.js → findings/in-operands.js} +2 -2
- package/dist/src/findings/self-check.js +36 -20
- package/dist/src/findings-pass.js +5 -6
- package/dist/src/framework-lifecycle.js +42 -15
- package/dist/src/fs/manifest.js +15 -20
- package/dist/src/generated-file.js +172 -29
- package/dist/src/graph.js +14 -8
- package/dist/src/import-bindings.js +73 -28
- package/dist/src/index/sites.js +557 -0
- package/dist/src/index.js +1 -1
- package/dist/src/indexed-access.js +523 -478
- package/dist/src/injection-container.js +1 -1
- package/dist/src/interface-satisfaction.js +1 -1
- package/dist/src/inventory/commonjs.js +62 -17
- package/dist/src/inventory/enumerate.js +2 -1
- package/dist/src/javascript-file.js +26 -11
- package/dist/src/keyof-comparisons.js +124 -103
- package/dist/src/load/classify.js +28 -9
- package/dist/src/load/diagnostics.js +8 -1
- package/dist/src/load/discover.js +15 -7
- package/dist/src/load/expected-module.js +2 -2
- package/dist/src/load/plan.js +2 -2
- package/dist/src/load/specifiers.js +2 -4
- package/dist/src/load/synthesize.js +10 -5
- package/dist/src/load/workspace-manifests.js +1 -1
- package/dist/src/load/workspace-resolution.js +2 -2
- package/dist/src/matrix.js +12 -17
- package/dist/src/module-declarations.js +70 -85
- package/dist/src/overrides.js +134 -112
- package/dist/src/paths.js +56 -1
- package/dist/src/platform-calls.js +78 -0
- package/dist/src/platform-symbols.js +134 -0
- package/dist/src/references/read-rule.js +1 -0
- package/dist/src/references/read-rules.js +48 -0
- package/dist/src/references/sink.js +151 -0
- package/dist/src/references/sources.js +450 -0
- package/dist/src/references.js +111 -1116
- package/dist/src/resolve.js +1 -1
- package/dist/src/{configured-declarations.js → roots/configured-declarations.js} +7 -4
- package/dist/src/{entry-point-gaps.js → roots/entry-point-gaps.js} +5 -8
- package/dist/src/{manifest.js → roots/manifest.js} +4 -4
- package/dist/src/roots/published-reach.js +412 -0
- package/dist/src/roots/root-set.js +489 -0
- package/dist/src/roots/unseen-loads.js +236 -0
- package/dist/src/serialization-contract.js +9 -4
- package/dist/src/source-files.js +5 -9
- package/dist/src/stores.js +4 -2
- package/dist/src/suppress.js +30 -32
- package/dist/src/sweep.js +25 -13
- package/dist/src/symbol-keys.js +89 -83
- package/dist/src/tests/file-class.js +76 -0
- package/dist/src/{outside-tests.js → tests/outside.js} +7 -7
- package/dist/src/{test-support.js → tests/support.js} +5 -12
- package/dist/src/type-parameter-reads.js +178 -139
- package/dist/src/unimplemented-callees.js +262 -242
- package/dist/src/verbs/analyze.js +15 -3
- package/dist/src/verbs/describe.js +5 -3
- package/dist/src/verbs/explain.js +50 -28
- package/dist/src/verbs/print-retained.js +2 -2
- package/jsr.json +1 -1
- package/package.json +3 -3
- package/src/alias-chain.ts +0 -7
- package/src/amd.ts +130 -0
- package/src/analysis.ts +156 -70
- package/src/augmentations.ts +41 -27
- package/src/automatic-types.ts +1 -1
- package/src/bindings.ts +460 -0
- package/src/calls.ts +25 -7
- package/src/commands/read.ts +6 -8
- package/src/commands/tools.ts +5 -11
- package/src/component-files.ts +4 -2
- package/src/conformance-record.ts +1 -1
- package/src/consumers.ts +12 -11
- package/src/contextual-uses.ts +2 -22
- package/src/contract/config.generated.ts +5 -2
- package/src/contract/contract.generated.ts +138 -2
- package/src/contract/report.generated.ts +6 -2
- package/src/dependencies.ts +117 -71
- package/src/destructuring.ts +1 -31
- package/src/element-access.ts +188 -182
- package/src/entries/build-scripts.ts +292 -0
- package/src/{configuration-files.ts → entries/configuration-files.ts} +33 -82
- package/src/{convention-rows.ts → entries/convention-rows.ts} +167 -28
- package/src/{conventions.ts → entries/conventions.ts} +349 -523
- package/src/{html-entries.ts → entries/html-entries.ts} +19 -18
- package/src/{mdx-entries.ts → entries/mdx-entries.ts} +5 -5
- package/src/entries/run-directories.ts +108 -0
- package/src/entries/sources.ts +266 -0
- package/src/entries/static-module.ts +858 -0
- package/src/entries/test-runners.ts +868 -0
- package/src/{workflow-steps.ts → entries/workflow-steps.ts} +29 -11
- package/src/exempt.ts +3 -2
- package/src/extensions.ts +45 -0
- package/src/facts.ts +46 -0
- package/src/file-facts.ts +1 -1
- package/src/findings/boundary.ts +2 -0
- package/src/findings/completion.ts +43 -4
- package/src/findings/emitter.ts +1 -1
- package/src/findings/emitters.ts +14 -10
- package/src/{implementations.ts → findings/implementations.ts} +4 -4
- package/src/{in-operands.ts → findings/in-operands.ts} +3 -3
- package/src/findings/self-check.ts +41 -22
- package/src/findings/visibility-narrowing.ts +1 -1
- package/src/findings-pass.ts +5 -12
- package/src/framework-lifecycle.ts +43 -15
- package/src/fs/manifest.ts +25 -21
- package/src/generated-file.ts +240 -36
- package/src/graph.ts +27 -11
- package/src/import-bindings.ts +98 -29
- package/src/index/sites.ts +781 -0
- package/src/index.ts +1 -1
- package/src/indexed-access.ts +570 -527
- package/src/injection-container.ts +1 -1
- package/src/interface-satisfaction.ts +1 -1
- package/src/inventory/commonjs.ts +102 -17
- package/src/inventory/enumerate.ts +2 -1
- package/src/javascript-file.ts +29 -12
- package/src/keyof-comparisons.ts +131 -116
- package/src/load/classify.ts +49 -13
- package/src/load/diagnostics.ts +11 -1
- package/src/load/discover.ts +27 -11
- package/src/load/expected-module.ts +8 -2
- package/src/load/plan.ts +11 -2
- package/src/load/specifiers.ts +8 -5
- package/src/load/synthesize.ts +12 -6
- package/src/load/test-globals.ts +1 -1
- package/src/load/workspace-manifests.ts +1 -1
- package/src/load/workspace-resolution.ts +9 -2
- package/src/load/workspace-run.ts +1 -1
- package/src/matrix.ts +13 -17
- package/src/module-declarations.ts +74 -98
- package/src/overrides.ts +162 -134
- package/src/paths.ts +65 -1
- package/src/platform-calls.ts +119 -0
- package/src/platform-symbols.ts +189 -0
- package/src/references/read-rule.ts +60 -0
- package/src/references/read-rules.ts +55 -0
- package/src/references/sink.ts +213 -0
- package/src/references/sources.ts +632 -0
- package/src/references.ts +174 -1492
- package/src/report.ts +2 -2
- package/src/resolve.ts +1 -1
- package/src/{configured-declarations.ts → roots/configured-declarations.ts} +10 -7
- package/src/{entry-point-gaps.ts → roots/entry-point-gaps.ts} +5 -8
- package/src/{manifest.ts → roots/manifest.ts} +5 -5
- package/src/roots/published-reach.ts +481 -0
- package/src/{roots.ts → roots/root-set.ts} +203 -630
- package/src/roots/unseen-loads.ts +345 -0
- package/src/serialization-contract.ts +9 -4
- package/src/source-files.ts +5 -10
- package/src/stores.ts +13 -2
- package/src/suppress.ts +48 -33
- package/src/sweep.ts +37 -14
- package/src/symbol-keys.ts +102 -102
- package/src/tests/file-class.ts +118 -0
- package/src/{outside-tests.ts → tests/outside.ts} +16 -10
- package/src/{test-support.ts → tests/support.ts} +15 -21
- package/src/type-parameter-reads.ts +187 -158
- package/src/unimplemented-callees.ts +297 -280
- package/src/verbs/analyze.ts +19 -5
- package/src/verbs/describe.ts +5 -2
- package/src/verbs/explain.ts +75 -32
- package/src/verbs/print-retained.ts +2 -2
- package/dist/src/build-scripts.js +0 -418
- package/dist/src/conventions.js +0 -907
- package/dist/src/entry-points.js +0 -444
- package/dist/src/own-body.js +0 -28
- package/dist/src/roots.js +0 -865
- package/dist/src/unseen-loads.js +0 -189
- package/src/build-scripts.ts +0 -536
- package/src/entry-points.ts +0 -584
- package/src/own-body.ts +0 -42
- package/src/unseen-loads.ts +0 -282
|
@@ -6,27 +6,32 @@
|
|
|
6
6
|
* every string either holds as it likes, so each one that spells a declared dependency
|
|
7
7
|
* uses it and each relative one that names a source file of the program roots the file.
|
|
8
8
|
*/
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
9
|
+
import { isNoSubstitutionTemplateLiteral, isStringLiteral, } from "@typescript/native/ast";
|
|
10
|
+
import { relativeSpecifiers } from "./static-module.js";
|
|
11
|
+
import { ancestors, dirnamePath, isAbsolutePath, joinPath, relativePath, resolvePath, startsRelativePath, } from "../paths.js";
|
|
12
|
+
import { bytewise } from "../text/compare.js";
|
|
13
|
+
import { isRecord } from "../json-document.js";
|
|
14
|
+
import { filesIn } from "../fs/tree.js";
|
|
15
|
+
import { DEPENDENCY_SECTIONS, holdsManifest, inInstalledPackages, manifestAt, readJSON, } from "../fs/manifest.js";
|
|
16
|
+
import { readCommands } from "../commands/read.js";
|
|
17
|
+
import { manifestCommands } from "../roots/manifest.js";
|
|
18
|
+
import { APPENDED_EXTENSIONS, extensionOf, MODULE_EXTENSIONS } from "../extensions.js";
|
|
19
|
+
/** The extensions of a configuration module, as an expression's alternatives. */
|
|
20
|
+
const MODULE_NAME = MODULE_EXTENSIONS.map((one) => one.slice(1)).join("|");
|
|
17
21
|
/** A configuration module's name, each form with the spelling a root reports it by. */
|
|
18
22
|
const MODULE_FORMS = [
|
|
19
|
-
{ name: /^[\w-]+\.config\.(?:js|mjs|cjs|ts|mts|cts)$/u, form: "<stem>.config.<ext>" },
|
|
20
23
|
{
|
|
21
|
-
name:
|
|
24
|
+
name: new RegExp(String.raw `^[\w-]+\.config\.(?:${MODULE_NAME})$`, "u"),
|
|
25
|
+
form: "<stem>.config.<ext>",
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: new RegExp(String.raw `^[\w-]+\.[\w-]+\.config\.(?:${MODULE_NAME})$`, "u"),
|
|
22
29
|
form: "<stem>.<qualifier>.config.<ext>",
|
|
23
30
|
},
|
|
24
31
|
{ name: /^\.[\w-]+rc\.(?:js|mjs|cjs)$/u, form: ".<stem>rc.<ext>" },
|
|
25
32
|
];
|
|
26
33
|
/** A JSON configuration file's name. */
|
|
27
34
|
const DOCUMENT_NAME = /^(?:[\w-]+(?:\.[\w-]+)?\.config\.json|\.[\w-]+rc(?:\.json)?)$/u;
|
|
28
|
-
/** The prefixes a string names a file with, relative to the file that writes it. */
|
|
29
|
-
const RELATIVE_PREFIXES = ["./", "../"];
|
|
30
35
|
/** The JavaScript extensions a relative specifier from a configuration file stands for TypeScript under. */
|
|
31
36
|
const COUNTERPARTS = [
|
|
32
37
|
[".js", [".ts", ".tsx"]],
|
|
@@ -34,8 +39,6 @@ const COUNTERPARTS = [
|
|
|
34
39
|
[".mjs", [".mts"]],
|
|
35
40
|
[".cjs", [".cts"]],
|
|
36
41
|
];
|
|
37
|
-
/** The extensions appended to a relative specifier from a configuration file, in order. */
|
|
38
|
-
const APPENDED = [".ts", ".tsx", ".mts", ".cts", ".js", ".jsx", ".mjs", ".cjs"];
|
|
39
42
|
/** The extensions the program's module resolution appends to a specifier written without one. */
|
|
40
43
|
export const RESOLVED_EXTENSIONS = [
|
|
41
44
|
".ts",
|
|
@@ -65,8 +68,6 @@ export function configurationModuleForm(name) {
|
|
|
65
68
|
export function isConfigurationDocumentName(name) {
|
|
66
69
|
return DOCUMENT_NAME.test(name);
|
|
67
70
|
}
|
|
68
|
-
/** The extensions of a module a configuration flag may name. */
|
|
69
|
-
const MODULE_EXTENSIONS = [".js", ".mjs", ".cjs", ".ts", ".mts", ".cts"];
|
|
70
71
|
/**
|
|
71
72
|
* The files the command strings of the manifest in one directory name after a configuration
|
|
72
73
|
* flag, as `commands/read.ts` reads them against the directory each command runs in, each a
|
|
@@ -182,9 +183,7 @@ export function configurationFiles(host, targetRoot, files, parse) {
|
|
|
182
183
|
}
|
|
183
184
|
document.manifestDirs.push(next.manifestDir);
|
|
184
185
|
for (const text of document.strings) {
|
|
185
|
-
const path =
|
|
186
|
-
? resolvePath(dirnamePath(next.path), text)
|
|
187
|
-
: undefined;
|
|
186
|
+
const path = startsRelativePath(text) ? resolvePath(dirnamePath(next.path), text) : undefined;
|
|
188
187
|
if (path?.endsWith(".json") === true &&
|
|
189
188
|
isProjectPath(root, path) &&
|
|
190
189
|
host.kindOf(path) === "file") {
|
|
@@ -200,47 +199,6 @@ export function configurationFiles(host, targetRoot, files, parse) {
|
|
|
200
199
|
: outsideModules(host, root, [...dirs], files, manifestHeld, parse, named),
|
|
201
200
|
};
|
|
202
201
|
}
|
|
203
|
-
/** The literal module specifier one `require(...)` or `import(...)` call names, if any. */
|
|
204
|
-
function calledSpecifier(node) {
|
|
205
|
-
if (!isCallExpression(node) || node.arguments.length !== 1) {
|
|
206
|
-
return undefined;
|
|
207
|
-
}
|
|
208
|
-
const callee = node.expression;
|
|
209
|
-
const loads = callee.kind === SyntaxKind.ImportKeyword || (isIdentifier(callee) && callee.text === "require");
|
|
210
|
-
return loads ? node.arguments[0] : undefined;
|
|
211
|
-
}
|
|
212
|
-
/**
|
|
213
|
-
* The relative specifiers one file's imports and re-exports name, and those its
|
|
214
|
-
* `require(...)` and `import(...)` calls name by a literal.
|
|
215
|
-
*/
|
|
216
|
-
export function relativeSpecifiers(file) {
|
|
217
|
-
const known = specifiersOf.get(file);
|
|
218
|
-
if (known !== undefined) {
|
|
219
|
-
return known;
|
|
220
|
-
}
|
|
221
|
-
const found = [];
|
|
222
|
-
const named = (specifier) => {
|
|
223
|
-
if (specifier !== undefined &&
|
|
224
|
-
(isStringLiteral(specifier) || isNoSubstitutionTemplateLiteral(specifier)) &&
|
|
225
|
-
RELATIVE_PREFIXES.some((prefix) => specifier.text.startsWith(prefix))) {
|
|
226
|
-
found.push(specifier.text);
|
|
227
|
-
}
|
|
228
|
-
};
|
|
229
|
-
const visit = (node) => {
|
|
230
|
-
named(calledSpecifier(node));
|
|
231
|
-
node.forEachChild(visit);
|
|
232
|
-
};
|
|
233
|
-
for (const statement of file.statements) {
|
|
234
|
-
named(isImportDeclaration(statement) || isExportDeclaration(statement)
|
|
235
|
-
? statement.moduleSpecifier
|
|
236
|
-
: undefined);
|
|
237
|
-
visit(statement);
|
|
238
|
-
}
|
|
239
|
-
specifiersOf.set(file, found);
|
|
240
|
-
return found;
|
|
241
|
-
}
|
|
242
|
-
/** What {@link relativeSpecifiers} found in each file, which every project of a run reads alike. */
|
|
243
|
-
const specifiersOf = new WeakMap();
|
|
244
202
|
/**
|
|
245
203
|
* The files no program holds that a chain from `seeds` reads: each seed, and each file
|
|
246
204
|
* below the target root one imports, re-exports or loads by a relative specifier that no
|
|
@@ -261,7 +219,7 @@ export function outsideChain(host, targetRoot, files, parse, seeds) {
|
|
|
261
219
|
export function specifierCandidates(dir, specifier) {
|
|
262
220
|
const path = resolvePath(dir, specifier);
|
|
263
221
|
const candidates = [];
|
|
264
|
-
if (
|
|
222
|
+
if (extensionOf(path, APPENDED_EXTENSIONS) !== undefined) {
|
|
265
223
|
candidates.push(path);
|
|
266
224
|
}
|
|
267
225
|
for (const [extension, counterparts] of COUNTERPARTS) {
|
|
@@ -270,8 +228,8 @@ export function specifierCandidates(dir, specifier) {
|
|
|
270
228
|
candidates.push(...counterparts.map((one) => stem + one));
|
|
271
229
|
}
|
|
272
230
|
}
|
|
273
|
-
candidates.push(...
|
|
274
|
-
candidates.push(...
|
|
231
|
+
candidates.push(...APPENDED_EXTENSIONS.map((extension) => path + extension));
|
|
232
|
+
candidates.push(...APPENDED_EXTENSIONS.map((extension) => joinPath(path, `index${extension}`)));
|
|
275
233
|
return candidates;
|
|
276
234
|
}
|
|
277
235
|
/** The file on disk one relative specifier from a configuration file reaches, or undefined. */
|
|
@@ -349,7 +307,7 @@ export function dependenciesNamed(text, declared) {
|
|
|
349
307
|
* none.
|
|
350
308
|
*/
|
|
351
309
|
export function filesNamedBy(files, dir, text) {
|
|
352
|
-
if (text === "" || text
|
|
310
|
+
if (text === "" || isAbsolutePath(text) || /[*?[{]/u.test(text)) {
|
|
353
311
|
return [];
|
|
354
312
|
}
|
|
355
313
|
const path = resolvePath(dir, text);
|
|
@@ -6,9 +6,11 @@
|
|
|
6
6
|
* enabling package. A glob may hold `<id>` placeholders, each standing for the
|
|
7
7
|
* directory one of the row's moves resolves to.
|
|
8
8
|
*/
|
|
9
|
+
import { braced, MODULE_EXTENSIONS } from "../extensions.js";
|
|
10
|
+
import { AVA_6, AVA_8, JEST_29, JEST_30, MOCHA_10, MOCHA_12, } from "./test-runners.js";
|
|
9
11
|
const SCRIPT = "{js,jsx,ts,tsx}";
|
|
10
12
|
const MODULE = "{js,mjs,ts,mts}";
|
|
11
|
-
const ANY_MODULE =
|
|
13
|
+
const ANY_MODULE = braced(MODULE_EXTENSIONS);
|
|
12
14
|
const VITE_CONFIG = `vite.config.${ANY_MODULE}`;
|
|
13
15
|
/** The legacy configuration files of ESLint: JSON, YAML or a CommonJS module. */
|
|
14
16
|
const ESLINTRC = [".eslintrc", ".eslintrc.json", ".eslintrc.{yml,yaml}", ".eslintrc.{js,cjs}"];
|
|
@@ -47,6 +49,57 @@ const VITEST_CONFIG = `{vitest,vite}.config.${ANY_MODULE}`;
|
|
|
47
49
|
* (https://vitest.dev/config/setupfiles, https://vitest.dev/config/globalsetup).
|
|
48
50
|
*/
|
|
49
51
|
const VITEST_ROOTS = ["test.root", "root"];
|
|
52
|
+
/** The members of a Vitest configuration's `test` object that name setup files. */
|
|
53
|
+
const VITEST_SETUP = ["setupFiles", "globalSetup"];
|
|
54
|
+
/** Vitest's workspace files, which Vitest 4 no longer reads (https://vitest.dev/guide/workspace). */
|
|
55
|
+
const VITEST_WORKSPACE = `{vitest.workspace,vitest.projects}.${ANY_MODULE}`;
|
|
56
|
+
/**
|
|
57
|
+
* The Vitest row over one range: its configuration's setup files, those of each inline
|
|
58
|
+
* project of `test.projects`, and, where `workspace`, the workspace file with the setup
|
|
59
|
+
* files of each inline project it lists.
|
|
60
|
+
*/
|
|
61
|
+
function vitestRow(range, workspace) {
|
|
62
|
+
const inline = (each, files) => VITEST_SETUP.map((member) => ({
|
|
63
|
+
property: `${each}.test.${member}`,
|
|
64
|
+
files: [files],
|
|
65
|
+
roots: VITEST_ROOTS,
|
|
66
|
+
}));
|
|
67
|
+
return {
|
|
68
|
+
name: "vitest",
|
|
69
|
+
package: "vitest",
|
|
70
|
+
range,
|
|
71
|
+
entries: [
|
|
72
|
+
`**/{vitest,vite}.config.${ANY_MODULE}`,
|
|
73
|
+
`**/{vitest,vite}.config.*.${ANY_MODULE}`,
|
|
74
|
+
`**/{vitest,vite}.*.config.${ANY_MODULE}`,
|
|
75
|
+
...(workspace ? [VITEST_WORKSPACE] : []),
|
|
76
|
+
],
|
|
77
|
+
moves: [],
|
|
78
|
+
shortNames: [
|
|
79
|
+
{
|
|
80
|
+
property: "test.coverage.provider",
|
|
81
|
+
files: [VITEST_CONFIG],
|
|
82
|
+
package: "@vitest/coverage-{}",
|
|
83
|
+
},
|
|
84
|
+
],
|
|
85
|
+
selections: [
|
|
86
|
+
{ property: "test.coverage.include", files: [VITEST_CONFIG] },
|
|
87
|
+
{ property: "test.coverage.exclude", files: [VITEST_CONFIG] },
|
|
88
|
+
],
|
|
89
|
+
testFiles: [
|
|
90
|
+
...VITEST_SETUP.map((member) => ({
|
|
91
|
+
property: `test.${member}`,
|
|
92
|
+
files: [VITEST_CONFIG],
|
|
93
|
+
roots: VITEST_ROOTS,
|
|
94
|
+
})),
|
|
95
|
+
...inline("test.projects.*", VITEST_CONFIG),
|
|
96
|
+
...(workspace ? inline("*", VITEST_WORKSPACE) : []),
|
|
97
|
+
],
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
const PLAYWRIGHT_CONFIG = `playwright.config.${ANY_MODULE}`;
|
|
101
|
+
/** Playwright's own test-file pattern (https://playwright.dev/docs/api/class-testconfig#test-config-test-match). */
|
|
102
|
+
const PLAYWRIGHT_TEST_MATCH = "**/*.{spec,test}.{js,ts,jsx,tsx,cjs,cts,cjsx,ctsx,mjs,mts,mjsx,mtsx}";
|
|
50
103
|
/** The entry files of an Angular CLI project, at the workspace root or below `projects`. */
|
|
51
104
|
const ANGULAR_ENTRIES = [
|
|
52
105
|
"src/{main,main.server,server,polyfills,test}.ts",
|
|
@@ -145,6 +198,22 @@ export const CONVENTION_ROWS = [
|
|
|
145
198
|
},
|
|
146
199
|
],
|
|
147
200
|
},
|
|
201
|
+
{
|
|
202
|
+
name: "ava",
|
|
203
|
+
package: "ava",
|
|
204
|
+
range: ">=6.0.0 <8.0.0",
|
|
205
|
+
entries: [],
|
|
206
|
+
moves: [],
|
|
207
|
+
testRunner: AVA_6,
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
name: "ava",
|
|
211
|
+
package: "ava",
|
|
212
|
+
range: ">=8.0.0 <9.0.0",
|
|
213
|
+
entries: [],
|
|
214
|
+
moves: [],
|
|
215
|
+
testRunner: AVA_8,
|
|
216
|
+
},
|
|
148
217
|
{
|
|
149
218
|
name: "babel",
|
|
150
219
|
package: "@babel/core",
|
|
@@ -199,6 +268,38 @@ export const CONVENTION_ROWS = [
|
|
|
199
268
|
entries: [`{,src/}app/**/*.${SCRIPT}`],
|
|
200
269
|
moves: [],
|
|
201
270
|
},
|
|
271
|
+
{
|
|
272
|
+
name: "jest",
|
|
273
|
+
package: "jest",
|
|
274
|
+
range: ">=29.0.0 <30.0.0",
|
|
275
|
+
entries: [],
|
|
276
|
+
moves: [],
|
|
277
|
+
testRunner: JEST_29,
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
name: "jest",
|
|
281
|
+
package: "jest",
|
|
282
|
+
range: ">=30.0.0 <31.0.0",
|
|
283
|
+
entries: [],
|
|
284
|
+
moves: [],
|
|
285
|
+
testRunner: JEST_30,
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
name: "mocha",
|
|
289
|
+
package: "mocha",
|
|
290
|
+
range: ">=10.0.0 <12.0.0",
|
|
291
|
+
entries: [],
|
|
292
|
+
moves: [],
|
|
293
|
+
testRunner: MOCHA_10,
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
name: "mocha",
|
|
297
|
+
package: "mocha",
|
|
298
|
+
range: ">=12.0.0 <13.0.0",
|
|
299
|
+
entries: [],
|
|
300
|
+
moves: [],
|
|
301
|
+
testRunner: MOCHA_12,
|
|
302
|
+
},
|
|
202
303
|
{
|
|
203
304
|
name: "next",
|
|
204
305
|
bundles: true,
|
|
@@ -309,6 +410,22 @@ export const CONVENTION_ROWS = [
|
|
|
309
410
|
{ key: "targets.*.source", directory: false },
|
|
310
411
|
],
|
|
311
412
|
},
|
|
413
|
+
{
|
|
414
|
+
name: "playwright",
|
|
415
|
+
package: "@playwright/test",
|
|
416
|
+
range: ">=1.0.0 <2.0.0",
|
|
417
|
+
entries: [PLAYWRIGHT_CONFIG],
|
|
418
|
+
moves: [],
|
|
419
|
+
testDirectories: [
|
|
420
|
+
{
|
|
421
|
+
files: [PLAYWRIGHT_CONFIG],
|
|
422
|
+
directory: "testDir",
|
|
423
|
+
match: "testMatch",
|
|
424
|
+
defaultMatch: PLAYWRIGHT_TEST_MATCH,
|
|
425
|
+
projects: "projects",
|
|
426
|
+
},
|
|
427
|
+
],
|
|
428
|
+
},
|
|
312
429
|
{
|
|
313
430
|
name: "prettier",
|
|
314
431
|
package: "prettier",
|
|
@@ -665,30 +782,6 @@ export const CONVENTION_ROWS = [
|
|
|
665
782
|
],
|
|
666
783
|
moves: [],
|
|
667
784
|
},
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
package: "vitest",
|
|
671
|
-
range: ">=3.2.0 <6.0.0",
|
|
672
|
-
entries: [
|
|
673
|
-
`**/{vitest,vite}.config.${ANY_MODULE}`,
|
|
674
|
-
`**/{vitest,vite}.config.*.${ANY_MODULE}`,
|
|
675
|
-
`**/{vitest,vite}.*.config.${ANY_MODULE}`,
|
|
676
|
-
],
|
|
677
|
-
moves: [],
|
|
678
|
-
shortNames: [
|
|
679
|
-
{
|
|
680
|
-
property: "test.coverage.provider",
|
|
681
|
-
files: [VITEST_CONFIG],
|
|
682
|
-
package: "@vitest/coverage-{}",
|
|
683
|
-
},
|
|
684
|
-
],
|
|
685
|
-
selections: [
|
|
686
|
-
{ property: "test.coverage.include", files: [VITEST_CONFIG] },
|
|
687
|
-
{ property: "test.coverage.exclude", files: [VITEST_CONFIG] },
|
|
688
|
-
],
|
|
689
|
-
testFiles: [
|
|
690
|
-
{ property: "test.setupFiles", files: [VITEST_CONFIG], roots: VITEST_ROOTS },
|
|
691
|
-
{ property: "test.globalSetup", files: [VITEST_CONFIG], roots: VITEST_ROOTS },
|
|
692
|
-
],
|
|
693
|
-
},
|
|
785
|
+
vitestRow(">=3.2.0 <4.0.0", true),
|
|
786
|
+
vitestRow(">=4.0.0 <6.0.0", false),
|
|
694
787
|
];
|