Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
renovate
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
Renovate Bot
renovate
Commits
cb53e18d
Unverified
Commit
cb53e18d
authored
2 years ago
by
Gabriel-Ladzaretti
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
chore(util/exec): remove unneeded renaming related TODOs (#17399)
parent
bf378a46
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
lib/util/exec/common.ts
+1
-2
1 addition, 2 deletions
lib/util/exec/common.ts
lib/util/exec/types.ts
+0
-3
0 additions, 3 deletions
lib/util/exec/types.ts
test/exec-util.ts
+0
-5
0 additions, 5 deletions
test/exec-util.ts
with
1 addition
and
10 deletions
lib/util/exec/common.ts
+
1
−
2
View file @
cb53e18d
...
@@ -145,8 +145,7 @@ function kill(cp: ChildProcess, signal: NodeJS.Signals): boolean {
...
@@ -145,8 +145,7 @@ function kill(cp: ChildProcess, signal: NodeJS.Signals): boolean {
}
}
}
}
// TODO: rename #16653
export
const
rawExec
:
(
export
const
rawExec
:
(
cmd
:
string
,
cmd
:
string
,
opts
:
RawExecOptions
opts
:
RawExecOptions
)
=>
Promise
<
ExecResult
>
=
exec
;
// TODO: rename #16653
)
=>
Promise
<
ExecResult
>
=
exec
;
This diff is collapsed.
Click to expand it.
lib/util/exec/types.ts
+
0
−
3
View file @
cb53e18d
...
@@ -27,7 +27,6 @@ export interface DockerOptions {
...
@@ -27,7 +27,6 @@ export interface DockerOptions {
cwd
?:
Opt
<
string
>
;
cwd
?:
Opt
<
string
>
;
}
}
// TODO: rename #16653
export
interface
RawExecOptions
extends
ChildProcessSpawnOptions
{
export
interface
RawExecOptions
extends
ChildProcessSpawnOptions
{
// TODO: to be removed in #16655
// TODO: to be removed in #16655
/**
/**
...
@@ -38,7 +37,6 @@ export interface RawExecOptions extends ChildProcessSpawnOptions {
...
@@ -38,7 +37,6 @@ export interface RawExecOptions extends ChildProcessSpawnOptions {
cwd
?:
string
;
cwd
?:
string
;
}
}
// TODO: rename #16653
export
interface
ExecResult
{
export
interface
ExecResult
{
stdout
:
string
;
stdout
:
string
;
stderr
:
string
;
stderr
:
string
;
...
@@ -46,7 +44,6 @@ export interface ExecResult {
...
@@ -46,7 +44,6 @@ export interface ExecResult {
export
type
ExtraEnv
<
T
=
unknown
>
=
Record
<
string
,
T
>
;
export
type
ExtraEnv
<
T
=
unknown
>
=
Record
<
string
,
T
>
;
// TODO: rename #16653
export
interface
ExecOptions
{
export
interface
ExecOptions
{
cwd
?:
string
;
cwd
?:
string
;
cwdFile
?:
string
;
cwdFile
?:
string
;
...
...
This diff is collapsed.
Click to expand it.
test/exec-util.ts
+
0
−
5
View file @
cb53e18d
...
@@ -8,7 +8,6 @@ import { mockedFunction } from './util';
...
@@ -8,7 +8,6 @@ import { mockedFunction } from './util';
jest
.
mock
(
'
../lib/util/exec/common
'
);
jest
.
mock
(
'
../lib/util/exec/common
'
);
// TODO: rename #16653
export
type
ExecResult
=
{
stdout
:
string
;
stderr
:
string
}
|
Error
;
export
type
ExecResult
=
{
stdout
:
string
;
stderr
:
string
}
|
Error
;
export
const
exec
=
mockedFunction
(
_exec
);
export
const
exec
=
mockedFunction
(
_exec
);
...
@@ -18,10 +17,8 @@ export interface ExecSnapshot {
...
@@ -18,10 +17,8 @@ export interface ExecSnapshot {
options
?:
RawExecOptions
|
null
|
undefined
;
options
?:
RawExecOptions
|
null
|
undefined
;
}
}
// TODO: rename #16653
export
type
ExecSnapshots
=
ExecSnapshot
[];
export
type
ExecSnapshots
=
ExecSnapshot
[];
// TODO: rename #16653
function
execSnapshot
(
cmd
:
string
,
options
?:
RawExecOptions
):
ExecSnapshot
{
function
execSnapshot
(
cmd
:
string
,
options
?:
RawExecOptions
):
ExecSnapshot
{
const
snapshot
=
{
const
snapshot
=
{
cmd
,
cmd
,
...
@@ -42,7 +39,6 @@ function execSnapshot(cmd: string, options?: RawExecOptions): ExecSnapshot {
...
@@ -42,7 +39,6 @@ function execSnapshot(cmd: string, options?: RawExecOptions): ExecSnapshot {
const
defaultExecResult
=
{
stdout
:
''
,
stderr
:
''
};
const
defaultExecResult
=
{
stdout
:
''
,
stderr
:
''
};
// TODO: rename #16653
export
function
mockExecAll
(
export
function
mockExecAll
(
execResult
:
ExecResult
=
defaultExecResult
execResult
:
ExecResult
=
defaultExecResult
):
ExecSnapshots
{
):
ExecSnapshots
{
...
@@ -57,7 +53,6 @@ export function mockExecAll(
...
@@ -57,7 +53,6 @@ export function mockExecAll(
return
snapshots
;
return
snapshots
;
}
}
// TODO: rename #16653
export
function
mockExecSequence
(
execResults
:
ExecResult
[]):
ExecSnapshots
{
export
function
mockExecSequence
(
execResults
:
ExecResult
[]):
ExecSnapshots
{
const
snapshots
:
ExecSnapshots
=
[];
const
snapshots
:
ExecSnapshots
=
[];
execResults
.
forEach
((
execResult
)
=>
{
execResults
.
forEach
((
execResult
)
=>
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment