Skip to content

Commit

Permalink
chore(util/exec): remove unneeded renaming related TODOs (#17399)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel-Ladzaretti committed Aug 25, 2022
1 parent bf378a4 commit cb53e18
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
3 changes: 1 addition & 2 deletions lib/util/exec/common.ts
Expand Up @@ -145,8 +145,7 @@ function kill(cp: ChildProcess, signal: NodeJS.Signals): boolean {
}
}

// TODO: rename #16653
export const rawExec: (
cmd: string,
opts: RawExecOptions
) => Promise<ExecResult> = exec; // TODO: rename #16653
) => Promise<ExecResult> = exec;
3 changes: 0 additions & 3 deletions lib/util/exec/types.ts
Expand Up @@ -27,7 +27,6 @@ export interface DockerOptions {
cwd?: Opt<string>;
}

// TODO: rename #16653
export interface RawExecOptions extends ChildProcessSpawnOptions {
// TODO: to be removed in #16655
/**
Expand All @@ -38,15 +37,13 @@ export interface RawExecOptions extends ChildProcessSpawnOptions {
cwd?: string;
}

// TODO: rename #16653
export interface ExecResult {
stdout: string;
stderr: string;
}

export type ExtraEnv<T = unknown> = Record<string, T>;

// TODO: rename #16653
export interface ExecOptions {
cwd?: string;
cwdFile?: string;
Expand Down
5 changes: 0 additions & 5 deletions test/exec-util.ts
Expand Up @@ -8,7 +8,6 @@ import { mockedFunction } from './util';

jest.mock('../lib/util/exec/common');

// TODO: rename #16653
export type ExecResult = { stdout: string; stderr: string } | Error;

export const exec = mockedFunction(_exec);
Expand All @@ -18,10 +17,8 @@ export interface ExecSnapshot {
options?: RawExecOptions | null | undefined;
}

// TODO: rename #16653
export type ExecSnapshots = ExecSnapshot[];

// TODO: rename #16653
function execSnapshot(cmd: string, options?: RawExecOptions): ExecSnapshot {
const snapshot = {
cmd,
Expand All @@ -42,7 +39,6 @@ function execSnapshot(cmd: string, options?: RawExecOptions): ExecSnapshot {

const defaultExecResult = { stdout: '', stderr: '' };

// TODO: rename #16653
export function mockExecAll(
execResult: ExecResult = defaultExecResult
): ExecSnapshots {
Expand All @@ -57,7 +53,6 @@ export function mockExecAll(
return snapshots;
}

// TODO: rename #16653
export function mockExecSequence(execResults: ExecResult[]): ExecSnapshots {
const snapshots: ExecSnapshots = [];
execResults.forEach((execResult) => {
Expand Down

0 comments on commit cb53e18

Please sign in to comment.