Skip to content

Commit 37f46dc

Browse files
committed
chore(glob): iterate
1 parent aae2ba7 commit 37f46dc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/esm-post-process.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import fs from 'fs/promises';
22
import path from 'path';
3-
import glob from 'glob';
3+
import glob, { globIterate } from 'glob';
44

55
const rootDir = 'lib';
66

77
(async () => {
88
const matches = await glob(`${rootDir}/**/*.js`);
9+
910
for (const path of matches) {
1011
await buildEsm(path);
1112
}
@@ -17,8 +18,7 @@ const rootDir = 'lib';
1718
})();
1819

1920
(async () => {
20-
const matches = await glob(`${rootDir}/**/*.d.ts`);
21-
for (const path of matches) {
21+
for await (const path of globIterate(`${rootDir}/**/*.d.ts`)) {
2222
await buildEsm(path);
2323
}
2424

0 commit comments

Comments
 (0)