@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.
- package/dist/src/alias-chain.js +2 -2
- package/dist/src/analysis.js +43 -38
- package/dist/src/commands/read.js +6 -7
- package/dist/src/conformance-record.js +1 -1
- package/dist/src/consumers.js +4 -2
- package/dist/src/contract/config.generated.js +1 -1
- package/dist/src/contract/contract.generated.js +120 -2
- package/dist/src/dependencies.js +81 -49
- package/dist/src/entries/build-scripts.js +222 -0
- package/dist/src/{configuration-files.js → entries/configuration-files.js} +20 -58
- 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} +3 -3
- package/dist/src/{mdx-entries.js → entries/mdx-entries.js} +2 -2
- package/dist/src/entries/run-directories.js +77 -0
- package/dist/src/entries/sources.js +144 -0
- package/dist/src/entries/static-module.js +669 -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/file-facts.js +1 -1
- package/dist/src/findings/emitters.js +5 -8
- package/dist/src/findings/self-check.js +36 -20
- package/dist/src/findings-pass.js +5 -6
- package/dist/src/framework-lifecycle.js +1 -1
- package/dist/src/fs/manifest.js +15 -20
- package/dist/src/generated-file.js +172 -29
- package/dist/src/graph.js +2 -5
- package/dist/src/index.js +1 -1
- package/dist/src/injection-container.js +1 -1
- package/dist/src/inventory/commonjs.js +507 -0
- package/dist/src/inventory/enumerate.js +167 -0
- package/dist/src/inventory/syntax.js +236 -0
- package/dist/src/inventory.js +305 -705
- package/dist/src/javascript-file.js +26 -11
- package/dist/src/load/classify.js +28 -9
- package/dist/src/load/diagnostics.js +8 -1
- package/dist/src/load/discover.js +16 -8
- package/dist/src/load/package-scope.js +56 -0
- package/dist/src/load/plan.js +2 -2
- package/dist/src/load/synthesize.js +5 -5
- package/dist/src/load/workspace-manifests.js +1 -1
- package/dist/src/matrix.js +6 -13
- package/dist/src/outside-tests.js +1 -1
- package/dist/src/paths.js +16 -0
- package/dist/src/platform-calls.js +78 -0
- package/dist/src/platform-symbols.js +140 -0
- package/dist/src/position.js +41 -0
- package/dist/src/ref.js +11 -20
- package/dist/src/references.js +281 -50
- package/dist/src/resolve.js +1 -1
- package/dist/src/{configured-declarations.js → roots/configured-declarations.js} +4 -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 +208 -0
- package/dist/src/serialization-contract.js +1 -1
- package/dist/src/session.js +3 -0
- package/dist/src/source-files.js +5 -9
- package/dist/src/suppress-inline.js +33 -81
- package/dist/src/suppress.js +30 -32
- package/dist/src/test-support.js +4 -2
- package/dist/src/verbs/analyze.js +13 -1
- package/dist/src/verbs/describe.js +5 -3
- package/jsr.json +1 -1
- package/package.json +3 -3
- package/src/alias-chain.ts +2 -2
- package/src/analysis.ts +77 -53
- package/src/automatic-types.ts +1 -1
- package/src/commands/read.ts +6 -8
- package/src/conformance-record.ts +1 -1
- package/src/consumers.ts +5 -1
- package/src/contract/config.generated.ts +1 -1
- package/src/contract/contract.generated.ts +139 -2
- package/src/dependencies.ts +98 -50
- package/src/entries/build-scripts.ts +292 -0
- package/src/{configuration-files.ts → entries/configuration-files.ts} +23 -75
- package/src/{convention-rows.ts → entries/convention-rows.ts} +167 -28
- package/src/{conventions.ts → entries/conventions.ts} +347 -522
- package/src/{html-entries.ts → entries/html-entries.ts} +5 -5
- package/src/{mdx-entries.ts → entries/mdx-entries.ts} +4 -4
- package/src/entries/run-directories.ts +108 -0
- package/src/entries/sources.ts +266 -0
- package/src/entries/static-module.ts +857 -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 +44 -0
- package/src/file-facts.ts +2 -2
- package/src/findings/emitters.ts +14 -10
- 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 +1 -1
- package/src/fs/manifest.ts +25 -21
- package/src/generated-file.ts +240 -36
- package/src/graph.ts +3 -6
- package/src/index.ts +1 -1
- package/src/injection-container.ts +1 -1
- package/src/inventory/commonjs.ts +696 -0
- package/src/inventory/enumerate.ts +203 -0
- package/src/inventory/syntax.ts +311 -0
- package/src/inventory.ts +424 -878
- package/src/javascript-file.ts +29 -12
- package/src/load/classify.ts +49 -13
- package/src/load/diagnostics.ts +11 -1
- package/src/load/discover.ts +28 -12
- package/src/load/package-scope.ts +74 -0
- package/src/load/plan.ts +11 -2
- package/src/load/synthesize.ts +6 -6
- package/src/load/test-globals.ts +1 -1
- package/src/load/workspace-manifests.ts +1 -1
- package/src/load/workspace-run.ts +1 -1
- package/src/matrix.ts +7 -14
- package/src/outside-tests.ts +1 -1
- package/src/paths.ts +18 -0
- package/src/platform-calls.ts +119 -0
- package/src/platform-symbols.ts +205 -0
- package/src/position.ts +42 -0
- package/src/ref.ts +11 -20
- package/src/references.ts +383 -73
- package/src/report.ts +1 -1
- package/src/resolve.ts +1 -1
- package/src/{configured-declarations.ts → roots/configured-declarations.ts} +7 -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 +307 -0
- package/src/serialization-contract.ts +1 -1
- package/src/session.ts +17 -1
- package/src/source-files.ts +5 -10
- package/src/suppress-inline.ts +53 -89
- package/src/suppress.ts +48 -33
- package/src/test-support.ts +8 -3
- package/src/verbs/analyze.ts +17 -4
- package/src/verbs/describe.ts +5 -2
- package/src/verbs/explain.ts +1 -1
- package/dist/src/build-scripts.js +0 -418
- package/dist/src/conventions.js +0 -907
- package/dist/src/entry-points.js +0 -513
- package/dist/src/roots.js +0 -865
- package/dist/src/unseen-loads.js +0 -100
- package/src/build-scripts.ts +0 -536
- package/src/entry-points.ts +0 -661
- package/src/unseen-loads.ts +0 -134
|
@@ -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
|
];
|