nx 23.2.0-beta.1 → 23.2.0-beta.3

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 (85) hide show
  1. package/dist/bin/nx.js +1 -0
  2. package/dist/src/analytics/analytics.d.ts +6 -0
  3. package/dist/src/analytics/analytics.js +16 -8
  4. package/dist/src/analytics/index.d.ts +1 -1
  5. package/dist/src/analytics/index.js +2 -1
  6. package/dist/src/command-line/graph/graph.d.ts +1 -0
  7. package/dist/src/command-line/graph/graph.js +15 -6
  8. package/dist/src/command-line/init/implementation/angular/integrated-workspace.js +2 -5
  9. package/dist/src/command-line/init/implementation/angular/legacy-angular-versions.js +3 -0
  10. package/dist/src/command-line/init/implementation/dot-nx/add-nx-scripts.js +4 -1
  11. package/dist/src/command-line/migrate/migrate.js +20 -1
  12. package/dist/src/command-line/nx-cloud/connect/connect-to-nx-cloud.js +1 -1
  13. package/dist/src/command-line/nx-cloud/connect/view-logs.js +2 -0
  14. package/dist/src/command-line/release/utils/remote-release-clients/github.js +1 -1
  15. package/dist/src/command-line/release/utils/remote-release-clients/gitlab.js +1 -1
  16. package/dist/src/command-line/show/show-target/inputs.js +50 -153
  17. package/dist/src/command-line/show/show-target/outputs.js +48 -173
  18. package/dist/src/command-line/show/show-target/utils.d.ts +28 -0
  19. package/dist/src/command-line/show/show-target/utils.js +83 -3
  20. package/dist/src/command-line/yargs-utils/shared-options.d.ts +1 -1
  21. package/dist/src/config/nx-json.d.ts +4 -2
  22. package/dist/src/core/graph/main.js +1 -1
  23. package/dist/src/daemon/server/handle-tasks-execution-hooks.d.ts +1 -1
  24. package/dist/src/daemon/server/server.js +7 -4
  25. package/dist/src/devkit-internals.d.ts +1 -0
  26. package/dist/src/devkit-internals.js +5 -2
  27. package/dist/src/hasher/check-task-files.d.ts +86 -0
  28. package/dist/src/hasher/check-task-files.js +378 -0
  29. package/dist/src/native/index.d.ts +27 -4
  30. package/dist/src/native/native-bindings.js +2 -0
  31. package/dist/src/native/nx.wasm32-wasi.debug.wasm +0 -0
  32. package/dist/src/native/nx.wasm32-wasi.wasm +0 -0
  33. package/dist/src/plugins/js/lock-file/utils/pnpm-normalizer.js +3 -0
  34. package/dist/src/plugins/js/project-graph/build-dependencies/target-project-locator.js +12 -4
  35. package/dist/src/project-graph/build-project-graph.js +7 -1
  36. package/dist/src/project-graph/plugins/loaded-nx-plugin.js +1 -0
  37. package/dist/src/project-graph/project-graph.js +3 -0
  38. package/dist/src/project-graph/utils/project-configuration/name-substitution-manager.d.ts +1 -0
  39. package/dist/src/project-graph/utils/project-configuration/name-substitution-manager.js +16 -2
  40. package/dist/src/project-graph/utils/project-configuration/project-nodes-manager.d.ts +5 -8
  41. package/dist/src/project-graph/utils/project-configuration/project-nodes-manager.js +11 -14
  42. package/dist/src/project-graph/utils/project-configuration/source-maps.d.ts +12 -5
  43. package/dist/src/project-graph/utils/project-configuration/source-maps.js +21 -7
  44. package/dist/src/project-graph/utils/project-configuration/target-defaults.d.ts +1 -1
  45. package/dist/src/project-graph/utils/project-configuration/target-defaults.js +26 -27
  46. package/dist/src/project-graph/utils/project-configuration/target-merging.js +50 -8
  47. package/dist/src/project-graph/utils/project-configuration/target-normalization.js +16 -3
  48. package/dist/src/project-graph/utils/project-configuration/utils.d.ts +15 -0
  49. package/dist/src/project-graph/utils/project-configuration/utils.js +42 -6
  50. package/dist/src/project-graph/utils/project-configuration-utils.d.ts +15 -12
  51. package/dist/src/project-graph/utils/project-configuration-utils.js +79 -99
  52. package/dist/src/tasks-runner/life-cycle.d.ts +2 -2
  53. package/dist/src/tasks-runner/life-cycle.js +2 -2
  54. package/dist/src/tasks-runner/pseudo-terminal.d.ts +1 -1
  55. package/dist/src/tasks-runner/pseudo-terminal.js +2 -2
  56. package/dist/src/tasks-runner/task-env.d.ts +9 -0
  57. package/dist/src/tasks-runner/task-env.js +26 -2
  58. package/dist/src/tasks-runner/task-orchestrator.d.ts +4 -1
  59. package/dist/src/tasks-runner/task-orchestrator.js +25 -12
  60. package/dist/src/utils/acknowledge-build-scripts.js +7 -5
  61. package/dist/src/utils/analytics-prompt.d.ts +0 -6
  62. package/dist/src/utils/analytics-prompt.js +0 -51
  63. package/dist/src/utils/catalog/bun-manager-utils.d.ts +8 -0
  64. package/dist/src/utils/catalog/bun-manager-utils.js +174 -0
  65. package/dist/src/utils/catalog/bun-manager.d.ts +28 -0
  66. package/dist/src/utils/catalog/bun-manager.js +130 -0
  67. package/dist/src/utils/catalog/index.d.ts +1 -1
  68. package/dist/src/utils/catalog/index.js +1 -1
  69. package/dist/src/utils/catalog/manager-factory.js +3 -0
  70. package/dist/src/utils/catalog/manager-utils.d.ts +8 -1
  71. package/dist/src/utils/catalog/manager-utils.js +9 -4
  72. package/dist/src/utils/catalog/manager.d.ts +13 -1
  73. package/dist/src/utils/catalog/manager.js +30 -0
  74. package/dist/src/utils/catalog/pnpm-manager.d.ts +2 -1
  75. package/dist/src/utils/catalog/pnpm-manager.js +3 -0
  76. package/dist/src/utils/catalog/types.d.ts +4 -0
  77. package/dist/src/utils/catalog/yarn-manager.d.ts +6 -2
  78. package/dist/src/utils/catalog/yarn-manager.js +23 -32
  79. package/dist/src/utils/git-utils.d.ts +15 -0
  80. package/dist/src/utils/git-utils.js +64 -6
  81. package/dist/src/utils/package-manager.d.ts +3 -1
  82. package/dist/src/utils/package-manager.js +22 -2
  83. package/dist/src/utils/workspace-id.d.ts +20 -0
  84. package/dist/src/utils/workspace-id.js +54 -0
  85. package/package.json +20 -15
