nx 24.0.2 → 24.0.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.
- package/dist/bin/nx-cloud.js +9 -0
- package/dist/src/ai/set-up-ai-agents/set-up-ai-agents.js +12 -1
- package/dist/src/command-line/migrate/migrate-analytics.js +2 -2
- package/dist/src/command-line/migrate/migrate.d.ts +3 -0
- package/dist/src/command-line/migrate/migrate.js +34 -15
- package/dist/src/command-line/migrate/workspace-installation.d.ts +15 -0
- package/dist/src/command-line/migrate/workspace-installation.js +73 -0
- package/dist/src/command-line/nx-cloud/complete-run/command-object.js +1 -1
- package/dist/src/command-line/nx-cloud/fix-ci/command-object.js +1 -1
- package/dist/src/command-line/nx-cloud/logout/command-object.js +11 -2
- package/dist/src/command-line/nx-cloud/record/command-object.js +1 -1
- package/dist/src/command-line/nx-cloud/start-ci-run/command-object.js +1 -1
- package/dist/src/command-line/nx-cloud/start-nx-agents/command-object.js +1 -1
- package/dist/src/command-line/release/changelog.js +6 -2
- package/dist/src/command-line/release/version/version-actions.js +2 -1
- package/dist/src/command-line/show/show-target/info.d.ts +1 -1
- package/dist/src/command-line/show/show-target/info.js +4 -4
- package/dist/src/core/graph/favicon.ico +0 -0
- package/dist/src/core/graph/main.js +1 -1
- package/dist/src/daemon/server/project-graph-incremental-recomputation.js +3 -1
- package/dist/src/executors/run-commands/running-tasks.js +7 -0
- package/dist/src/executors/run-commands/schema.json +1 -1
- package/dist/src/native/index.js +12 -17
- package/dist/src/native/nx.wasm32-wasi.debug.wasm +0 -0
- package/dist/src/native/nx.wasm32-wasi.wasm +0 -0
- package/dist/src/nx-cloud/update-manager.d.ts +2 -0
- package/dist/src/nx-cloud/utilities/client.d.ts +1 -0
- package/dist/src/nx-cloud/utilities/client.js +5 -0
- package/dist/src/plugins/js/project-graph/build-dependencies/build-dependencies.js +2 -1
- package/dist/src/plugins/js/utils/register.js +3 -2
- package/dist/src/plugins/js/utils/typescript.js +3 -2
- package/dist/src/project-graph/utils/retrieve-workspace-files.js +2 -2
- package/dist/src/tasks-runner/life-cycles/dynamic-run-many-terminal-output-life-cycle.js +34 -13
- package/dist/src/tasks-runner/life-cycles/dynamic-run-one-terminal-output-life-cycle.js +26 -5
- package/dist/src/tasks-runner/life-cycles/static-run-many-terminal-output-life-cycle.js +1 -1
- package/dist/src/tasks-runner/life-cycles/static-run-one-terminal-output-life-cycle.js +1 -1
- package/dist/src/tasks-runner/life-cycles/summary-terminal-output-life-cycle.js +3 -3
- package/dist/src/tasks-runner/life-cycles/tui-summary-life-cycle.js +76 -39
- package/dist/src/tasks-runner/running-tasks/batch-process.d.ts +2 -2
- package/dist/src/tasks-runner/running-tasks/batch-process.js +1 -1
- package/dist/src/tasks-runner/task-orchestrator.d.ts +6 -3
- package/dist/src/tasks-runner/task-orchestrator.js +61 -29
- package/dist/src/utils/installation-directory.d.ts +8 -0
- package/dist/src/utils/installation-directory.js +13 -0
- package/dist/src/utils/package-manager.d.ts +2 -1
- package/dist/src/utils/package-manager.js +42 -12
- package/package.json +12 -12
|
@@ -5,7 +5,7 @@ export declare class BatchProcess {
|
|
|
5
5
|
private childProcess;
|
|
6
6
|
private executorName;
|
|
7
7
|
/**
|
|
8
|
-
* Whether the
|
|
8
|
+
* Whether the worker's output is written to the terminal as it streams.
|
|
9
9
|
* `summary` does not, and its life cycle cannot enforce that here: this
|
|
10
10
|
* class writes to `output` directly from a stream handler, so without being
|
|
11
11
|
* told it would print a whole batch into a run that asked for log paths.
|
|
@@ -79,7 +79,7 @@ export declare class BatchProcess {
|
|
|
79
79
|
private readonly captureNonce;
|
|
80
80
|
constructor(childProcess: ChildProcess, executorName: string,
|
|
81
81
|
/**
|
|
82
|
-
* Whether the
|
|
82
|
+
* Whether the worker's output is written to the terminal as it streams.
|
|
83
83
|
* `summary` does not, and its life cycle cannot enforce that here: this
|
|
84
84
|
* class writes to `output` directly from a stream handler, so without being
|
|
85
85
|
* told it would print a whole batch into a run that asked for log paths.
|
|
@@ -12,7 +12,7 @@ const batch_messages_1 = require("../batch/batch-messages");
|
|
|
12
12
|
class BatchProcess {
|
|
13
13
|
constructor(childProcess, executorName,
|
|
14
14
|
/**
|
|
15
|
-
* Whether the
|
|
15
|
+
* Whether the worker's output is written to the terminal as it streams.
|
|
16
16
|
* `summary` does not, and its life cycle cannot enforce that here: this
|
|
17
17
|
* class writes to `output` directly from a stream handler, so without being
|
|
18
18
|
* told it would print a whole batch into a run that asked for log paths.
|
|
@@ -73,8 +73,6 @@ export declare class TaskOrchestrator {
|
|
|
73
73
|
private cleanupPromise;
|
|
74
74
|
private signalHandlers;
|
|
75
75
|
private tasksWithPersistedOutput;
|
|
76
|
-
/** Batches whose worker log was handed to the life cycle, so it must survive. */
|
|
77
|
-
private announcedBatchLogs;
|
|
78
76
|
constructor(hasher: TaskHasher, initiatingProject: string | undefined, initiatingTasks: Task[], projectGraph: ProjectGraph, taskGraph: TaskGraph, nxJson: NxJsonConfiguration, options: NxArgs & DefaultTasksRunnerOptions, bail: boolean, daemon: DaemonClient,
|
|
79
77
|
/** What the user named; undefined means they named nothing. */
|
|
80
78
|
specifiedOutputStyle: OutputStyle | undefined,
|
|
@@ -162,9 +160,14 @@ export declare class TaskOrchestrator {
|
|
|
162
160
|
applyFromCacheOrRunBatch(doNotSkipCache: boolean, batch: Batch, groupId: number): Promise<TaskResult[]>;
|
|
163
161
|
private runBatchWave;
|
|
164
162
|
private runBatch;
|
|
163
|
+
/**
|
|
164
|
+
* Under the TUI, batch worker output reaches only the batch's pane, which
|
|
165
|
+
* closes with the batch (or the TUI, if pinned), so it is captured instead.
|
|
166
|
+
*/
|
|
167
|
+
private printsBatchOutput;
|
|
165
168
|
/**
|
|
166
169
|
* Tells the life cycle where the batch worker's own log is, when something
|
|
167
|
-
* failed and
|
|
170
|
+
* failed and its output was not printed as it streamed.
|
|
168
171
|
*
|
|
169
172
|
* The path is announced rather than the bytes copied into a task: one worker
|
|
170
173
|
* produces one log, it explains the batch rather than any single task, and a
|
|
@@ -195,8 +195,6 @@ class TaskOrchestrator {
|
|
|
195
195
|
// exit, and the paths that never spawn one write it inline. The backstop in
|
|
196
196
|
// postRunSteps consults this so a task's output is written exactly once.
|
|
197
197
|
this.tasksWithPersistedOutput = new Set();
|
|
198
|
-
/** Batches whose worker log was handed to the life cycle, so it must survive. */
|
|
199
|
-
this.announcedBatchLogs = new Set();
|
|
200
198
|
}
|
|
201
199
|
async init() {
|
|
202
200
|
this.setupSignalHandlers();
|
|
@@ -286,6 +284,9 @@ class TaskOrchestrator {
|
|
|
286
284
|
for (const task of Object.values(this.taskGraph.tasks)) {
|
|
287
285
|
if (!task.continuous && !this.completedTasks.has(task.id)) {
|
|
288
286
|
this.completedTasks.set(task.id, 'skipped');
|
|
287
|
+
if (this.tuiEnabled) {
|
|
288
|
+
this.options.lifeCycle.setTaskStatus(task.id, 2 /* NativeTaskStatus.Skipped */);
|
|
289
|
+
}
|
|
289
290
|
}
|
|
290
291
|
}
|
|
291
292
|
break;
|
|
@@ -782,8 +783,9 @@ class TaskOrchestrator {
|
|
|
782
783
|
async runBatch(batch, env, groupId) {
|
|
783
784
|
const runBatchStart = perf_hooks_1.performance.mark('TaskOrchestrator-run-batch:start');
|
|
784
785
|
let batchProcess;
|
|
786
|
+
let workerLogAnnounced = false;
|
|
785
787
|
try {
|
|
786
|
-
batchProcess = await this.forkedProcessTaskRunner.forkProcessForBatch(batch, this.projectGraph, this.fullTaskGraph, env,
|
|
788
|
+
batchProcess = await this.forkedProcessTaskRunner.forkProcessForBatch(batch, this.projectGraph, this.fullTaskGraph, env, this.printsBatchOutput());
|
|
787
789
|
// Stream output from batch process to the batch
|
|
788
790
|
batchProcess.onOutput((output) => {
|
|
789
791
|
this.options.lifeCycle.appendBatchOutput?.(batch.id, output);
|
|
@@ -837,7 +839,7 @@ class TaskOrchestrator {
|
|
|
837
839
|
if ((0, output_1.shouldGroupBatchOutput)()) {
|
|
838
840
|
this.renderBatchOutputSafely(batch.id, () => this.printGroupedBatchOutput(batch, taskResults, batchProcess.getCapturedOutputPath()));
|
|
839
841
|
}
|
|
840
|
-
this.announceBatchWorkerLog(batch.id, taskResults, batchProcess.getCapturedOutputPath());
|
|
842
|
+
workerLogAnnounced = this.announceBatchWorkerLog(batch.id, taskResults, batchProcess.getCapturedOutputPath());
|
|
841
843
|
return taskResults;
|
|
842
844
|
}
|
|
843
845
|
catch (e) {
|
|
@@ -855,7 +857,7 @@ class TaskOrchestrator {
|
|
|
855
857
|
};
|
|
856
858
|
});
|
|
857
859
|
await batchProcess?.flushCapturedOutput();
|
|
858
|
-
this.announceBatchWorkerLog(batch.id, taskResults, batchProcess?.getCapturedOutputPath());
|
|
860
|
+
workerLogAnnounced = this.announceBatchWorkerLog(batch.id, taskResults, batchProcess?.getCapturedOutputPath());
|
|
859
861
|
// The worker died without reporting results, so nothing was attributed to
|
|
860
862
|
// a task and no per-task output ran. Everything it wrote went to
|
|
861
863
|
// stdout/stderr, held back under grouping - surface it as one fold. Under
|
|
@@ -882,38 +884,45 @@ class TaskOrchestrator {
|
|
|
882
884
|
// Kept only when something failed and the log was announced; an all-green
|
|
883
885
|
// batch's chatter explains nothing and would sit in `batchOutputs/` until
|
|
884
886
|
// the sweep.
|
|
885
|
-
if (!
|
|
887
|
+
if (!workerLogAnnounced) {
|
|
886
888
|
batchProcess?.discardCapturedOutput();
|
|
887
889
|
}
|
|
888
890
|
const runBatchEnd = perf_hooks_1.performance.mark('TaskOrchestrator-run-batch:end');
|
|
889
891
|
perf_hooks_1.performance.measure('TaskOrchestrator-run-batch', runBatchStart.name, runBatchEnd.name);
|
|
890
892
|
}
|
|
891
893
|
}
|
|
894
|
+
/**
|
|
895
|
+
* Under the TUI, batch worker output reaches only the batch's pane, which
|
|
896
|
+
* closes with the batch (or the TUI, if pinned), so it is captured instead.
|
|
897
|
+
*/
|
|
898
|
+
printsBatchOutput() {
|
|
899
|
+
return (0, output_1.printsTaskOutput)(this.resolvedOutputStyle) && !this.tuiEnabled;
|
|
900
|
+
}
|
|
892
901
|
/**
|
|
893
902
|
* Tells the life cycle where the batch worker's own log is, when something
|
|
894
|
-
* failed and
|
|
903
|
+
* failed and its output was not printed as it streamed.
|
|
895
904
|
*
|
|
896
905
|
* The path is announced rather than the bytes copied into a task: one worker
|
|
897
906
|
* produces one log, it explains the batch rather than any single task, and a
|
|
898
907
|
* task's own output file is read back verbatim on a cache hit.
|
|
899
908
|
*/
|
|
900
909
|
announceBatchWorkerLog(batchId, results, capturedOutputPath) {
|
|
901
|
-
if (!capturedOutputPath ||
|
|
902
|
-
return;
|
|
910
|
+
if (!capturedOutputPath || this.printsBatchOutput()) {
|
|
911
|
+
return false;
|
|
903
912
|
}
|
|
904
913
|
const failed = results.some((r) => batchWorkerLogExplains(r.status));
|
|
905
914
|
if (!failed) {
|
|
906
|
-
return;
|
|
915
|
+
return false;
|
|
907
916
|
}
|
|
908
917
|
// The path is minted when the file is opened, before any byte reaches it,
|
|
909
918
|
// so a capture that failed on its first write leaves one that exists and is
|
|
910
919
|
// empty. Announcing that offers the reader an address holding nothing.
|
|
911
920
|
// Checked after the flush, so the size is what a reader will actually see.
|
|
912
921
|
if (!hasContent(capturedOutputPath)) {
|
|
913
|
-
return;
|
|
922
|
+
return false;
|
|
914
923
|
}
|
|
915
|
-
this.announcedBatchLogs.add(batchId);
|
|
916
924
|
this.options.lifeCycle.batchOutputAvailable?.(batchId, capturedOutputPath);
|
|
925
|
+
return true;
|
|
917
926
|
}
|
|
918
927
|
/**
|
|
919
928
|
* Rendering a batch's output must never change the batch's results. A throw
|
|
@@ -1107,7 +1116,7 @@ class TaskOrchestrator {
|
|
|
1107
1116
|
async handleDiscreteWorkerFailure(doNotSkipCache, task, groupId, e) {
|
|
1108
1117
|
if (this.completedTasks.has(task.id))
|
|
1109
1118
|
return;
|
|
1110
|
-
const terminalOutput = e?.message ??
|
|
1119
|
+
const terminalOutput = e?.message ?? String(e);
|
|
1111
1120
|
// The worker rejected, so whatever the runner was going to leave on disk
|
|
1112
1121
|
// either never landed or can't be trusted. Hand the file back to
|
|
1113
1122
|
// postRunSteps so the failure itself is what the task's output path holds.
|
|
@@ -1164,29 +1173,52 @@ class TaskOrchestrator {
|
|
|
1164
1173
|
let resolveDiscreteExit;
|
|
1165
1174
|
const discreteExitHandled = new Promise((r) => (resolveDiscreteExit = r));
|
|
1166
1175
|
this.discreteTaskExitHandled.set(task.id, discreteExitHandled);
|
|
1167
|
-
this.detectTaskInvocationLoop(task);
|
|
1168
|
-
const childProcess = await this.runTask(task, streamOutput, env, temporaryOutputPath, pipeOutput);
|
|
1169
|
-
this.runningDiscreteTasks.set(task.id, {
|
|
1170
|
-
runningTask: childProcess,
|
|
1171
|
-
stopping: false,
|
|
1172
|
-
});
|
|
1173
|
-
const { code, terminalOutput } = await childProcess.getResults();
|
|
1174
|
-
const isStopping = this.runningDiscreteTasks.get(task.id)?.stopping ?? false;
|
|
1175
|
-
this.runningDiscreteTasks.delete(task.id);
|
|
1176
|
-
const result = {
|
|
1177
|
-
task,
|
|
1178
|
-
code,
|
|
1179
|
-
status: isStopping ? 'stopped' : code === 0 ? 'success' : 'failure',
|
|
1180
|
-
terminalOutput,
|
|
1181
|
-
};
|
|
1182
1176
|
try {
|
|
1177
|
+
let result;
|
|
1178
|
+
try {
|
|
1179
|
+
this.detectTaskInvocationLoop(task);
|
|
1180
|
+
const childProcess = await this.runTask(task, streamOutput, env, temporaryOutputPath, pipeOutput);
|
|
1181
|
+
this.runningDiscreteTasks.set(task.id, {
|
|
1182
|
+
runningTask: childProcess,
|
|
1183
|
+
stopping: false,
|
|
1184
|
+
});
|
|
1185
|
+
// Rejects if run-commands cannot start or a forked child died before
|
|
1186
|
+
// writing its log, so postRunSteps writes the log instead
|
|
1187
|
+
const { code, terminalOutput } = await childProcess
|
|
1188
|
+
.getResults()
|
|
1189
|
+
.catch((e) => {
|
|
1190
|
+
this.tasksWithPersistedOutput.delete(task.id);
|
|
1191
|
+
return { code: 1, terminalOutput: e?.message ?? String(e) };
|
|
1192
|
+
});
|
|
1193
|
+
const isStopping = this.runningDiscreteTasks.get(task.id)?.stopping ?? false;
|
|
1194
|
+
this.runningDiscreteTasks.delete(task.id);
|
|
1195
|
+
result = {
|
|
1196
|
+
task,
|
|
1197
|
+
code,
|
|
1198
|
+
status: isStopping ? 'stopped' : code === 0 ? 'success' : 'failure',
|
|
1199
|
+
terminalOutput,
|
|
1200
|
+
};
|
|
1201
|
+
}
|
|
1202
|
+
catch (e) {
|
|
1203
|
+
// Record the failure before the exit settles, since cleanup awaits the
|
|
1204
|
+
// exit to let endTasks finish before run() returns
|
|
1205
|
+
await this.handleDiscreteWorkerFailure(doNotSkipCache, task, groupId, e);
|
|
1206
|
+
return {
|
|
1207
|
+
task,
|
|
1208
|
+
code: 1,
|
|
1209
|
+
status: 'failure',
|
|
1210
|
+
terminalOutput: e?.message ?? String(e),
|
|
1211
|
+
};
|
|
1212
|
+
}
|
|
1213
|
+
// A failed postRunSteps rejects to the caller. dispatchDiscreteWorker
|
|
1214
|
+
// handles it, and handling it here too prints the failure twice
|
|
1183
1215
|
await this.postRunSteps([result], doNotSkipCache, groupId);
|
|
1216
|
+
return result;
|
|
1184
1217
|
}
|
|
1185
1218
|
finally {
|
|
1186
1219
|
this.discreteTaskExitHandled.delete(task.id);
|
|
1187
1220
|
resolveDiscreteExit();
|
|
1188
1221
|
}
|
|
1189
|
-
return result;
|
|
1190
1222
|
}
|
|
1191
1223
|
async runTask(task, streamOutput, env, temporaryOutputPath, pipeOutput) {
|
|
1192
1224
|
const shouldPrefix = streamOutput &&
|
|
@@ -1,2 +1,10 @@
|
|
|
1
1
|
export declare function getNxInstallationPath(root?: string): string;
|
|
2
2
|
export declare function getNxRequirePaths(root?: string): string[];
|
|
3
|
+
/**
|
|
4
|
+
* Resolves a package the workspace provides (typescript, a release version
|
|
5
|
+
* actions implementation, ...) from the workspace first, then from this nx
|
|
6
|
+
* installation. A package manager's global or content-addressed store links nx
|
|
7
|
+
* only to its own dependencies, so resolving from nx's location alone cannot
|
|
8
|
+
* see what the workspace installs.
|
|
9
|
+
*/
|
|
10
|
+
export declare function resolveFromWorkspace(specifier: string, root?: string): string;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getNxInstallationPath = getNxInstallationPath;
|
|
4
4
|
exports.getNxRequirePaths = getNxRequirePaths;
|
|
5
|
+
exports.resolveFromWorkspace = resolveFromWorkspace;
|
|
5
6
|
const path_1 = require("path");
|
|
6
7
|
const workspace_root_1 = require("./workspace-root");
|
|
7
8
|
function getNxInstallationPath(root = workspace_root_1.workspaceRoot) {
|
|
@@ -10,3 +11,15 @@ function getNxInstallationPath(root = workspace_root_1.workspaceRoot) {
|
|
|
10
11
|
function getNxRequirePaths(root = workspace_root_1.workspaceRoot) {
|
|
11
12
|
return [getNxInstallationPath(root), root];
|
|
12
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* Resolves a package the workspace provides (typescript, a release version
|
|
16
|
+
* actions implementation, ...) from the workspace first, then from this nx
|
|
17
|
+
* installation. A package manager's global or content-addressed store links nx
|
|
18
|
+
* only to its own dependencies, so resolving from nx's location alone cannot
|
|
19
|
+
* see what the workspace installs.
|
|
20
|
+
*/
|
|
21
|
+
function resolveFromWorkspace(specifier, root = workspace_root_1.workspaceRoot) {
|
|
22
|
+
return require.resolve(specifier, {
|
|
23
|
+
paths: [...getNxRequirePaths(root), __dirname],
|
|
24
|
+
});
|
|
25
|
+
}
|
|
@@ -25,7 +25,8 @@ export interface PackageManagerCommands {
|
|
|
25
25
|
ignoreScriptsFlag?: string;
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
28
|
-
* Detects
|
|
28
|
+
* Detects the package manager from the CLI override or directory lockfiles.
|
|
29
|
+
* Project directories in the current workspace can fall back to its root lockfile.
|
|
29
30
|
*/
|
|
30
31
|
export declare function detectPackageManager(dir?: string): PackageManager;
|
|
31
32
|
/**
|
|
@@ -65,20 +65,50 @@ function execPackageManagerSync(pm, args, options) {
|
|
|
65
65
|
return (0, child_process_1.execFileSync)(pm, args, options);
|
|
66
66
|
}
|
|
67
67
|
/**
|
|
68
|
-
* Detects
|
|
68
|
+
* Detects the package manager from the CLI override or directory lockfiles.
|
|
69
|
+
* Project directories in the current workspace can fall back to its root lockfile.
|
|
69
70
|
*/
|
|
70
|
-
function detectPackageManager(dir =
|
|
71
|
+
function detectPackageManager(dir = workspace_root_1.workspaceRoot) {
|
|
71
72
|
const nxJson = (0, configuration_1.readNxJson)();
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
73
|
+
if (nxJson.cli?.packageManager) {
|
|
74
|
+
return nxJson.cli.packageManager;
|
|
75
|
+
}
|
|
76
|
+
const dirsToCheck = isCurrentWorkspaceSubdirectory(dir)
|
|
77
|
+
? [dir, workspace_root_1.workspaceRoot]
|
|
78
|
+
: [dir];
|
|
79
|
+
for (const directory of dirsToCheck) {
|
|
80
|
+
if ((0, fs_1.existsSync)((0, path_1.join)(directory, 'bun.lockb')) ||
|
|
81
|
+
(0, fs_1.existsSync)((0, path_1.join)(directory, 'bun.lock'))) {
|
|
82
|
+
return 'bun';
|
|
83
|
+
}
|
|
84
|
+
if ((0, fs_1.existsSync)((0, path_1.join)(directory, 'yarn.lock'))) {
|
|
85
|
+
return 'yarn';
|
|
86
|
+
}
|
|
87
|
+
if ((0, fs_1.existsSync)((0, path_1.join)(directory, 'pnpm-lock.yaml'))) {
|
|
88
|
+
return 'pnpm';
|
|
89
|
+
}
|
|
90
|
+
if ((0, fs_1.existsSync)((0, path_1.join)(directory, 'package-lock.json'))) {
|
|
91
|
+
return 'npm';
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return detectInvokedPackageManager();
|
|
95
|
+
}
|
|
96
|
+
function isCurrentWorkspaceSubdirectory(dir) {
|
|
97
|
+
let directory = (0, path_1.resolve)(dir);
|
|
98
|
+
const relativePath = (0, path_1.relative)(workspace_root_1.workspaceRoot, directory);
|
|
99
|
+
if (!relativePath ||
|
|
100
|
+
relativePath === '..' ||
|
|
101
|
+
relativePath.startsWith(`..${path_1.sep}`) ||
|
|
102
|
+
(0, path_1.isAbsolute)(relativePath)) {
|
|
103
|
+
return false;
|
|
104
|
+
}
|
|
105
|
+
while ((0, path_1.relative)(workspace_root_1.workspaceRoot, directory) !== '') {
|
|
106
|
+
if (['nx.json', 'nx', 'nx.bat'].some((file) => (0, fileutils_1.fileExists)((0, path_1.join)(directory, file)))) {
|
|
107
|
+
return false;
|
|
108
|
+
}
|
|
109
|
+
directory = (0, path_1.dirname)(directory);
|
|
110
|
+
}
|
|
111
|
+
return true;
|
|
82
112
|
}
|
|
83
113
|
/**
|
|
84
114
|
* Detects which package manager was used to invoke the current command
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nx",
|
|
3
|
-
"version": "24.0.
|
|
3
|
+
"version": "24.0.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.",
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
"tmp": "0.2.7",
|
|
127
127
|
"tsconfig-paths": "4.2.0",
|
|
128
128
|
"tslib": "2.8.1",
|
|
129
|
-
"undici": "7.
|
|
129
|
+
"undici": "7.30.1",
|
|
130
130
|
"util-deprecate": "1.0.2",
|
|
131
131
|
"wcwidth": "1.0.1",
|
|
132
132
|
"which": "3.0.1",
|
|
@@ -150,16 +150,16 @@
|
|
|
150
150
|
}
|
|
151
151
|
},
|
|
152
152
|
"optionalDependencies": {
|
|
153
|
-
"@nx/nx-darwin-arm64": "24.0.
|
|
154
|
-
"@nx/nx-darwin-x64": "24.0.
|
|
155
|
-
"@nx/nx-freebsd-x64": "24.0.
|
|
156
|
-
"@nx/nx-linux-arm-gnueabihf": "24.0.
|
|
157
|
-
"@nx/nx-linux-arm64-gnu": "24.0.
|
|
158
|
-
"@nx/nx-linux-arm64-musl": "24.0.
|
|
159
|
-
"@nx/nx-linux-x64-gnu": "24.0.
|
|
160
|
-
"@nx/nx-linux-x64-musl": "24.0.
|
|
161
|
-
"@nx/nx-win32-arm64-msvc": "24.0.
|
|
162
|
-
"@nx/nx-win32-x64-msvc": "24.0.
|
|
153
|
+
"@nx/nx-darwin-arm64": "24.0.3",
|
|
154
|
+
"@nx/nx-darwin-x64": "24.0.3",
|
|
155
|
+
"@nx/nx-freebsd-x64": "24.0.3",
|
|
156
|
+
"@nx/nx-linux-arm-gnueabihf": "24.0.3",
|
|
157
|
+
"@nx/nx-linux-arm64-gnu": "24.0.3",
|
|
158
|
+
"@nx/nx-linux-arm64-musl": "24.0.3",
|
|
159
|
+
"@nx/nx-linux-x64-gnu": "24.0.3",
|
|
160
|
+
"@nx/nx-linux-x64-musl": "24.0.3",
|
|
161
|
+
"@nx/nx-win32-arm64-msvc": "24.0.3",
|
|
162
|
+
"@nx/nx-win32-x64-msvc": "24.0.3"
|
|
163
163
|
},
|
|
164
164
|
"nx-migrations": {
|
|
165
165
|
"migrations": "./migrations.json",
|