nx 22.3.0-canary.20251211-205daee → 22.3.0-canary.20251216-71bfc21
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/adapter/ngcli-adapter.d.ts.map +1 -1
- package/src/adapter/ngcli-adapter.js +28 -3
- 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/init/implementation/angular/legacy-angular-versions.d.ts.map +1 -1
- package/src/command-line/init/implementation/angular/legacy-angular-versions.js +1 -0
- 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/core/graph/main.js +1 -1
- 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 +88 -23
- package/src/plugins/js/lock-file/project-graph-pruning.js +3 -3
- package/src/plugins/js/project-graph/affected/npm-packages.d.ts.map +1 -1
- package/src/plugins/js/project-graph/affected/npm-packages.js +25 -0
- 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/plugins/js/utils/register.d.ts.map +1 -1
- package/src/plugins/js/utils/register.js +4 -1
- 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
|
@@ -13,6 +13,7 @@ const catalog_1 = require("../../../utils/catalog");
|
|
|
13
13
|
const project_graph_pruning_1 = require("./project-graph-pruning");
|
|
14
14
|
const path_1 = require("path");
|
|
15
15
|
const get_workspace_packages_from_graph_1 = require("../utils/get-workspace-packages-from-graph");
|
|
16
|
+
const semver_1 = require("semver");
|
|
16
17
|
let currentLockFileHash;
|
|
17
18
|
let parsedLockFile;
|
|
18
19
|
function parsePnpmLockFile(lockFileContent, lockFileHash) {
|
|
@@ -63,18 +64,79 @@ function matchedDependencyName(importer, key, originalPackageName) {
|
|
|
63
64
|
matchPropValue(importer.optionalDependencies, key, originalPackageName, 'optionalDependencies') ||
|
|
64
65
|
matchPropValue(importer.peerDependencies, key, originalPackageName, 'peerDependencies'));
|
|
65
66
|
}
|
|
66
|
-
function createHashFromSnapshot(snapshot) {
|
|
67
|
-
|
|
67
|
+
function createHashFromSnapshot(snapshot, patchHash) {
|
|
68
|
+
const baseHash = snapshot.resolution?.['integrity'] ||
|
|
68
69
|
(snapshot.resolution?.['tarball']
|
|
69
70
|
? (0, file_hasher_1.hashArray)([snapshot.resolution['tarball']])
|
|
70
|
-
: undefined)
|
|
71
|
+
: undefined);
|
|
72
|
+
// If there's a patch hash, combine it with the base hash
|
|
73
|
+
if (patchHash && baseHash) {
|
|
74
|
+
return (0, file_hasher_1.hashArray)([baseHash, patchHash]);
|
|
75
|
+
}
|
|
76
|
+
return baseHash ?? patchHash;
|
|
71
77
|
}
|
|
72
78
|
function isAliasVersion(depVersion) {
|
|
73
79
|
return depVersion.startsWith('/') || depVersion.includes('@');
|
|
74
80
|
}
|
|
81
|
+
/**
|
|
82
|
+
* Finds the appropriate patch hash for a package based on its name and version.
|
|
83
|
+
* Follows PNPM's priority order (https://pnpm.io/settings#patcheddependencies):
|
|
84
|
+
* 1. Exact version match (e.g., "vitest@3.2.4") - highest priority
|
|
85
|
+
* 2. Version range match (e.g., "vitest@^3.0.0")
|
|
86
|
+
* 3. Name-only match (e.g., "vitest") - lowest priority
|
|
87
|
+
*/
|
|
88
|
+
function findPatchHash(patchEntriesByPackage, packageName, version) {
|
|
89
|
+
const entries = patchEntriesByPackage.get(packageName);
|
|
90
|
+
if (!entries) {
|
|
91
|
+
return undefined; // No patches for this package
|
|
92
|
+
}
|
|
93
|
+
// Check for exact version match first (highest priority)
|
|
94
|
+
const exactMatch = entries.find((entry) => entry.versionSpecifier === version);
|
|
95
|
+
if (exactMatch) {
|
|
96
|
+
return exactMatch.hash;
|
|
97
|
+
}
|
|
98
|
+
// Check for version range matches
|
|
99
|
+
for (const entry of entries) {
|
|
100
|
+
// Skip name-only entries (will be handled at the end with lowest priority)
|
|
101
|
+
if (entry.versionSpecifier === null) {
|
|
102
|
+
continue;
|
|
103
|
+
}
|
|
104
|
+
if ((0, semver_1.validRange)(entry.versionSpecifier)) {
|
|
105
|
+
try {
|
|
106
|
+
if ((0, semver_1.satisfies)(version, entry.versionSpecifier)) {
|
|
107
|
+
return entry.hash;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
catch {
|
|
111
|
+
// Invalid semver range, skip
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
// Fall back to name-only match (lowest priority)
|
|
116
|
+
const nameOnlyMatch = entries.find((entry) => entry.versionSpecifier === null);
|
|
117
|
+
return nameOnlyMatch?.hash;
|
|
118
|
+
}
|
|
75
119
|
function getNodes(data, isV5) {
|
|
76
120
|
const keyMap = new Map();
|
|
77
121
|
const nodes = new Map();
|
|
122
|
+
// Extract and pre-parse patch information from patchedDependencies section
|
|
123
|
+
const patchEntriesByPackage = new Map();
|
|
124
|
+
if (data.patchedDependencies) {
|
|
125
|
+
for (const specifier of Object.keys(data.patchedDependencies)) {
|
|
126
|
+
const patchInfo = data.patchedDependencies[specifier];
|
|
127
|
+
if (patchInfo && typeof patchInfo === 'object' && 'hash' in patchInfo) {
|
|
128
|
+
const packageName = extractNameFromKey(specifier, false);
|
|
129
|
+
const versionSpecifier = getVersion(specifier, packageName) || null;
|
|
130
|
+
if (!patchEntriesByPackage.has(packageName)) {
|
|
131
|
+
patchEntriesByPackage.set(packageName, []);
|
|
132
|
+
}
|
|
133
|
+
patchEntriesByPackage.get(packageName).push({
|
|
134
|
+
versionSpecifier,
|
|
135
|
+
hash: patchInfo.hash,
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
78
140
|
const maybeAliasedPackageVersions = new Map(); // <version, alias>
|
|
79
141
|
if (data.importers['.'].optionalDependencies) {
|
|
80
142
|
for (const [depName, depVersion] of Object.entries(data.importers['.'].optionalDependencies)) {
|
|
@@ -104,7 +166,14 @@ function getNodes(data, isV5) {
|
|
|
104
166
|
if (!originalPackageName) {
|
|
105
167
|
continue;
|
|
106
168
|
}
|
|
107
|
-
|
|
169
|
+
// Extract version from the key to match against patch specifiers
|
|
170
|
+
const versionFromKey = getVersion(key, originalPackageName);
|
|
171
|
+
// Parse the base version (without peer dependency info, etc.)
|
|
172
|
+
const baseVersion = parseBaseVersion(versionFromKey, isV5);
|
|
173
|
+
// Find the appropriate patch hash using PNPM's priority order:
|
|
174
|
+
// 1. Exact version match, 2. Version range match, 3. Name-only match
|
|
175
|
+
const patchHash = findPatchHash(patchEntriesByPackage, originalPackageName, baseVersion);
|
|
176
|
+
const hash = createHashFromSnapshot(snapshot, patchHash);
|
|
108
177
|
// snapshot already has a name
|
|
109
178
|
if (snapshot.name) {
|
|
110
179
|
packageNameObj = {
|
|
@@ -122,14 +191,14 @@ function getNodes(data, isV5) {
|
|
|
122
191
|
packageNameObj = {
|
|
123
192
|
key,
|
|
124
193
|
packageName: rootDependencyName,
|
|
125
|
-
hash
|
|
194
|
+
hash,
|
|
126
195
|
};
|
|
127
196
|
}
|
|
128
197
|
if (!snapshot.name && !rootDependencyName) {
|
|
129
198
|
packageNameObj = {
|
|
130
199
|
key,
|
|
131
200
|
packageName: originalPackageName,
|
|
132
|
-
hash
|
|
201
|
+
hash,
|
|
133
202
|
};
|
|
134
203
|
}
|
|
135
204
|
if (snapshot.peerDependencies) {
|
|
@@ -271,12 +340,14 @@ function getHoistedVersion(packageName, isV5, hoistedKeysByPackage) {
|
|
|
271
340
|
}
|
|
272
341
|
function getDependencies(data, keyMap, isV5, ctx) {
|
|
273
342
|
const results = [];
|
|
274
|
-
Object.
|
|
343
|
+
Object.keys(data.packages).forEach((key) => {
|
|
344
|
+
const snapshot = data.packages[key];
|
|
275
345
|
const nodes = keyMap.get(key);
|
|
276
346
|
nodes.forEach((node) => {
|
|
277
347
|
[snapshot.dependencies, snapshot.optionalDependencies].forEach((section) => {
|
|
278
348
|
if (section) {
|
|
279
|
-
Object.
|
|
349
|
+
Object.keys(section).forEach((name) => {
|
|
350
|
+
const versionRange = section[name];
|
|
280
351
|
const version = parseBaseVersion(findVersion(versionRange, name, isV5), isV5);
|
|
281
352
|
const target = ctx.externalNodes[`npm:${name}@${version}`] ||
|
|
282
353
|
ctx.externalNodes[`npm:${name}`];
|
|
@@ -510,23 +581,17 @@ function getVersion(key, packageName) {
|
|
|
510
581
|
return key.slice(packageName.length + 1);
|
|
511
582
|
}
|
|
512
583
|
function extractNameFromKey(key, isV5) {
|
|
513
|
-
|
|
584
|
+
const versionSeparator = isV5 ? '/' : '@';
|
|
514
585
|
if (key.startsWith('@')) {
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
// find the position of the '@'
|
|
521
|
-
return key.slice(0, key.indexOf('@', 1));
|
|
522
|
-
}
|
|
523
|
-
}
|
|
524
|
-
if (isV5) {
|
|
525
|
-
// if package has just a name e.g. "react/7.12.5..."
|
|
526
|
-
return key.slice(0, key.indexOf('/', 1));
|
|
586
|
+
// Scoped package (e.g., "@babel/core@7.12.5" or "@babel/core/7.12.5")
|
|
587
|
+
// Find the end of scope, then look for the first version separator after that
|
|
588
|
+
const scopeEnd = key.indexOf('/');
|
|
589
|
+
const sepIndex = scopeEnd === -1 ? -1 : key.indexOf(versionSeparator, scopeEnd + 1);
|
|
590
|
+
return sepIndex === -1 ? key : key.slice(0, sepIndex);
|
|
527
591
|
}
|
|
528
592
|
else {
|
|
529
|
-
//
|
|
530
|
-
|
|
593
|
+
// Non-scoped package (e.g., "react@7.12.5" or "react/7.12.5")
|
|
594
|
+
const sepIndex = key.indexOf(versionSeparator);
|
|
595
|
+
return sepIndex === -1 ? key : key.slice(0, sepIndex);
|
|
531
596
|
}
|
|
532
597
|
}
|
|
@@ -97,9 +97,9 @@ function addNodesAndDependencies(graph, packageJsonDeps, workspacePackages, buil
|
|
|
97
97
|
}
|
|
98
98
|
else if (workspacePackages.has(name)) {
|
|
99
99
|
// Workspace Node
|
|
100
|
-
const
|
|
101
|
-
if (
|
|
102
|
-
traverseWorkspaceNode(graph, builder,
|
|
100
|
+
const workspaceNode = workspacePackages.get(name);
|
|
101
|
+
if (workspaceNode) {
|
|
102
|
+
traverseWorkspaceNode(graph, builder, workspaceNode);
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"npm-packages.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/nx/src/plugins/js/project-graph/affected/npm-packages.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,eAAe,EAChB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAGL,UAAU,EACX,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,qBAAqB,EAAE,MAAM,kEAAkE,CAAC;AAQzG,eAAO,MAAM,qBAAqB,EAAE,qBAAqB,CACvD,eAAe,GAAG,UAAU,
|
|
1
|
+
{"version":3,"file":"npm-packages.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/nx/src/plugins/js/project-graph/affected/npm-packages.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,eAAe,EAChB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAGL,UAAU,EACX,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,qBAAqB,EAAE,MAAM,kEAAkE,CAAC;AAQzG,eAAO,MAAM,qBAAqB,EAAE,qBAAqB,CACvD,eAAe,GAAG,UAAU,CAmG7B,CAAC"}
|
|
@@ -49,6 +49,31 @@ const getTouchedNpmPackages = (touchedFiles, _, nxJson, packageJson, projectGrap
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
+
else if ((0, json_diff_1.isJsonChange)(c) &&
|
|
53
|
+
(c.path[0] === 'overrides' ||
|
|
54
|
+
c.path[0] === 'resolutions' ||
|
|
55
|
+
(c.path[0] === 'pnpm' && c.path[1] === 'overrides'))) {
|
|
56
|
+
// Changes to overrides, resolutions, or pnpm.overrides
|
|
57
|
+
// Find which package was changed and mark projects that depend on it as affected
|
|
58
|
+
const packageName = c.path[0] === 'pnpm' ? c.path[2] : c.path[1];
|
|
59
|
+
if (packageName) {
|
|
60
|
+
// Look for the npm package in external nodes
|
|
61
|
+
let npmPackage = npmPackages.find((pkg) => pkg.data.packageName === packageName);
|
|
62
|
+
if (npmPackage) {
|
|
63
|
+
touched.push(npmPackage.name);
|
|
64
|
+
// If it's a global package, all projects are affected
|
|
65
|
+
if ('packageName' in npmPackage.data &&
|
|
66
|
+
globalPackages.has(npmPackage.data.packageName)) {
|
|
67
|
+
return Object.keys(projectGraph.nodes);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
// If the package isn't found in external nodes, it might affect all projects
|
|
72
|
+
// since overrides can affect transitive dependencies
|
|
73
|
+
return Object.keys(projectGraph.nodes);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
52
77
|
else if ((0, file_utils_1.isWholeFileChange)(c)) {
|
|
53
78
|
// Whole file was touched, so all npm packages are touched.
|
|
54
79
|
touched = npmPackages.map((pkg) => pkg.name);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-dependencies.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/nx/src/plugins/js/project-graph/build-dependencies/build-dependencies.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAC9E,OAAO,EAAE,yBAAyB,EAAE,MAAM,iDAAiD,CAAC;AAK5F,wBAAgB,yBAAyB,CACvC,cAAc,EAAE;IACd,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B,EACD,GAAG,EAAE,yBAAyB,GAC7B,yBAAyB,EAAE,
|
|
1
|
+
{"version":3,"file":"build-dependencies.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/nx/src/plugins/js/project-graph/build-dependencies/build-dependencies.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAC9E,OAAO,EAAE,yBAAyB,EAAE,MAAM,iDAAiD,CAAC;AAK5F,wBAAgB,yBAAyB,CACvC,cAAc,EAAE;IACd,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B,EACD,GAAG,EAAE,yBAAyB,GAC7B,yBAAyB,EAAE,CA8C7B"}
|
|
@@ -11,14 +11,14 @@ function buildExplicitDependencies(jsPluginConfig, ctx) {
|
|
|
11
11
|
// TODO: TargetProjectLocator is a public API, so we can't change the shape of it
|
|
12
12
|
// We should eventually let it accept Record<string, ProjectConfiguration> s.t. we
|
|
13
13
|
// don't have to reshape the CreateDependenciesContext here.
|
|
14
|
-
const nodes =
|
|
15
|
-
|
|
16
|
-
{
|
|
14
|
+
const nodes = {};
|
|
15
|
+
Object.keys(ctx.projects).forEach((key) => {
|
|
16
|
+
nodes[key] = {
|
|
17
17
|
name: key,
|
|
18
18
|
type: null,
|
|
19
|
-
data:
|
|
20
|
-
}
|
|
21
|
-
|
|
19
|
+
data: ctx.projects[key],
|
|
20
|
+
};
|
|
21
|
+
});
|
|
22
22
|
const targetProjectLocator = new target_project_locator_1.TargetProjectLocator(nodes, ctx.externalNodes);
|
|
23
23
|
if (jsPluginConfig.analyzeSourceFiles === undefined ||
|
|
24
24
|
jsPluginConfig.analyzeSourceFiles === true) {
|
package/src/plugins/js/project-graph/build-dependencies/explicit-package-json-dependencies.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"explicit-package-json-dependencies.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/nx/src/plugins/js/project-graph/build-dependencies/explicit-package-json-dependencies.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AACnF,OAAO,EACL,KAAK,yBAAyB,EAE/B,MAAM,iDAAiD,CAAC;
|
|
1
|
+
{"version":3,"file":"explicit-package-json-dependencies.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/nx/src/plugins/js/project-graph/build-dependencies/explicit-package-json-dependencies.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AACnF,OAAO,EACL,KAAK,yBAAyB,EAE/B,MAAM,iDAAiD,CAAC;AAGzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,wBAAgB,oCAAoC,CAClD,GAAG,EAAE,yBAAyB,EAC9B,oBAAoB,EAAE,oBAAoB,GACzC,yBAAyB,EAAE,CAe7B"}
|
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":"register.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nx/src/plugins/js/utils/register.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AA+ClD;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,IAAI,CAAC;AACpE;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,OAAE;AA6CxE,wBAAgB,gBAAgB,CAC9B,eAAe,EAAE,eAAe,GAC/B,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,
|
|
1
|
+
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nx/src/plugins/js/utils/register.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AA+ClD;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,IAAI,CAAC;AACpE;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,OAAE;AA6CxE,wBAAgB,gBAAgB,CAC9B,eAAe,EAAE,eAAe,GAC/B,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAajC;AAED,wBAAgB,mBAAmB,CACjC,eAAe,EAAE,eAAe,EAChC,aAAa,CAAC,EAAE,eAAe,EAC/B,YAAY,CAAC,EAAE,OAAO,GACrB,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAwBjC;AAiFD,wBAAgB,aAAa,CAC3B,eAAe,EAAE,eAAe,EAChC,WAAW,CAAC,EAAE,OAAO,SALc,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAiFnE;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAChC,eAAe,EAAE,eAAe,EAChC,WAAW,CAAC,EAAE,OAAO,GACpB,MAAM,IAAI,CAUZ;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,YAAY,KAAA,GAAG,MAAM,IAAI,CAuB9D;AA+ED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,eAAe,EAAE,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6CxE"}
|
|
@@ -88,7 +88,10 @@ function getSwcTranspiler(compilerOptions) {
|
|
|
88
88
|
// These are requires to prevent it from registering when it shouldn't
|
|
89
89
|
const register = require('@swc-node/register/register')
|
|
90
90
|
.register;
|
|
91
|
-
const cleanupFn = register(
|
|
91
|
+
const cleanupFn = register({
|
|
92
|
+
...compilerOptions,
|
|
93
|
+
baseUrl: compilerOptions.baseUrl ?? './',
|
|
94
|
+
});
|
|
92
95
|
return typeof cleanupFn === 'function' ? cleanupFn : () => { };
|
|
93
96
|
}
|
|
94
97
|
function getTsNodeTranspiler(compilerOptions, tsNodeOptions, preferTsNode) {
|
|
@@ -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 = [];
|