@@ -1,195 +1,70 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.showTargetOutputsHandler = showTargetOutputsHandler;
4
+ const check_task_files_1 = require("../../../hasher/check-task-files");
4
5
  const utils_1 = require("../../../tasks-runner/utils");
5
- const workspace_root_1 = require("../../../utils/workspace-root");
6
6
  const utils_2 = require("./utils");
7
7
  // ── Handler ─────────────────────────────────────────────────────────
8
8
  async function showTargetOutputsHandler(args) {
9
9
  const t = await (0, utils_2.resolveTarget)(args);
10
- const outputsData = resolveOutputsData(t);
10
+ const { projectName, targetName, configuration } = t;
11
+ const taskId = (0, utils_1.createTaskId)(projectName, targetName, configuration);
12
+ const outputs = await (0, check_task_files_1.getTaskOutputs)(taskId, {
13
+ projectGraph: t.graph,
14
+ nxJson: t.nxJson,
15
+ });
11
16
  if (args.check !== undefined) {
12
- const checkItems = (0, utils_2.deduplicateFolderEntries)(args.check);
13
- const results = checkItems.map((o) => resolveCheckOutputData(o, outputsData));
14
- if (results.length >= 2) {
15
- renderBatchCheckOutputs(results, outputsData.project, outputsData.target);
16
- }
17
- else {
18
- for (const data of results)
19
- renderCheckOutput(data);
20
- }
21
- for (const data of results) {
22
- process.exitCode ||=
23
- data.matchedOutput ||
24
- data.containedOutputPaths.length ||
25
- data.containedExpandedOutputs.length
26
- ? 0
27
- : 1;
28
- }
17
+ const results = await checkOutputs(taskId, args.check, outputs);
18
+ (0, utils_2.renderCheckResults)(results, projectName, targetName, 'output');
19
+ (0, utils_2.setCheckExitCode)(results);
29
20
  return;
30
21
  }
31
- renderOutputs(outputsData, args);
22
+ renderOutputs(projectName, targetName, outputs, args);
32
23
  }
