@@ -96,9 +96,9 @@ module.exports._getDependencies = function(config = {}) {
96
96
97
97
const resolvedDependencies = [ ] ;
98
98
99
- for ( const dep of dependencies ) {
99
+ for ( const dependency of dependencies ) {
100
100
const result = cabinet ( {
101
- partial : dep ,
101
+ partial : dependency ,
102
102
filename : config . filename ,
103
103
directory : config . directory ,
104
104
ast : precinct . ast ,
@@ -111,16 +111,16 @@ module.exports._getDependencies = function(config = {}) {
111
111
} ) ;
112
112
113
113
if ( ! result ) {
114
- debug ( `skipping an empty filepath resolution for partial: ${ dep } ` ) ;
115
- config . nonExistent . push ( dep ) ;
114
+ debug ( `skipping an empty filepath resolution for partial: ${ dependency } ` ) ;
115
+ config . nonExistent . push ( dependency ) ;
116
116
continue ;
117
117
}
118
118
119
119
const exists = fs . existsSync ( result ) ;
120
120
121
121
if ( ! exists ) {
122
- config . nonExistent . push ( dep ) ;
123
- debug ( `skipping non-empty but non-existent resolution: ${ result } for partial: ${ dep } ` ) ;
122
+ config . nonExistent . push ( dependency ) ;
123
+ debug ( `skipping non-empty but non-existent resolution: ${ result } for partial: ${ dependency } ` ) ;
124
124
continue ;
125
125
}
126
126
@@ -159,16 +159,16 @@ function traverse(config = {}) {
159
159
debug ( `filtered number of dependencies: ${ dependencies . length } ` ) ;
160
160
}
161
161
162
- for ( const dep of dependencies ) {
162
+ for ( const dependency of dependencies ) {
163
163
const localConfig = config . clone ( ) ;
164
- localConfig . filename = dep ;
164
+ localConfig . filename = dependency ;
165
165
166
166
if ( localConfig . isListForm ) {
167
167
for ( const item of traverse ( localConfig ) ) {
168
168
subTree . add ( item ) ;
169
169
}
170
170
} else {
171
- subTree [ dep ] = traverse ( localConfig ) ;
171
+ subTree [ dependency ] = traverse ( localConfig ) ;
172
172
}
173
173
}
174
174
@@ -187,7 +187,9 @@ function dedupeNonExistent(nonExistent) {
187
187
const deduped = new Set ( nonExistent ) ;
188
188
nonExistent . length = deduped . size ;
189
189
190
- for ( const { elem, i } of Object . entries ( deduped ) ) {
190
+ let i = 0 ;
191
+ for ( const elem of deduped ) {
191
192
nonExistent [ i ] = elem ;
193
+ i ++ ;
192
194
}
193
195
}
0 commit comments