@rsdk/yarn.constraints 6.0.0-next.4 → 6.0.0-next.41

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 (126) hide show
  1. package/DEPENDENCY_MODEL.md +460 -0
  2. package/README.MD +85 -21
  3. package/__tests__/compatibility.test.ts +321 -0
  4. package/__tests__/config-validation.test.ts +42 -0
  5. package/__tests__/engine.test.ts +1107 -0
  6. package/__tests__/fixtures/imports/bin.js +4 -0
  7. package/__tests__/fixtures/imports/export-entry.mjs +1 -0
  8. package/__tests__/fixtures/imports/lib/lib-entry.js +3 -0
  9. package/__tests__/fixtures/imports/root-entry.js +4 -0
  10. package/__tests__/fixtures/imports/rules/transitive.js +3 -0
  11. package/__tests__/fixtures/imports/src/common.cjs +3 -0
  12. package/__tests__/fixtures/imports/src/common.cts +3 -0
  13. package/__tests__/fixtures/imports/src/component.tsx +4 -0
  14. package/__tests__/fixtures/imports/src/index.ts +13 -0
  15. package/__tests__/fixtures/imports/src/module.mjs +3 -0
  16. package/__tests__/fixtures/imports/src/module.mts +3 -0
  17. package/__tests__/fixtures/imports/src/plain.js +3 -0
  18. package/__tests__/fixtures/imports/src/test-only-usage.ts +1 -0
  19. package/__tests__/fixtures/imports/test/outside.ts +3 -0
  20. package/__tests__/imports.test.ts +218 -0
  21. package/__tests__/manifest-writer.test.ts +157 -0
  22. package/dist/ansi.d.ts +9 -0
  23. package/dist/ansi.js +24 -0
  24. package/dist/ansi.js.map +1 -0
  25. package/dist/bin/depdoc.d.ts +2 -0
  26. package/dist/bin/depdoc.js +157 -0
  27. package/dist/bin/depdoc.js.map +1 -0
  28. package/dist/collectors/config.d.ts +2 -0
  29. package/dist/collectors/config.js +28 -0
  30. package/dist/collectors/config.js.map +1 -0
  31. package/dist/collectors/external-metadata.d.ts +5 -0
  32. package/dist/collectors/external-metadata.js +110 -0
  33. package/dist/collectors/external-metadata.js.map +1 -0
  34. package/dist/collectors/package-extensions.d.ts +3 -0
  35. package/dist/collectors/package-extensions.js +43 -0
  36. package/dist/collectors/package-extensions.js.map +1 -0
  37. package/dist/collectors/type-providers.d.ts +3 -0
  38. package/dist/collectors/type-providers.js +46 -0
  39. package/dist/collectors/type-providers.js.map +1 -0
  40. package/dist/collectors/workspaces.d.ts +2 -0
  41. package/dist/collectors/workspaces.js +90 -0
  42. package/dist/collectors/workspaces.js.map +1 -0
  43. package/dist/dependency-model.d.ts +11 -0
  44. package/dist/dependency-model.js +18 -0
  45. package/dist/dependency-model.js.map +1 -0
  46. package/dist/index.d.ts +9 -5
  47. package/dist/index.js +13 -33
  48. package/dist/index.js.map +1 -1
  49. package/dist/lib/imports.d.ts +11 -0
  50. package/dist/lib/imports.js +342 -0
  51. package/dist/lib/imports.js.map +1 -0
  52. package/dist/lib/package-json.d.ts +21 -0
  53. package/dist/lib/package-json.js +32 -0
  54. package/dist/lib/package-json.js.map +1 -0
  55. package/dist/model/config-validation.d.ts +6 -0
  56. package/dist/model/config-validation.js +31 -0
  57. package/dist/model/config-validation.js.map +1 -0
  58. package/dist/model/diagnostics.d.ts +4 -0
  59. package/dist/model/diagnostics.js +295 -0
  60. package/dist/model/diagnostics.js.map +1 -0
  61. package/dist/model/engine.d.ts +5 -0
  62. package/dist/model/engine.js +52 -0
  63. package/dist/model/engine.js.map +1 -0
  64. package/dist/model/expected.d.ts +20 -0
  65. package/dist/model/expected.js +89 -0
  66. package/dist/model/expected.js.map +1 -0
  67. package/dist/model/peer-propagation.d.ts +2 -0
  68. package/dist/model/peer-propagation.js +124 -0
  69. package/dist/model/peer-propagation.js.map +1 -0
  70. package/dist/model/placement.d.ts +9 -0
  71. package/dist/model/placement.js +210 -0
  72. package/dist/model/placement.js.map +1 -0
  73. package/dist/model/rules.d.ts +15 -0
  74. package/dist/model/rules.js +52 -0
  75. package/dist/model/rules.js.map +1 -0
  76. package/dist/model/types.d.ts +118 -0
  77. package/dist/model/types.js +9 -0
  78. package/dist/model/types.js.map +1 -0
  79. package/dist/model/versions.d.ts +3 -0
  80. package/dist/model/versions.js +77 -0
  81. package/dist/model/versions.js.map +1 -0
  82. package/dist/reporting.d.ts +3 -0
  83. package/dist/reporting.js +80 -0
  84. package/dist/reporting.js.map +1 -0
  85. package/dist/runner.d.ts +2 -0
  86. package/dist/runner.js +70 -0
  87. package/dist/runner.js.map +1 -0
  88. package/dist/writer/manifest-writer.d.ts +2 -0
  89. package/dist/writer/manifest-writer.js +72 -0
  90. package/dist/writer/manifest-writer.js.map +1 -0
  91. package/eslint.config.cjs +3 -0
  92. package/jest.config.js +1 -0
  93. package/package.json +7 -3
  94. package/src/ansi.ts +23 -0
  95. package/src/bin/depdoc.ts +213 -0
  96. package/src/collectors/config.ts +33 -0
  97. package/src/collectors/external-metadata.ts +148 -0
  98. package/src/collectors/package-extensions.ts +52 -0
  99. package/src/collectors/type-providers.ts +51 -0
  100. package/src/collectors/workspaces.ts +107 -0
  101. package/src/dependency-model.ts +26 -0
  102. package/src/index.ts +28 -45
  103. package/src/lib/imports.ts +435 -0
  104. package/src/lib/package-json.ts +46 -0
  105. package/src/model/config-validation.ts +49 -0
  106. package/src/model/diagnostics.ts +358 -0
  107. package/src/model/engine.ts +120 -0
  108. package/src/model/expected.ts +141 -0
  109. package/src/model/peer-propagation.ts +199 -0
  110. package/src/model/placement.ts +378 -0
  111. package/src/model/rules.ts +85 -0
  112. package/src/model/types.ts +165 -0
  113. package/src/model/versions.ts +114 -0
  114. package/src/reporting.ts +117 -0
  115. package/src/runner.ts +102 -0
  116. package/src/writer/manifest-writer.ts +111 -0
  117. package/tsconfig.build.json +1 -0
  118. package/tsconfig.json +6 -1
  119. package/dist/constraint-schema.d.ts +0 -1
  120. package/dist/constraint-schema.js +0 -17
  121. package/dist/constraint-schema.js.map +0 -1
  122. package/dist/dependency-checker.d.ts +0 -8
  123. package/dist/dependency-checker.js +0 -40
  124. package/dist/dependency-checker.js.map +0 -1
  125. package/src/constraint-schema.ts +0 -20
  126. package/src/dependency-checker.ts +0 -41
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ const bin = require('bin-entry-dep');
3
+
4
+ bin();
@@ -0,0 +1 @@
1
+ export { exported } from 'exports-entry-dep';
@@ -0,0 +1,3 @@
1
+ import libEntry from 'lib-entry-dep';
2
+
3
+ export default libEntry;
@@ -0,0 +1,4 @@
1
+ import rootEntry from 'root-entry-dep';
2
+ import './rules/transitive';
3
+
4
+ export default rootEntry;
@@ -0,0 +1,3 @@
1
+ const transitive = require('transitive-entry-dep');
2
+
3
+ module.exports = transitive;
@@ -0,0 +1,3 @@
1
+ const cjs = require('cjs-dep');
2
+
3
+ module.exports = cjs;
@@ -0,0 +1,3 @@
1
+ const cjs = require('cts-dep');
2
+
3
+ export = cjs;
@@ -0,0 +1,4 @@
1
+ import { jsxRuntime } from 'tsx-runtime-dep';
2
+ import { type ComponentProps } from 'tsx-type-dep';
3
+
4
+ export const component = jsxRuntime<ComponentProps>;
@@ -0,0 +1,13 @@
1
+ import { foo } from 'lodash';
2
+ import type { Bar } from 'some-types';
3
+ import { value, type MixedType } from 'mixed-dep';
4
+ import { type OnlyType } from 'only-type-dep';
5
+ import { baz } from '@scope/pkg/subpath';
6
+ import { qux } from './local';
7
+ import { built } from 'node:fs';
8
+ export { reexported } from 'reexport-dep';
9
+ export type { ReexportedType } from 'reexport-type-dep';
10
+ const ignoredComment = "import ignored from 'string-dep'";
11
+ // import ignored from 'comment-dep';
12
+ const x = require('require-dep');
13
+ const y = await import('dynamic-dep');
@@ -0,0 +1,3 @@
1
+ import mjs from 'mjs-dep';
2
+
3
+ export default mjs;
@@ -0,0 +1,3 @@
1
+ import { esm } from 'mts-dep';
2
+
3
+ export const value = esm;
@@ -0,0 +1,3 @@
1
+ const js = require('js-dep');
2
+
3
+ module.exports = js;
@@ -0,0 +1 @@
1
+ import { runtime } from 'test-only-dep';
@@ -0,0 +1,3 @@
1
+ import harness from 'external-test-dep';
2
+
3
+ export default harness;
@@ -0,0 +1,218 @@
1
+ import path from 'node:path';
2
+
3
+ import {
4
+ collectDtsImports,
5
+ collectSourceImports,
6
+ getPackageName,
7
+ } from '../src/lib/imports';
8
+
9
+ const FIXTURES = path.join(__dirname, 'fixtures/imports');
10
+
11
+ // ---------------------------------------------------------------------------
12
+ // getPackageName
13
+ // ---------------------------------------------------------------------------
14
+
15
+ describe('getPackageName', () => {
16
+ it('returns null for relative specifiers', () => {
17
+ expect(getPackageName('./local')).toBeNull();
18
+ expect(getPackageName('../parent')).toBeNull();
19
+ expect(getPackageName('/absolute')).toBeNull();
20
+ });
21
+
22
+ it('returns null for node: builtins', () => {
23
+ expect(getPackageName('node:fs')).toBeNull();
24
+ expect(getPackageName('node:path')).toBeNull();
25
+ expect(getPackageName('fs')).toBeNull();
26
+ expect(getPackageName('path')).toBeNull();
27
+ });
28
+
29
+ it('returns package name for bare specifiers', () => {
30
+ expect(getPackageName('lodash')).toBe('lodash');
31
+ expect(getPackageName('express')).toBe('express');
32
+ });
33
+
34
+ it('strips subpath from unscoped packages', () => {
35
+ expect(getPackageName('lodash/fp')).toBe('lodash');
36
+ expect(getPackageName('some-pkg/nested/deep')).toBe('some-pkg');
37
+ });
38
+
39
+ it('returns scoped package name', () => {
40
+ expect(getPackageName('@scope/pkg')).toBe('@scope/pkg');
41
+ });
42
+
43
+ it('strips subpath from scoped packages', () => {
44
+ expect(getPackageName('@scope/pkg/subpath')).toBe('@scope/pkg');
45
+ expect(getPackageName('@scope/pkg/deep/nested')).toBe('@scope/pkg');
46
+ });
47
+
48
+ it('returns null for malformed scoped specifier without package name', () => {
49
+ expect(getPackageName('@scope')).toBeNull();
50
+ });
51
+ });
52
+
53
+ // ---------------------------------------------------------------------------
54
+ // collectSourceImports
55
+ // ---------------------------------------------------------------------------
56
+
57
+ describe('collectSourceImports', () => {
58
+ const srcDir = path.join(FIXTURES, 'src');
59
+ let entries: ReturnType<typeof collectSourceImports>;
60
+
61
+ beforeAll(() => {
62
+ entries = collectSourceImports(srcDir);
63
+ });
64
+
65
+ function names(): Set<string> {
66
+ return new Set(entries.map((e) => e.packageName));
67
+ }
68
+
69
+ it('collects runtime imports', () => {
70
+ const pkgs = names();
71
+ expect(pkgs.has('lodash')).toBe(true);
72
+ expect(pkgs.has('@scope/pkg')).toBe(true);
73
+ expect(pkgs.has('mixed-dep')).toBe(true);
74
+ expect(pkgs.has('require-dep')).toBe(true);
75
+ expect(pkgs.has('dynamic-dep')).toBe(true);
76
+ expect(pkgs.has('reexport-dep')).toBe(true);
77
+ });
78
+
79
+ it('marks import type entries as isTypeOnly', () => {
80
+ const typeOnlyEntry = entries.find((e) => e.packageName === 'some-types');
81
+ expect(typeOnlyEntry).toBeDefined();
82
+ expect(typeOnlyEntry!.isTypeOnly).toBe(true);
83
+ });
84
+
85
+ it('marks export type entries as isTypeOnly', () => {
86
+ const entry = entries.find((e) => e.packageName === 'reexport-type-dep');
87
+ expect(entry).toBeDefined();
88
+ expect(entry!.isTypeOnly).toBe(true);
89
+ });
90
+
91
+ it('marks import specifiers with only type bindings as isTypeOnly', () => {
92
+ const entry = entries.find((e) => e.packageName === 'only-type-dep');
93
+ expect(entry).toBeDefined();
94
+ expect(entry!.isTypeOnly).toBe(true);
95
+ });
96
+
97
+ it('treats mixed value and type specifiers as runtime imports', () => {
98
+ const entry = entries.find((e) => e.packageName === 'mixed-dep');
99
+ expect(entry).toBeDefined();
100
+ expect(entry!.isTypeOnly).toBe(false);
101
+ });
102
+
103
+ it('marks runtime imports as not isTypeOnly', () => {
104
+ const entry = entries.find((e) => e.packageName === 'lodash');
105
+ expect(entry).toBeDefined();
106
+ expect(entry!.isTypeOnly).toBe(false);
107
+ });
108
+
109
+ it('does not include relative imports', () => {
110
+ expect(names().has('./local')).toBe(false);
111
+ });
112
+
113
+ it('does not include node: builtins', () => {
114
+ expect(names().has('node:fs')).toBe(false);
115
+ expect(names().has('fs')).toBe(false);
116
+ });
117
+
118
+ it('ignores import-like text inside comments and strings', () => {
119
+ expect(names().has('comment-dep')).toBe(false);
120
+ expect(names().has('string-dep')).toBe(false);
121
+ });
122
+
123
+ it('includes the file path in each entry', () => {
124
+ const entry = entries.find((e) => e.packageName === 'lodash');
125
+ expect(entry!.file).toContain('index.ts');
126
+ });
127
+
128
+ it('collects imports from test files as well', () => {
129
+ expect(names().has('test-only-dep')).toBe(true);
130
+ });
131
+
132
+ it('collects supported source extensions', () => {
133
+ const pkgs = names();
134
+ expect(pkgs.has('tsx-runtime-dep')).toBe(true);
135
+ expect(pkgs.has('tsx-type-dep')).toBe(true);
136
+ expect(pkgs.has('mts-dep')).toBe(true);
137
+ expect(pkgs.has('cts-dep')).toBe(true);
138
+ expect(pkgs.has('js-dep')).toBe(true);
139
+ expect(pkgs.has('mjs-dep')).toBe(true);
140
+ expect(pkgs.has('cjs-dep')).toBe(true);
141
+ });
142
+
143
+ it('collects package main, bin, and exports entrypoints inside the workspace', () => {
144
+ const workspaceEntries = collectSourceImports(FIXTURES, {
145
+ name: '@test/imports',
146
+ main: 'root-entry.js',
147
+ bin: {
148
+ imports: 'bin.js',
149
+ },
150
+ exports: {
151
+ '.': './export-entry.mjs',
152
+ './lib': './lib/lib-entry.js',
153
+ './dist': './dist/index.js',
154
+ },
155
+ });
156
+ const pkgs = new Set(workspaceEntries.map((e) => e.packageName));
157
+
158
+ expect(pkgs.has('root-entry-dep')).toBe(true);
159
+ expect(pkgs.has('bin-entry-dep')).toBe(true);
160
+ expect(pkgs.has('exports-entry-dep')).toBe(true);
161
+ expect(pkgs.has('lib-entry-dep')).toBe(true);
162
+ expect(pkgs.has('transitive-entry-dep')).toBe(true);
163
+ });
164
+
165
+ it('collects workspace-level test directories as dev-only source surface', () => {
166
+ const workspaceEntries = collectSourceImports(FIXTURES, {
167
+ name: '@test/imports',
168
+ });
169
+ const pkgs = new Set(workspaceEntries.map((e) => e.packageName));
170
+
171
+ expect(pkgs.has('external-test-dep')).toBe(true);
172
+ });
173
+
174
+ it('does not collect .d.ts files (only .ts source files)', () => {
175
+ // dist/ is a sibling of src/, not inside it — so even if we somehow
176
+ // end up scanning it, .d.ts files are explicitly excluded.
177
+ const dtsEntry = entries.find((e) => e.file.endsWith('.d.ts'));
178
+ expect(dtsEntry).toBeUndefined();
179
+ });
180
+ });
181
+
182
+ // ---------------------------------------------------------------------------
183
+ // collectDtsImports
184
+ // ---------------------------------------------------------------------------
185
+
186
+ describe('collectDtsImports', () => {
187
+ const distDir = path.join(FIXTURES, 'dist');
188
+ let result: Set<string>;
189
+
190
+ beforeAll(() => {
191
+ result = collectDtsImports(distDir);
192
+ });
193
+
194
+ it('collects packages from import type in dts', () => {
195
+ expect(result.has('some-types')).toBe(true);
196
+ });
197
+
198
+ it('collects packages from inline import() expressions in dts', () => {
199
+ expect(result.has('public-type-dep')).toBe(true);
200
+ });
201
+
202
+ it('collects packages from export declarations in dts', () => {
203
+ expect(result.has('dts-export-type-dep')).toBe(true);
204
+ expect(result.has('dts-export-runtime-dep')).toBe(true);
205
+ });
206
+
207
+ it('collects packages from triple-slash types in dts', () => {
208
+ expect(result.has('ambient-types')).toBe(true);
209
+ });
210
+
211
+ it('collects packages from ambient module declarations in dts', () => {
212
+ expect(result.has('ambient-module-dep')).toBe(true);
213
+ });
214
+
215
+ it('returns a set (no duplicates)', () => {
216
+ expect(result).toBeInstanceOf(Set);
217
+ });
218
+ });
@@ -0,0 +1,157 @@
1
+ import {
2
+ mkdirSync,
3
+ mkdtempSync,
4
+ readFileSync,
5
+ rmSync,
6
+ writeFileSync,
7
+ } from 'node:fs';
8
+ import { tmpdir } from 'node:os';
9
+ import { resolve } from 'node:path';
10
+
11
+ import { writeFixes } from '../src/writer/manifest-writer';
12
+ import type {
13
+ ExpectedWorkspace,
14
+ WorkspaceFacts,
15
+ } from '../src/dependency-model';
16
+
17
+ function makeWorkspace(
18
+ location: string,
19
+ pkg: WorkspaceFacts['pkg'],
20
+ ): WorkspaceFacts {
21
+ return {
22
+ name: pkg.name,
23
+ location,
24
+ pkg,
25
+ role: pkg.role,
26
+ isRoot: false,
27
+ sourceUsage: new Map(),
28
+ dtsImports: new Set(),
29
+ hasSrc: false,
30
+ hasDist: false,
31
+ };
32
+ }
33
+
34
+ function makeExpected(
35
+ location: string,
36
+ pkg: WorkspaceFacts['pkg'],
37
+ sections: ExpectedWorkspace['sections'],
38
+ ): ExpectedWorkspace {
39
+ return {
40
+ workspace: makeWorkspace(location, pkg),
41
+ sections,
42
+ reasons: new Map(),
43
+ };
44
+ }
45
+
46
+ function makeSections(
47
+ sections: Partial<
48
+ Record<keyof ExpectedWorkspace['sections'], [string, string][]>
49
+ >,
50
+ ): ExpectedWorkspace['sections'] {
51
+ return {
52
+ dependencies: new Map(sections.dependencies ?? []),
53
+ peerDependencies: new Map(sections.peerDependencies ?? []),
54
+ devDependencies: new Map(sections.devDependencies ?? []),
55
+ };
56
+ }
57
+
58
+ function createPackageJson(
59
+ rootDir: string,
60
+ location: string,
61
+ pkg: WorkspaceFacts['pkg'],
62
+ ): void {
63
+ const dir = resolve(rootDir, location);
64
+ mkdirSync(dir, { recursive: true });
65
+ writeFileSync(
66
+ resolve(dir, 'package.json'),
67
+ JSON.stringify(pkg, null, 2) + '\n',
68
+ );
69
+ }
70
+
71
+ function readPackageJson(
72
+ rootDir: string,
73
+ location: string,
74
+ ): WorkspaceFacts['pkg'] {
75
+ return JSON.parse(
76
+ readFileSync(resolve(rootDir, location, 'package.json'), 'utf8'),
77
+ ) as WorkspaceFacts['pkg'];
78
+ }
79
+
80
+ describe('manifest writer', () => {
81
+ let rootDir: string;
82
+
83
+ beforeEach(() => {
84
+ rootDir = mkdtempSync(resolve(tmpdir(), 'rsdk-manifest-writer-'));
85
+ });
86
+
87
+ afterEach(() => {
88
+ rmSync(rootDir, { recursive: true, force: true });
89
+ });
90
+
91
+ it('removes peerDependenciesMeta when no expected peers remain', () => {
92
+ const location = 'packages/lib';
93
+ const pkg: WorkspaceFacts['pkg'] = {
94
+ name: '@test/lib',
95
+ role: 'library',
96
+ dependencies: { 'some-lib': '1.0.0' },
97
+ peerDependenciesMeta: { 'some-lib': { optional: true } },
98
+ };
99
+ createPackageJson(rootDir, location, pkg);
100
+
101
+ writeFixes(
102
+ rootDir,
103
+ new Map([
104
+ [
105
+ location,
106
+ makeExpected(
107
+ location,
108
+ pkg,
109
+ makeSections({
110
+ dependencies: [['some-lib', '1.0.0']],
111
+ }),
112
+ ),
113
+ ],
114
+ ]),
115
+ );
116
+
117
+ expect(
118
+ readPackageJson(rootDir, location).peerDependenciesMeta,
119
+ ).toBeUndefined();
120
+ });
121
+
122
+ it('keeps peerDependenciesMeta only for expected peers', () => {
123
+ const location = 'packages/lib';
124
+ const pkg: WorkspaceFacts['pkg'] = {
125
+ name: '@test/lib',
126
+ role: 'library',
127
+ peerDependencies: { react: '^18.0.0' },
128
+ peerDependenciesMeta: {
129
+ react: { optional: true },
130
+ 'old-peer': { optional: true },
131
+ },
132
+ devDependencies: { react: '^18.0.0' },
133
+ };
134
+ createPackageJson(rootDir, location, pkg);
135
+
136
+ writeFixes(
137
+ rootDir,
138
+ new Map([
139
+ [
140
+ location,
141
+ makeExpected(
142
+ location,
143
+ pkg,
144
+ makeSections({
145
+ peerDependencies: [['react', '^18.0.0']],
146
+ devDependencies: [['react', '^18.0.0']],
147
+ }),
148
+ ),
149
+ ],
150
+ ]),
151
+ );
152
+
153
+ expect(readPackageJson(rootDir, location).peerDependenciesMeta).toEqual({
154
+ react: { optional: true },
155
+ });
156
+ });
157
+ });
package/dist/ansi.d.ts ADDED
@@ -0,0 +1,9 @@
1
+ export declare const ansi: {
2
+ bold: (value: string) => string;
3
+ dim: (value: string) => string;
4
+ red: (value: string) => string;
5
+ green: (value: string) => string;
6
+ yellow: (value: string) => string;
7
+ cyan: (value: string) => string;
8
+ magenta: (value: string) => string;
9
+ };
package/dist/ansi.js ADDED
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ansi = void 0;
4
+ /**
5
+ * Shared ANSI styling helpers for CLI output.
6
+ *
7
+ * Keep terminal escape codes centralized here so command/reporting modules can
8
+ * add restrained color without duplicating formatting details or hard-coding
9
+ * ANSI sequences throughout the codebase.
10
+ */
11
+ const enabled = process.env.NO_COLOR === undefined && process.env.FORCE_COLOR !== '0';
12
+ function wrap(open, close, value) {
13
+ return enabled ? `${open}${value}${close}` : value;
14
+ }
15
+ exports.ansi = {
16
+ bold: (value) => wrap('\u001B[1m', '\u001B[22m', value),
17
+ dim: (value) => wrap('\u001B[2m', '\u001B[22m', value),
18
+ red: (value) => wrap('\u001B[31m', '\u001B[39m', value),
19
+ green: (value) => wrap('\u001B[32m', '\u001B[39m', value),
20
+ yellow: (value) => wrap('\u001B[33m', '\u001B[39m', value),
21
+ cyan: (value) => wrap('\u001B[36m', '\u001B[39m', value),
22
+ magenta: (value) => wrap('\u001B[35m', '\u001B[39m', value),
23
+ };
24
+ //# sourceMappingURL=ansi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ansi.js","sourceRoot":"","sources":["../src/ansi.ts"],"names":[],"mappings":";;;AAAA;;;;;;GAMG;AACH,MAAM,OAAO,GACX,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,KAAK,GAAG,CAAC;AAExE,SAAS,IAAI,CAAC,IAAY,EAAE,KAAa,EAAE,KAAa;IACtD,OAAO,OAAO,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,KAAK,GAAG,KAAK,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;AACrD,CAAC;AAEY,QAAA,IAAI,GAAG;IAClB,IAAI,EAAE,CAAC,KAAa,EAAU,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,YAAY,EAAE,KAAK,CAAC;IACvE,GAAG,EAAE,CAAC,KAAa,EAAU,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,YAAY,EAAE,KAAK,CAAC;IACtE,GAAG,EAAE,CAAC,KAAa,EAAU,EAAE,CAAC,IAAI,CAAC,YAAY,EAAE,YAAY,EAAE,KAAK,CAAC;IACvE,KAAK,EAAE,CAAC,KAAa,EAAU,EAAE,CAAC,IAAI,CAAC,YAAY,EAAE,YAAY,EAAE,KAAK,CAAC;IACzE,MAAM,EAAE,CAAC,KAAa,EAAU,EAAE,CAAC,IAAI,CAAC,YAAY,EAAE,YAAY,EAAE,KAAK,CAAC;IAC1E,IAAI,EAAE,CAAC,KAAa,EAAU,EAAE,CAAC,IAAI,CAAC,YAAY,EAAE,YAAY,EAAE,KAAK,CAAC;IACxE,OAAO,EAAE,CAAC,KAAa,EAAU,EAAE,CAAC,IAAI,CAAC,YAAY,EAAE,YAAY,EAAE,KAAK,CAAC;CAC5E,CAAC"}
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
@@ -0,0 +1,157 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ var __importDefault = (this && this.__importDefault) || function (mod) {
4
+ return (mod && mod.__esModule) ? mod : { "default": mod };
5
+ };
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ /**
8
+ * `depdoc` command-line entrypoint.
9
+ *
10
+ * The CLI only parses commands and orchestrates high-level steps. Dependency
11
+ * placement decisions live in the model engine, while filesystem collection and
12
+ * manifest writes go through the runner.
13
+ */
14
+ const node_child_process_1 = require("node:child_process");
15
+ const node_fs_1 = require("node:fs");
16
+ const node_path_1 = __importDefault(require("node:path"));
17
+ const ansi_1 = require("../ansi");
18
+ const dependency_model_1 = require("../dependency-model");
19
+ function printUsage() {
20
+ console.error(`${ansi_1.ansi.bold('Usage:')}
21
+ ${ansi_1.ansi.cyan('depdoc')} check [--with-dts]
22
+ ${ansi_1.ansi.cyan('depdoc')} fix [--with-dts]
23
+ ${ansi_1.ansi.cyan('depdoc')} explain <workspace> <dependency>
24
+ ${ansi_1.ansi.cyan('depdoc')} doctor`);
25
+ }
26
+ function spawnStep(label, cmd, cwd) {
27
+ console.error(`\n${ansi_1.ansi.cyan('──')} ${ansi_1.ansi.bold(label)}`);
28
+ console.error(`${ansi_1.ansi.dim('$')} ${ansi_1.ansi.cyan(cmd)}`);
29
+ (0, node_child_process_1.execSync)(cmd, { cwd, stdio: 'inherit' });
30
+ }
31
+ function checkPeerRequirements(cwd) {
32
+ const cmd = 'yarn explain peer-requirements';
33
+ console.error(`\n${ansi_1.ansi.cyan('──')} ${ansi_1.ansi.bold('yarn peer requirements')}`);
34
+ console.error(`${ansi_1.ansi.dim('$')} ${ansi_1.ansi.cyan(cmd)}`);
35
+ let output;
36
+ try {
37
+ output = (0, node_child_process_1.execSync)(cmd, {
38
+ cwd,
39
+ encoding: 'utf8',
40
+ maxBuffer: 32 * 1024 * 1024,
41
+ });
42
+ }
43
+ catch (error) {
44
+ const childError = error;
45
+ if (childError.stdout)
46
+ process.stderr.write(childError.stdout);
47
+ if (childError.stderr)
48
+ process.stderr.write(childError.stderr);
49
+ return false;
50
+ }
51
+ const failedRequirements = output
52
+ .split(/\r?\n/)
53
+ .filter((line) => line.includes('✘'));
54
+ if (failedRequirements.length === 0) {
55
+ console.error(ansi_1.ansi.green('✓ peer requirements are satisfied'));
56
+ return true;
57
+ }
58
+ console.error(failedRequirements.join('\n'));
59
+ console.error(ansi_1.ansi.red(`${failedRequirements.length} peer requirement(s) failed`));
60
+ console.error(ansi_1.ansi.dim('Run `yarn explain peer-requirements <hash>` for details.'));
61
+ return false;
62
+ }
63
+ function snapshotPackageJsons(result) {
64
+ return [...result.expected.keys()]
65
+ .sort()
66
+ .map((location) => (0, node_fs_1.readFileSync)(node_path_1.default.join(result.rootDir, location, 'package.json'), 'utf8'))
67
+ .join('\0');
68
+ }
69
+ function main() {
70
+ const rawArgs = process.argv.slice(2);
71
+ if (rawArgs.includes('--help') || rawArgs.includes('-h')) {
72
+ printUsage();
73
+ process.exit(0);
74
+ }
75
+ const positional = rawArgs.filter((a) => !a.startsWith('--'));
76
+ const [command, firstArg, secondArg] = positional;
77
+ const withDts = rawArgs.includes('--with-dts');
78
+ if (!command) {
79
+ printUsage();
80
+ process.exit(1);
81
+ }
82
+ if (command === 'check') {
83
+ const result = (0, dependency_model_1.runDependencyModel)({ withDts });
84
+ console.error((0, dependency_model_1.formatDependencyModelResult)(result));
85
+ process.exit(result.violations.length === 0 ? 0 : 1);
86
+ }
87
+ if (command === 'fix') {
88
+ const before = (0, dependency_model_1.runDependencyModel)({ fix: true, withDts });
89
+ const after = (0, dependency_model_1.runDependencyModel)({ withDts });
90
+ const fixed = Math.max(0, before.violations.length - after.violations.length);
91
+ console.error((0, dependency_model_1.formatDependencyModelResult)(after));
92
+ if (fixed > 0) {
93
+ console.error(ansi_1.ansi.green(`fixed ${fixed} dependency model violation(s)`));
94
+ }
95
+ process.exit(after.violations.length === 0 ? 0 : 1);
96
+ }
97
+ if (command === 'explain') {
98
+ if (!firstArg || !secondArg) {
99
+ printUsage();
100
+ process.exit(1);
101
+ }
102
+ const result = (0, dependency_model_1.runDependencyModel)();
103
+ console.log((0, dependency_model_1.explainDependency)(result, firstArg, secondArg));
104
+ process.exit(0);
105
+ }
106
+ if (command === 'doctor') {
107
+ runDoctor();
108
+ return;
109
+ }
110
+ printUsage();
111
+ process.exit(1);
112
+ }
113
+ function runDoctor() {
114
+ console.error(`\n${ansi_1.ansi.cyan('──')} ${ansi_1.ansi.bold('depdoc fix')}`);
115
+ const fixResult = (0, dependency_model_1.runDependencyModel)({ fix: true });
116
+ const afterFix = (0, dependency_model_1.runDependencyModel)();
117
+ const fixed = Math.max(0, fixResult.violations.length - afterFix.violations.length);
118
+ console.error((0, dependency_model_1.formatDependencyModelResult)(afterFix));
119
+ if (fixed > 0)
120
+ console.error(ansi_1.ansi.green(`fixed ${fixed} violation(s)`));
121
+ const { rootDir, config } = afterFix;
122
+ spawnStep('yarn install', 'yarn install', rootDir);
123
+ if (config.doctor?.buildCmd) {
124
+ spawnStep('build', config.doctor.buildCmd, rootDir);
125
+ }
126
+ else {
127
+ console.error(`\n${ansi_1.ansi.cyan('──')} ${ansi_1.ansi.yellow('build skipped')} ${ansi_1.ansi.dim('(doctor.buildCmd not configured in .constraints.yml)')}`);
128
+ }
129
+ const beforeDtsFixSnapshot = snapshotPackageJsons(afterFix);
130
+ console.error(`\n${ansi_1.ansi.cyan('──')} ${ansi_1.ansi.bold('depdoc fix --with-dts')}`);
131
+ const dtsFix = (0, dependency_model_1.runDependencyModel)({ fix: true, withDts: true });
132
+ const afterDtsFix = (0, dependency_model_1.runDependencyModel)({ withDts: true });
133
+ const afterDtsFixSnapshot = snapshotPackageJsons(afterDtsFix);
134
+ const dtsFixed = Math.max(0, dtsFix.violations.length - afterDtsFix.violations.length);
135
+ console.error((0, dependency_model_1.formatDependencyModelResult)(afterDtsFix));
136
+ if (dtsFixed > 0) {
137
+ console.error(ansi_1.ansi.green(`fixed ${dtsFixed} additional violation(s) from .d.ts surface`));
138
+ }
139
+ if (beforeDtsFixSnapshot !== afterDtsFixSnapshot) {
140
+ spawnStep('yarn install (post-dts-fix)', 'yarn install', rootDir);
141
+ }
142
+ if (!checkPeerRequirements(rootDir))
143
+ process.exit(1);
144
+ if (config.doctor?.lintCmd) {
145
+ spawnStep('lint', config.doctor.lintCmd, rootDir);
146
+ }
147
+ if (config.doctor?.typecheckCmd) {
148
+ spawnStep('typecheck', config.doctor.typecheckCmd, rootDir);
149
+ }
150
+ const finalViolations = afterDtsFix.violations.length;
151
+ console.error(finalViolations === 0
152
+ ? `\n${ansi_1.ansi.green('✓')} ${ansi_1.ansi.bold('doctor: all checks passed')}`
153
+ : `\n${ansi_1.ansi.red('✖')} ${ansi_1.ansi.bold(`doctor: ${finalViolations} violation(s) remain`)}`);
154
+ process.exit(finalViolations === 0 ? 0 : 1);
155
+ }
156
+ main();
157
+ //# sourceMappingURL=depdoc.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"depdoc.js","sourceRoot":"","sources":["../../src/bin/depdoc.ts"],"names":[],"mappings":";;;;;;AACA;;;;;;GAMG;AACH,2DAA8C;AAC9C,qCAAuC;AACvC,0DAA6B;AAE7B,kCAA+B;AAC/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AAC,KAAK,WAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,WAAI,CAAC,IAAI,CAAC,2BAA2B,CAAC,EAAE;QAClE,CAAC,CAAC,KAAK,WAAI,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,WAAI,CAAC,IAAI,CAAC,WAAW,eAAe,sBAAsB,CAAC,EAAE,CACxF,CAAC;IACF,OAAO,CAAC,IAAI,CAAC,eAAe,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9C,CAAC;AAED,IAAI,EAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { DependencyModelConfig } from '../model/types';
2
+ export declare function loadConfig(rootDir: string, constraintsPath?: string): DependencyModelConfig;