@cplieger/deadset-ts 7.1.0 → 7.2.0-dev.2

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 (64) hide show
  1. package/README.md +1 -1
  2. package/dist/src/alias-chain.js +6 -2
  3. package/dist/src/analysis.js +3 -1
  4. package/dist/src/config.js +4 -0
  5. package/dist/src/conformance-record.js +2 -2
  6. package/dist/src/decorator.js +3 -2
  7. package/dist/src/dependencies.js +0 -4
  8. package/dist/src/deprecation.js +1 -1
  9. package/dist/src/findings/completion.js +1 -1
  10. package/dist/src/findings/interfaces.js +1 -8
  11. package/dist/src/findings/unused-declarations.js +8 -11
  12. package/dist/src/html-entries.js +0 -3
  13. package/dist/src/injection-container.js +28 -25
  14. package/dist/src/intra-function-parts.js +71 -22
  15. package/dist/src/inventory.js +19 -6
  16. package/dist/src/kinds.js +2 -2
  17. package/dist/src/matrix.js +1 -8
  18. package/dist/src/module-declarations.js +0 -3
  19. package/dist/src/ref.js +3 -2
  20. package/dist/src/references.js +38 -20
  21. package/dist/src/report.js +1 -1
  22. package/dist/src/resolve.js +37 -4
  23. package/dist/src/schema.js +4 -1
  24. package/dist/src/suppress-file.js +43 -9
  25. package/dist/src/suppress-inline.js +35 -12
  26. package/dist/src/suppress.js +3 -2
  27. package/dist/src/type-errors.js +2 -1
  28. package/dist/src/verbs/analyze.js +7 -3
  29. package/dist/src/version.js +1 -1
  30. package/dist/src/workspace-resolution.js +5 -8
  31. package/dist/src/workspace.js +2 -2
  32. package/jsr.json +1 -1
  33. package/package.json +2 -2
  34. package/src/alias-chain.ts +7 -2
  35. package/src/analysis.ts +3 -3
  36. package/src/config.ts +9 -1
  37. package/src/conformance-record.ts +2 -2
  38. package/src/decorator.ts +8 -2
  39. package/src/dependencies.ts +0 -4
  40. package/src/deprecation.ts +1 -1
  41. package/src/findings/completion.ts +1 -4
  42. package/src/findings/interfaces.ts +1 -9
  43. package/src/findings/unused-declarations.ts +8 -15
  44. package/src/html-entries.ts +0 -3
  45. package/src/injection-container.ts +31 -26
  46. package/src/intra-function-parts.ts +96 -24
  47. package/src/inventory.ts +27 -5
  48. package/src/kinds.ts +2 -2
  49. package/src/matrix.ts +1 -9
  50. package/src/module-declarations.ts +0 -3
  51. package/src/ref.ts +3 -2
  52. package/src/references.ts +55 -21
  53. package/src/report.ts +1 -1
  54. package/src/resolve.ts +56 -6
  55. package/src/schema.ts +10 -14
  56. package/src/signatures.ts +6 -1
  57. package/src/suppress-file.ts +48 -9
  58. package/src/suppress-inline.ts +57 -15
  59. package/src/suppress.ts +3 -2
  60. package/src/type-errors.ts +2 -1
  61. package/src/verbs/analyze.ts +7 -2
  62. package/src/version.ts +1 -1
  63. package/src/workspace-resolution.ts +5 -8
  64. package/src/workspace.ts +2 -2
@@ -6,7 +6,7 @@ import {
6
6
  type RunAnalysis,
7
7
  type RunProject,
8
8
  } from "../analysis.ts";
9
- import { ConfigError, type Format } from "../config.ts";
9
+ import { ConfigError, kindOf, type Format } from "../config.ts";
10
10
  import { CONFORMANCE, DECLARED_GAPS } from "../conformance.ts";
11
11
  import { moduleIdentity } from "../consumers.ts";
12
12
  import { analyzerProvenance, verdictOf } from "../findings-pass.ts";
