@@ -39,15 +39,15 @@ interface ITestCase extends ITestSetup {
39
39
}
40
40
41
41
function createPacoteOptions ( source : Object ) : Object {
42
- let options : { [ index : string ] : any } = { } ;
42
+ const options : { [ index : string ] : any } = { } ;
43
43
npmconfig . read ( ) . forEach ( ( value : any , key : string ) => {
44
44
// replace env ${VARS} in strings with the process.env value
45
45
options [ key ] = typeof value !== 'string' ? value : value . replace ( / \$ { ( [ ^ } ] + ) } / , ( _ , envVar ) => process . env [ envVar ] ) ;
46
46
} ) ;
47
47
48
48
// Copy any original source keys over our defaults
49
- for ( let key in source ) {
50
- options [ key ] = source [ key ] ;
49
+ for ( const key in source ) {
50
+ options [ key ] = source [ key ] ;
51
51
}
52
52
return options ;
53
53
}
@@ -121,13 +121,13 @@ describe("pacoteService", () => {
121
121
const testInjector = createTestInjector ( opts ) ;
122
122
123
123
if ( opts . isLocalPackage ) {
124
- const oldPath = path . resolve ;
125
- sandboxInstance . stub ( path , "resolve" ) . callsFake ( ( value :string ) => {
126
- if ( value === packageName ) {
127
- return fullPath ;
128
- }
129
- return oldPath ( value ) ;
130
- } ) ;
124
+ const oldPath = path . resolve ;
125
+ sandboxInstance . stub ( path , "resolve" ) . callsFake ( ( value :string ) => {
126
+ if ( value === packageName ) {
127
+ return fullPath ;
128
+ }
129
+ return oldPath ( value ) ;
130
+ } ) ;
131
131
}
132
132
133
133
return testInjector . resolve < IPacoteService > ( "pacoteService" ) ;
0 commit comments