nx 22.2.3 → 22.2.5
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/executors.json +16 -16
- package/generators.json +13 -13
- package/migrations.json +138 -138
- package/package.json +14 -11
- package/presets/npm.json +4 -4
- package/schemas/nx-schema.json +1285 -1285
- package/schemas/project-schema.json +359 -359
- package/schemas/workspace-schema.json +165 -165
- package/src/ai/set-up-ai-agents/schema.json +31 -31
- package/src/command-line/format/format.d.ts.map +1 -1
- package/src/command-line/format/format.js +20 -2
- package/src/command-line/release/changelog.js +2 -0
- package/src/command-line/release/utils/shared.d.ts +3 -1
- package/src/command-line/release/utils/shared.d.ts.map +1 -1
- package/src/command-line/release/utils/shared.js +9 -0
- package/src/executors/noop/schema.json +8 -8
- package/src/executors/run-commands/schema.json +187 -187
- package/src/executors/run-script/schema.json +25 -25
- package/src/native/nx.wasm32-wasi.wasm +0 -0
- package/src/nx-cloud/generators/connect-to-nx-cloud/schema.json +38 -38
- package/src/plugins/js/lock-file/pnpm-parser.d.ts.map +1 -1
- package/src/plugins/js/lock-file/pnpm-parser.js +4 -2
- package/src/plugins/js/lock-file/project-graph-pruning.js +3 -3
- package/src/plugins/js/project-graph/build-dependencies/build-dependencies.d.ts.map +1 -1
- package/src/plugins/js/project-graph/build-dependencies/build-dependencies.js +6 -6
- package/src/plugins/js/project-graph/build-dependencies/explicit-package-json-dependencies.d.ts.map +1 -1
- package/src/plugins/js/project-graph/build-dependencies/explicit-package-json-dependencies.js +24 -16
- package/src/tasks-runner/life-cycles/tui-summary-life-cycle.d.ts.map +1 -1
- package/src/tasks-runner/life-cycles/tui-summary-life-cycle.js +4 -2
- package/src/tasks-runner/run-command.js +1 -1
package/src/plugins/js/project-graph/build-dependencies/explicit-package-json-dependencies.js
CHANGED
|
@@ -5,25 +5,33 @@ const project_graph_1 = require("../../../../config/project-graph");
|
|
|
5
5
|
const file_utils_1 = require("../../../../project-graph/file-utils");
|
|
6
6
|
const project_graph_builder_1 = require("../../../../project-graph/project-graph-builder");
|
|
7
7
|
const json_1 = require("../../../../utils/json");
|
|
8
|
-
const path_1 = require("../../../../utils/path");
|
|
9
8
|
function buildExplicitPackageJsonDependencies(ctx, targetProjectLocator) {
|
|
10
9
|
const res = [];
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
const roots = {};
|
|
11
|
+
Object.values(ctx.projects).forEach((project) => {
|
|
12
|
+
roots[project.root] = true;
|
|
13
|
+
});
|
|
14
|
+
Object.keys(ctx.filesToProcess.projectFileMap).forEach((source) => {
|
|
15
|
+
Object.values(ctx.filesToProcess.projectFileMap[source]).forEach((f) => {
|
|
16
|
+
if (isPackageJsonAtProjectRoot(roots, f.file)) {
|
|
17
17
|
processPackageJson(source, f.file, ctx, targetProjectLocator, res);
|
|
18
18
|
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
21
|
return res;
|
|
22
22
|
}
|
|
23
|
+
function isPackageJsonAtProjectRoot(roots, fileName) {
|
|
24
|
+
if (!fileName.endsWith('package.json')) {
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
const filePath = fileName.slice(0, -13);
|
|
28
|
+
return !!roots[filePath];
|
|
29
|
+
}
|
|
23
30
|
function processPackageJson(sourceProject, packageJsonPath, ctx, targetProjectLocator, collectedDeps) {
|
|
24
31
|
try {
|
|
25
32
|
const deps = readDeps((0, json_1.parseJson)((0, file_utils_1.defaultFileRead)(packageJsonPath)));
|
|
26
|
-
|
|
33
|
+
Object.keys(deps).forEach((packageName) => {
|
|
34
|
+
const packageVersion = deps[packageName];
|
|
27
35
|
const localProject = targetProjectLocator.findDependencyInWorkspaceProjects(packageJsonPath, packageName, packageVersion);
|
|
28
36
|
if (localProject) {
|
|
29
37
|
// package.json refers to another project in the monorepo
|
|
@@ -35,11 +43,11 @@ function processPackageJson(sourceProject, packageJsonPath, ctx, targetProjectLo
|
|
|
35
43
|
};
|
|
36
44
|
(0, project_graph_builder_1.validateDependency)(dependency, ctx);
|
|
37
45
|
collectedDeps.push(dependency);
|
|
38
|
-
|
|
46
|
+
return;
|
|
39
47
|
}
|
|
40
48
|
const externalNodeName = targetProjectLocator.findNpmProjectFromImport(packageName, packageJsonPath);
|
|
41
49
|
if (!externalNodeName) {
|
|
42
|
-
|
|
50
|
+
return;
|
|
43
51
|
}
|
|
44
52
|
const dependency = {
|
|
45
53
|
source: sourceProject,
|
|
@@ -49,7 +57,7 @@ function processPackageJson(sourceProject, packageJsonPath, ctx, targetProjectLo
|
|
|
49
57
|
};
|
|
50
58
|
(0, project_graph_builder_1.validateDependency)(dependency, ctx);
|
|
51
59
|
collectedDeps.push(dependency);
|
|
52
|
-
}
|
|
60
|
+
});
|
|
53
61
|
}
|
|
54
62
|
catch (e) {
|
|
55
63
|
if (process.env.NX_VERBOSE_LOGGING === 'true') {
|
|
@@ -70,9 +78,9 @@ function readDeps(packageJson) {
|
|
|
70
78
|
'dependencies',
|
|
71
79
|
];
|
|
72
80
|
for (const type of depType) {
|
|
73
|
-
|
|
74
|
-
deps[depName] =
|
|
75
|
-
}
|
|
81
|
+
Object.keys(packageJson[type] || {}).forEach((depName) => {
|
|
82
|
+
deps[depName] = packageJson[type][depName];
|
|
83
|
+
});
|
|
76
84
|
}
|
|
77
85
|
return deps;
|
|
78
86
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tui-summary-life-cycle.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/tasks-runner/life-cycles/tui-summary-life-cycle.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAa/C,wBAAgB,8BAA8B,CAAC,EAC7C,YAAY,EACZ,KAAK,EACL,SAAS,EACT,IAAI,EACJ,SAAS,EACT,iBAAiB,EACjB,eAAe,EACf,0BAA0B,GAC3B,EAAE;IACD,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,SAAS,EAAE,SAAS,CAAC;IACrB,IAAI,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;QAAC,aAAa,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACxE,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,IAAI,EAAE,CAAC;IACxB,0BAA0B,EAAE,CAAC,KAAK,EAAE,IAAI,KAAK,IAAI,CAAC;CACnD;
|
|
1
|
+
{"version":3,"file":"tui-summary-life-cycle.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/tasks-runner/life-cycles/tui-summary-life-cycle.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAa/C,wBAAgB,8BAA8B,CAAC,EAC7C,YAAY,EACZ,KAAK,EACL,SAAS,EACT,IAAI,EACJ,SAAS,EACT,iBAAiB,EACjB,eAAe,EACf,0BAA0B,GAC3B,EAAE;IACD,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,SAAS,EAAE,SAAS,CAAC;IACrB,IAAI,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;QAAC,aAAa,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACxE,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,IAAI,EAAE,CAAC;IACxB,0BAA0B,EAAE,CAAC,KAAK,EAAE,IAAI,KAAK,IAAI,CAAC;CACnD;eAyekC,SAAS;;EAC3C"}
|
|
@@ -42,8 +42,10 @@ function getTuiTerminalSummaryLifeCycle({ projectNames, tasks, taskGraph, args,
|
|
|
42
42
|
lifeCycle.printTaskTerminalOutput = (task, taskStatus, output) => {
|
|
43
43
|
tasksToTaskStatus[task.id] = taskStatus;
|
|
44
44
|
// Store the complete output for display in the summary
|
|
45
|
-
// This is called with the full output for cached
|
|
46
|
-
|
|
45
|
+
// This is called with the full output for cached tasks. For non-cached tasks,
|
|
46
|
+
// the output doesn't include the portion of the output that prints the command that was being ran.
|
|
47
|
+
if (output &&
|
|
48
|
+
!['failure', 'success'].includes(taskStatus)) {
|
|
47
49
|
tasksToTerminalOutputs[task.id] = output;
|
|
48
50
|
}
|
|
49
51
|
};
|
|
@@ -51,7 +51,7 @@ async function getTerminalOutputLifeCycle(initiatingProject, initiatingTasks, pr
|
|
|
51
51
|
delete overridesWithoutHidden['__overrides_unparsed__'];
|
|
52
52
|
const isRunOne = initiatingProject != null;
|
|
53
53
|
if (tasks.length === 1) {
|
|
54
|
-
process.env.NX_TUI
|
|
54
|
+
process.env.NX_TUI ??= 'false';
|
|
55
55
|
}
|
|
56
56
|
if ((0, is_tui_enabled_1.isTuiEnabled)()) {
|
|
57
57
|
const interceptedNxCloudLogs = [];
|