@@ -34,7 +34,7 @@ const getMissingParameters = (
34
34
const missingParameters : TypesGen . TemplateVersionParameter [ ] = [ ] ;
35
35
const requiredParameters : TypesGen . TemplateVersionParameter [ ] = [ ] ;
36
36
37
- templateParameters . forEach ( ( p ) => {
37
+ for ( const p of templateParameters ) {
38
38
// It is mutable and required. Mutable values can be changed after so we
39
39
// don't need to ask them if they are not required.
40
40
const isMutableAndRequired = p . mutable && p . required ;
@@ -44,7 +44,7 @@ const getMissingParameters = (
44
44
if ( isMutableAndRequired || isImmutable ) {
45
45
requiredParameters . push ( p ) ;
46
46
}
47
- } ) ;
47
+ }
48
48
49
49
for ( const parameter of requiredParameters ) {
50
50
// Check if there is a new value
@@ -68,9 +68,9 @@ const getMissingParameters = (
68
68
}
69
69
70
70
// Check if parameter "options" changed and we can't use old build parameters.
71
- templateParameters . forEach ( ( templateParameter ) => {
71
+ for ( const templateParameter of templateParameters ) {
72
72
if ( templateParameter . options . length === 0 ) {
73
- return ;
73
+ continue ;
74
74
}
75
75
76
76
// Check if there is a new value
@@ -86,7 +86,7 @@ const getMissingParameters = (
86
86
}
87
87
88
88
if ( ! buildParameter ) {
89
- return ;
89
+ continue ;
90
90
}
91
91
92
92
const matchingOption = templateParameter . options . find (
@@ -95,7 +95,8 @@ const getMissingParameters = (
95
95
if ( ! matchingOption ) {
96
96
missingParameters . push ( templateParameter ) ;
97
97
}
98
- } ) ;
98
+ }
99
+
99
100
return missingParameters ;
100
101
} ;
101
102
@@ -132,13 +133,11 @@ export const getURLWithSearchParams = (
132
133
}
133
134
134
135
const searchParams = new URLSearchParams ( ) ;
135
- const keys = Object . keys ( options ) as ( keyof SearchParamOptions ) [ ] ;
136
- keys . forEach ( ( key ) => {
137
- const value = options [ key ] ;
136
+ for ( const [ key , value ] of Object . entries ( options ) ) {
138
137
if ( value !== undefined && value !== "" ) {
139
138
searchParams . append ( key , value . toString ( ) ) ;
140
139
}
141
- } ) ;
140
+ }
142
141
143
142
const searchString = searchParams . toString ( ) ;
144
143
return searchString ? `${ basePath } ?${ searchString } ` : basePath ;
@@ -993,8 +992,8 @@ class ApiMethods {
993
992
let latestJobInfo : TypesGen . ProvisionerJob | undefined = undefined ;
994
993
995
994
while (
996
- ! [ "succeeded" , "canceled" ] . some ( ( status ) =>
997
- latestJobInfo ?. status . includes ( status ) ,
995
+ ! [ "succeeded" , "canceled" ] . some (
996
+ ( status ) => latestJobInfo ?. status . includes ( status ) ,
998
997
)
999
998
) {
1000
999
const { job } = await this . getWorkspaceBuildByNumber (
0 commit comments