@modernpoacher/deps 2.1.8 → 2.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/deps/execute.mjs +6 -10
- package/package.json +1 -1
package/bin/deps/execute.mjs
CHANGED
|
@@ -222,6 +222,10 @@ const filterDeps = (v) => !!v // de-falsy
|
|
|
222
222
|
|
|
223
223
|
const reduceDeps = (a, v) => a.includes(v) ? a : a.concat(v) // de-dupe
|
|
224
224
|
|
|
225
|
+
function * genDirsList (directories = []) {
|
|
226
|
+
while (directories.length) yield directories.shift()
|
|
227
|
+
}
|
|
228
|
+
|
|
225
229
|
function getPathList (directory) {
|
|
226
230
|
log('getPathList')
|
|
227
231
|
|
|
@@ -272,7 +276,7 @@ async function mapRevParseShowTopLevel (directory) {
|
|
|
272
276
|
}
|
|
273
277
|
}
|
|
274
278
|
|
|
275
|
-
async function iterate (
|
|
279
|
+
async function iterate (directory, registry, force, message, author) {
|
|
276
280
|
log('iterate')
|
|
277
281
|
|
|
278
282
|
if (directory) {
|
|
@@ -292,10 +296,6 @@ async function iterate ([directory, ...directories] = [], registry, force, messa
|
|
|
292
296
|
handleCommandError(e)
|
|
293
297
|
}
|
|
294
298
|
}
|
|
295
|
-
|
|
296
|
-
if (directories.length) {
|
|
297
|
-
await iterate(directories, registry, force, message, author)
|
|
298
|
-
}
|
|
299
299
|
}
|
|
300
300
|
|
|
301
301
|
async function iteratePath (directory, registry, force, message, author) {
|
|
@@ -309,11 +309,7 @@ async function iteratePath (directory, registry, force, message, author) {
|
|
|
309
309
|
if (pathList.length) {
|
|
310
310
|
const depsList = await getDepsList(pathList)
|
|
311
311
|
|
|
312
|
-
|
|
313
|
-
return (
|
|
314
|
-
await iterate(depsList, registry, force, message, author)
|
|
315
|
-
)
|
|
316
|
-
}
|
|
312
|
+
for (const d of genDirsList(depsList)) await iterate(d, registry, force, message, author)
|
|
317
313
|
}
|
|
318
314
|
}
|
|
319
315
|
}
|