33
- function resolveOutputsData(t) {
34
- const { projectName, targetName, configuration, node } = t;
35
- const resolvedOutputs = (0, utils_1.getOutputsForTargetAndConfiguration)({ project: projectName, target: targetName, configuration }, {}, node);
36
- const targetConfig = node.data.targets?.[targetName];
37
- const configuredOutputs = targetConfig?.outputs ?? [];
38
- const mergedOptions = {
39
- ...targetConfig?.options,
40
- ...(configuration
41
- ? targetConfig?.configurations?.[configuration]
42
- : undefined),
43
- };
44
- const unresolvedOutputs = configuredOutputs.filter((o) => {
45
- if (!/\{options\./.test(o))
46
- return false;
47
- const unresolved = o.match(/\{options\.([^}]+)\}/g);
48
- return unresolved?.some((token) => {
49
- const key = token.slice('{options.'.length, -1);
50
- return mergedOptions[key] === undefined;
51
- });
24
+ // ── Data resolution ─────────────────────────────────────────────────
25
+ async function checkOutputs(taskId, check, { resolved, expanded }) {
26
+ const checkItems = (0, utils_2.deduplicateFolderEntries)(check);
27
+ const paths = checkItems.map(utils_2.normalizePath);
28
+ // checkFilesAreOutputs handles exact, directory-prefix and glob matching (and
29
+ // `!` exclusions) through the same native engine the task runner uses.
30
+ const { matched } = await (0, check_task_files_1.checkFilesAreOutputs)(taskId, paths);
31
+ const matchedPaths = new Set(matched);
32
+ return checkItems.map((value, i) => {
33
+ const path = paths[i];
34
+ const isMatch = matchedPaths.has(path);
35
+ return {
36
+ value,
37
+ file: path,
38
+ matched: isMatch,
39
+ contained: isMatch
40
+ ? []
41
+ : [
42
+ ...new Set([
43
+ ...(0, utils_2.pathsUnder)(path, resolved),
44
+ ...(0, utils_2.pathsUnder)(path, expanded),
45
+ ]),
46
+ ],
47
+ };
52
48
  });
53
- let expandedOutputs;
54
- try {
55
- const { expandOutputs } = require('../../../native');
56
- expandedOutputs = expandOutputs(workspace_root_1.workspaceRoot, resolvedOutputs);
57
- }
58
- catch {
59
- expandedOutputs = resolvedOutputs;
60
- }
61
- return {
62
- project: projectName,
63
- target: targetName,
64
- outputPaths: resolvedOutputs,
65
- expandedOutputs,
66
- unresolvedOutputs,
67
- };
68
- }
69
- function resolveCheckOutputData(rawFileToCheck, outputsData) {
70
- const fileToCheck = (0, utils_2.normalizePath)(rawFileToCheck);
71
- const { outputPaths, expandedOutputs } = outputsData;
72
- let matchedOutput = null;
73
- for (const outputPath of outputPaths) {
74
- const normalizedOutput = outputPath.replace(/\\/g, '/');
75
- if (fileToCheck === normalizedOutput ||
76
- fileToCheck.startsWith(normalizedOutput + '/')) {
77
- matchedOutput = outputPath;
78
- break;
79
- }
80
- }
81
- if (!matchedOutput && expandedOutputs.includes(fileToCheck)) {
82
- matchedOutput = fileToCheck;
83
- }
84
- let containedOutputPaths = [];
85
- let containedExpandedOutputs = [];
86
- if (!matchedOutput) {
87
- if (fileToCheck === '') {
88
- containedOutputPaths = [...outputPaths];
89
- containedExpandedOutputs = [...expandedOutputs];
90
- }
91
- else {
92
- const dirPrefix = fileToCheck.endsWith('/')
93
- ? fileToCheck
94
- : fileToCheck + '/';
95
- containedOutputPaths = outputPaths.filter((o) => o.replace(/\\/g, '/').startsWith(dirPrefix));
96
- containedExpandedOutputs = expandedOutputs.filter((o) => o.replace(/\\/g, '/').startsWith(dirPrefix));
97
- }
98
- }
99
- return {
100
- value: rawFileToCheck,
101
- file: fileToCheck,
102
- project: outputsData.project,
103
- target: outputsData.target,
104
- matchedOutput,
105
- containedOutputPaths,
106
- containedExpandedOutputs,
107
- };
108
49
  }
109
50
  // ── Render ──────────────────────────────────────────────────────────
110
- function renderOutputs(data, args) {
51
+ function renderOutputs(project, target, { resolved, expanded, unresolved }, args) {
111
52
  if (args.json) {
112
- const jsonData = data;
113
- const result = {};
114
- for (const [k, v] of Object.entries(jsonData)) {
115
- if (Array.isArray(v) && v.length === 0)
116
- continue;
117
- result[k] = v;
118
- }
119
- console.log(JSON.stringify(result, null, 2));
53
+ (0, utils_2.printJson)({
54
+ project,
55
+ target,
56
+ outputPaths: resolved,
57
+ expandedOutputs: expanded,
58
+ unresolvedOutputs: unresolved,
59
+ });
120
60
  return;
121
61
  }
122
62
  const c = (0, utils_2.pc)();
123
- console.log(`${c.bold('Output paths for')} ${c.cyan(data.project)}:${c.green(data.target)}`);
124
- if (data.outputPaths.length > 0) {
125
- (0, utils_2.printList)('Configured outputs', data.outputPaths);
126
- }
127
- if (data.expandedOutputs.length > 0) {
128
- (0, utils_2.printList)('Resolved outputs', data.expandedOutputs);
129
- }
130
- if (data.unresolvedOutputs.length > 0) {
131
- (0, utils_2.printList)(`${c.yellow('Unresolved outputs')} (option not set)`, data.unresolvedOutputs);
132
- }
133
- if (data.outputPaths.length === 0 && data.unresolvedOutputs.length === 0) {
63
+ console.log(`${c.bold('Output paths for')} ${c.cyan(project)}:${c.green(target)}`);
64
+ (0, utils_2.printList)('Configured outputs', resolved);
65
+ (0, utils_2.printList)('Resolved outputs', expanded);
66
+ (0, utils_2.printList)(`${c.yellow('Unresolved outputs')} (option not set)`, unresolved);
67
+ if (resolved.length === 0 && unresolved.length === 0) {
134
68
  console.log(`\n No outputs configured for this target.`);
135
69
  }
136
70
  }
137
- function renderCheckOutput(data) {
138
- const c = (0, utils_2.pc)();
139
- const displayPath = data.value || data.file;
140
- if (data.matchedOutput) {
141
- console.log(`${c.green('✓')} ${c.bold(displayPath)} is an output of ${c.cyan(data.project)}:${c.green(data.target)}`);
142
- }
143
- else if (data.containedOutputPaths.length > 0 ||
144
- data.containedExpandedOutputs.length > 0) {
145
- const uniquePaths = new Set([
146
- ...data.containedOutputPaths,
147
- ...data.containedExpandedOutputs,
148
- ]);
149
- console.log(`${c.yellow('~')} ${c.bold(displayPath)} is a directory containing ${c.bold(String(uniquePaths.size))} output path(s) for ${c.cyan(data.project)}:${c.green(data.target)}`);
150
- const extraExpanded = data.containedExpandedOutputs.filter((o) => !data.containedOutputPaths.includes(o));
151
- if (extraExpanded.length > 0) {
152
- (0, utils_2.printList)('Expanded outputs', extraExpanded);
153
- }
154
- }
155
- else {
156
- console.log(`${c.red('✗')} ${c.bold(displayPath)} is ${c.red('not')} an output of ${c.cyan(data.project)}:${c.green(data.target)}`);
157
- }
158
- }
159
- function renderBatchCheckOutputs(results, projectName, targetName) {
160
- const c = (0, utils_2.pc)();
161
- const label = `${c.cyan(projectName)}:${c.green(targetName)}`;
162
- const matched = [];
163
- const directories = [];
164
- const unmatched = [];
165
- for (const r of results) {
166
- if (r.matchedOutput) {
167
- matched.push(r.value);
168
- }
169
- else {
170
- const uniqueCount = new Set([
171
- ...r.containedOutputPaths,
172
- ...r.containedExpandedOutputs,
173
- ]).size;
174
- if (uniqueCount > 0) {
175
- directories.push({ value: r.file, count: uniqueCount });
176
- }
177
- else {
178
- unmatched.push(r.value);
179
- }
180
- }
181
- }
182
- if (matched.length > 0 || directories.length > 0) {
183
- console.log(`\n${c.green('✓')} These arguments were outputs of ${label}:`);
184
- for (const v of matched)
185
- console.log(` ${v}`);
186
- for (const d of directories) {
187
- console.log(` ${d.value} (directory containing ${d.count} output paths)`);
188
- }
189
- }
190
- if (unmatched.length > 0) {
191
- console.log(`\n${c.red('✗')} These arguments were ${c.red('not')} outputs of ${label}:`);
192
- for (const v of unmatched)
193
- console.log(` ${v}`);
194
- }
195
- }
@@ -24,3 +24,31 @@ export declare function normalizePath(p: string): string;
24
24
  export declare function deduplicateFolderEntries(items: string[]): string[];
25
25
  export declare function pc(): any;
26
26
  export declare function printList(header: string, items: unknown[], prefix?: string): void;
27
+ export declare function printJson(data: Record<string, unknown>): void;
28
+ /** The paths that live under `dir`. An empty `dir` is the workspace root. */
29
+ export declare function pathsUnder(dir: string, paths: string[]): string[];
30
+ export interface CheckResult {
31
+ /** The argument as the user typed it. */
32
+ value: string;
33
+ /** Workspace-relative form of `value`. */
34
+ file: string;
35
+ matched: boolean;
36
+ /** Which rule matched, when the caller can name one. */
37
+ category?: string;
38
+ /** Matches found underneath `value`, when it is a directory. */
39
+ contained: string[];
40
+ }
41
+ declare const NOUNS: {
42
+ readonly input: {
43
+ readonly preposition: 'for';
44
+ readonly contained: 'input file';
45
+ };
46
+ readonly output: {
47
+ readonly preposition: 'of';
48
+ readonly contained: 'output path';
49
+ };
50
+ };
51
+ type CheckNoun = keyof typeof NOUNS;
52
+ export declare function renderCheckResults(results: CheckResult[], project: string, target: string, noun: CheckNoun): void;
53
+ export declare function setCheckExitCode(results: CheckResult[]): void;
54
+ export {};
@@ -6,6 +6,10 @@ exports.normalizePath = normalizePath;
6
6
  exports.deduplicateFolderEntries = deduplicateFolderEntries;
7
7
  exports.pc = pc;
8
8
  exports.printList = printList;
9
+ exports.printJson = printJson;
10
+ exports.pathsUnder = pathsUnder;
11
+ exports.renderCheckResults = renderCheckResults;
12
+ exports.setCheckExitCode = setCheckExitCode;
9
13
  const path_1 = require("path");
10
14
  const calculate_default_project_name_1 = require("../../../config/calculate-default-project-name");
11
15
  const configuration_1 = require("../../../config/configuration");
@@ -29,18 +33,22 @@ async function resolveTarget(args, opts) {
29
33
  }
30
34
  const nxJson = (0, configuration_1.readNxJson)();
31
35
  const { projectName, targetName, configurationName } = resolveTargetIdentifier(args, graph, nxJson);
36
+ // `resolveProjectNode` accepts a pattern specifier (`my-*`), so the concrete
37
+ // name it resolved to is the one everything downstream has to use — it is a
38
+ // lookup key for the task id, not just a label.
32
39
  const node = resolveProjectNode(projectName, graph);
40
+ const resolvedProjectName = node.name;
33
41
  if (!node.data.targets?.[targetName]) {
34
- reportTargetNotFound(projectName, targetName, node);
42
+ reportTargetNotFound(resolvedProjectName, targetName, node);
35
43
  }
36
44
  const configuration = configurationName ?? args.configuration;
37
45
  if (configuration) {
38
- validateConfiguration(projectName, targetName, configuration, node.data.targets[targetName]);
46
+ validateConfiguration(resolvedProjectName, targetName, configuration, node.data.targets[targetName]);
39
47
  }
40
48
  return {
41
49
  graph,
42
50
  nxJson,
43
- projectName,
51
+ projectName: resolvedProjectName,
44
52
  targetName,
45
53
  configuration,
46
54
  node,
@@ -183,3 +191,75 @@ function printList(header, items, prefix = '\n') {
183
191
  for (const item of items)
184
192
  console.log(` ${item}`);
185
193
  }
194
+ function printJson(data) {
195
+ const result = {};
196
+ for (const [key, value] of Object.entries(data)) {
197
+ if (Array.isArray(value) && value.length === 0)
198
+ continue;
199
+ result[key] = value;
200
+ }
201
+ console.log(JSON.stringify(result, null, 2));
202
+ }
203
+ /** The paths that live under `dir`. An empty `dir` is the workspace root. */
204
+ function pathsUnder(dir, paths) {
205
+ if (dir === '')
206
+ return [...paths];
207
+ const prefix = dir.endsWith('/') ? dir : dir + '/';
208
+ return paths.filter((p) => p.startsWith(prefix));
209
+ }
210
+ const NOUNS = {
211
+ input: { preposition: 'for', contained: 'input file' },
212
+ output: { preposition: 'of', contained: 'output path' },
213
+ };
214
+ function renderCheckResults(results, project, target, noun) {
215
+ if (results.length >= 2) {
216
+ renderBatchCheckResults(results, project, target, noun);
217
+ return;
218
+ }
219
+ for (const result of results) {
220
+ renderCheckResult(result, project, target, noun);
221
+ }
222
+ }
223
+ function setCheckExitCode(results) {
224
+ for (const result of results) {
225
+ process.exitCode ||= result.matched || result.contained.length ? 0 : 1;
226
+ }
227
+ }
228
+ function renderCheckResult(result, project, target, noun) {
229
+ const c = pc();
230
+ const { preposition, contained } = NOUNS[noun];
231
+ const label = `${c.cyan(project)}:${c.green(target)}`;
232
+ if (result.matched) {
233
+ const category = result.category ? ` (${result.category})` : '';
234
+ console.log(`${c.green('✓')} ${c.bold(result.value)} is an ${noun} ${preposition} ${label}${category}`);
235
+ }
236
+ else if (result.contained.length > 0) {
237
+ console.log(`${c.yellow('~')} ${c.bold(result.file)} is a directory containing ${c.bold(String(result.contained.length))} ${contained}(s) ${preposition} ${label}`);
238
+ for (const item of [...result.contained].sort())
239
+ console.log(` ${item}`);
240
+ }
241
+ else {
242
+ console.log(`${c.red('✗')} ${c.bold(result.value)} is ${c.red('not')} an ${noun} ${preposition} ${label}`);
243
+ }
244
+ }
245
+ function renderBatchCheckResults(results, project, target, noun) {
246
+ const c = pc();
247
+ const { preposition, contained } = NOUNS[noun];
248
+ const label = `${c.cyan(project)}:${c.green(target)}`;
249
+ const matched = results.filter((r) => r.matched);
250
+ const directories = results.filter((r) => !r.matched && r.contained.length);
251
+ const unmatched = results.filter((r) => !r.matched && !r.contained.length);
252
+ if (matched.length > 0 || directories.length > 0) {
253
+ console.log(`\n${c.green('✓')} These arguments were ${noun}s ${preposition} ${label}:`);
254
+ for (const r of matched)
255
+ console.log(` ${r.value}`);
256
+ for (const r of directories) {
257
+ console.log(` ${r.file} (directory containing ${r.contained.length} ${contained}s)`);
258
+ }
259
+ }
260
+ if (unmatched.length > 0) {
261
+ console.log(`\n${c.red('✗')} These arguments were ${c.red('not')} ${noun}s ${preposition} ${label}:`);
262
+ for (const r of unmatched)
263
+ console.log(` ${r.value}`);
264
+ }
265
+ }
@@ -1,4 +1,4 @@
1
- import { Argv, ParserConfigurationOptions } from 'yargs';
1
+ import type { Argv, ParserConfigurationOptions } from 'yargs';
2
2
  interface ExcludeOptions {
3
3
  exclude: string[];
4
4
  }
@@ -54,8 +54,10 @@ export type TargetDefaultEntry = {
54
54
  export type TargetDefaultFilter = {
55
55
  /**
56
56
  * Restrict the default to targets originated by a specific plugin
57
- * (e.g. `@nx/vite`). Matches against the plugin that wrote the target's
58
- * `executor` or `command`.
57
+ * (e.g. `@nx/vite`). Matches against the plugin from nx.json's `plugins`
58
+ * that wrote the target's `executor` or `command`. Targets whose
59
+ * executor/command comes from `project.json` or `package.json` have no
60
+ * source plugin and never match.
59
61
  */
60
62
  plugin?: string;
61
63
  /**