Skip to content

Commit d6c6dcc

Browse files
committed
Fix glob usage
1 parent 0781d13 commit d6c6dcc

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

registry/lib/globs.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ declare const Globs: {
151151
globStreamLicenses(
152152
dirname: string,
153153
options?: GlobOptions
154-
): Promise<NodeJS.ReadableStream>
154+
): NodeJS.ReadableStream
155155
}
156156
declare namespace Globs {
157157
export { GlobOptions }

registry/lib/globs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function getFastGlob() {
2020
}
2121

2222
/*@__NO_SIDE_EFFECTS__*/
23-
async function globStreamLicenses(dirname, options) {
23+
function globStreamLicenses(dirname, options) {
2424
const {
2525
ignore: ignoreOpt,
2626
ignoreOriginals,
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export { parallelMap } from 'streaming-iterables'
1+
export { parallelMap, transform } from 'streaming-iterables'

scripts/lib/templates.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ async function getLicenseActions(pkgPath) {
7272
license: LICENSE_CONTENT
7373
}
7474
const actions = []
75-
for (const filepath of await globStreamLicenses(pkgPath, {
75+
for await (const filepath of globStreamLicenses(pkgPath, {
7676
recursive: true
7777
})) {
7878
actions.push([filepath, licenseData])

scripts/make-npm-override.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ function getCompatData(props) {
128128
}
129129

130130
async function readLicenses(dirname) {
131-
const stream = await globStreamLicenses(dirname)
131+
const stream = globStreamLicenses(dirname)
132132
const results = []
133133
for await (const license of transform(
134134
8, // Concurrency level.

scripts/update-licenses.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const { parallelForEach } = require('@socketsecurity/registry/lib/streams')
99
const { LICENSE, LICENSE_CONTENT, UTF8, ignoreGlobs, rootPath } = constants
1010

1111
void (async () => {
12-
const stream = await globStreamLicenses(rootPath, {
12+
const stream = globStreamLicenses(rootPath, {
1313
recursive: true,
1414
ignoreOriginals: true,
1515
ignore: [LICENSE, 'scripts/templates', ...ignoreGlobs]

0 commit comments

Comments
 (0)