@@ -16,6 +16,7 @@ import type { NotBuilt } from "../discover.ts";
16
16
  import { partialNotes } from "../partial.ts";
17
17
  import {
18
18
  buildReport,
19
+ LANGUAGE,
19
20
  capFindings,
20
21
  sortFindings,
21
22
  type Report,
@@ -265,7 +266,11 @@ export const analyzeVerb: Verb = ({ err, host, inputs, scope, openClient, option
265
266
  version,
266
267
  conformance: CONFORMANCE,
267
268
  declaredGaps: DECLARED_GAPS,
268
- target: { kind, root, identity: moduleIdentity(host, scoped.target) },
269
+ target: {
270
+ kind: kindOf(kind, LANGUAGE),
271
+ root,
272
+ identity: moduleIdentity(host, scoped.target),
273
+ },
269
274
  configurations: configurationsOf(run.projects, targetRoot),
270
275
  notBuilt: notBuiltOf(run.notBuilt, targetRoot),
271
276
  loaded: run.consumers.map((consumer) => ({
package/src/version.ts CHANGED
@@ -4,4 +4,4 @@
4
4
  * independently of the analyzer's own version, which is the one the host answers
5
5
  * from the package the analyzer was installed from.
6
6
  */
7
- export const CONTRACT_VERSION = "7.1.0";
7
+ export const CONTRACT_VERSION = "7.2.0";
@@ -45,7 +45,6 @@ const DEPENDENCY_MEMBERS = [
45
45
  ] as const;
46
46
 
47
47
  const SOURCE = /(?<!\.d)\.(?:[mc]?ts|tsx)$/u;
48
- const OUTPUT = /(?:\.d\.[mc]?ts|\.[mc]?js|\.jsx)$/u;
49
48
 
50
49
  function isRecord(value: unknown): value is Record<string, unknown> {
51
50
  return typeof value === "object" && value !== null && !Array.isArray(value);
@@ -70,7 +69,7 @@ export function packageNameOf(specifier: string): string | undefined {
70
69
  }
71
70
 
72
71
  function inside(dir: string, path: string): boolean {
73
- return path === dir || relativePath(dir, path) !== undefined;
72
+ return relativePath(dir, path) !== undefined;
74
73
  }
75
74
 
76
75
  /** The `exports` entry one subpath selects, with what a pattern's `*` matched. */
@@ -274,12 +273,10 @@ export function workspaceResolver(host: Host, workspace: Workspace): WorkspaceRe
274
273
  return found;
275
274
  }
276
275
  }
277
- if (OUTPUT.test(path)) {
278
- const beside = emittedFrom(path, { sourceDirs: [] });
279
- const found = beside.find((candidate) => host.kindOf(candidate) === "file");
280
- if (found !== undefined) {
281
- return found;
282
- }
276
+ const beside = emittedFrom(path, { sourceDirs: [] });
277
+ const found = beside.find((candidate) => host.kindOf(candidate) === "file");
278
+ if (found !== undefined) {
279
+ return found;
283
280
  }
284
281
  return compiled(member, path) && host.kindOf(path) === "file" ? path : undefined;
285
282
  };
package/src/workspace.ts CHANGED
@@ -266,7 +266,7 @@ function memberDirectories(
266
266
  }
267
267
  return [...included].filter((dir) => {
268
268
  const below = relativePath(root, dir);
269
- const segments = below === undefined || below === "." || below === "" ? [] : below.split("/");
269
+ const segments = below === undefined ? [] : below.split("/");
270
270
  return dir === root || !excluded.some((pattern) => pathMatches(pattern, segments));
271
271
  });
272
272
  }
@@ -274,7 +274,7 @@ function memberDirectories(
274
274
  /** Whether a workspace's patterns name one directory below its root, read without listing any. */
275
275
  function namesDirectory(root: string, patterns: readonly string[], dir: string): boolean {
276
276
  const below = relativePath(root, dir);
277
- if (below === undefined || below === "" || below.startsWith("..")) {
277
+ if (below === undefined || below.startsWith("..")) {
278
278
  return false;
279
279
  }
280
280
  const path = below.split("/");