Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/nx/src/command-line/release/publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ async function runPublishOnProjects(
nxJsonConfiguration: nxJson,
argv: process.argv,
});
const startTime = Date.now();

/**
* Run the relevant nx-release-publish executor on each of the selected projects.
Expand All @@ -299,6 +300,7 @@ async function runPublishOnProjects(
{},
extraOptions
);
const endTime = Date.now();

const publishProjectsResult: PublishProjectsResult = {};
for (const taskData of Object.values(taskResults)) {
Expand All @@ -311,6 +313,8 @@ async function runPublishOnProjects(
workspaceRoot,
nxJsonConfiguration: nxJson,
argv: process.argv,
startTime,
endTime,
});

return publishProjectsResult;
Expand Down
3 changes: 1 addition & 2 deletions packages/nx/src/project-graph/plugins/loaded-nx-plugin.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { ProjectGraph } from '../../config/project-graph';
import { readNxJson, type PluginConfiguration } from '../../config/nx-json';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are unused

import { type PluginConfiguration } from '../../config/nx-json';
import {
AggregateCreateNodesError,
isAggregateCreateNodesError,
Expand All @@ -15,7 +15,6 @@ import type {
PreTasksExecutionContext,
ProjectsMetadata,
} from './public-api';
import { createNodesFromFiles } from './utils';
import { isIsolationEnabled } from './isolation/enabled';
import { isDaemonEnabled } from '../../daemon/client/client';

Expand Down
2 changes: 2 additions & 0 deletions packages/nx/src/project-graph/plugins/public-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@ export type PostTasksExecutionContext = {
readonly nxJsonConfiguration: NxJsonConfiguration;
readonly taskResults: TaskResults;
readonly argv: string[];
readonly startTime: number;
readonly endTime: number;
};

export type PreTasksExecution<TOptions = unknown> = (
Expand Down
8 changes: 0 additions & 8 deletions packages/nx/src/tasks-runner/life-cycle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,6 @@ export interface TaskMetadata {
groupId: number;
}

interface RustRunningTask extends RunningTask {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was unused

getResults(): Promise<{ code: number; terminalOutput: string }>;

onExit(cb: (code: number, terminalOutput: string) => void): void;

kill(signal?: NodeJS.Signals): Promise<void> | void;
}

export interface LifeCycle {
startCommand?(parallel?: number): void | Promise<void>;

Expand Down
4 changes: 4 additions & 0 deletions packages/nx/src/tasks-runner/run-command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,7 @@ export async function runCommand(
argv: process.argv,
});

const startTime = Date.now();
const { taskResults, completed } = await runCommandForTasks(
projectsToRun,
currentProjectGraph,
Expand All @@ -456,6 +457,7 @@ export async function runCommand(
extraTargetDependencies,
extraOptions
);
const endTime = Date.now();

const exitCode = !completed
? signalToCode('SIGINT')
Expand All @@ -471,6 +473,8 @@ export async function runCommand(
workspaceRoot,
nxJsonConfiguration: nxJson,
argv: process.argv,
startTime,
endTime,
});

return exitCode;
Expand Down
Loading