Skip to content

Commit f26139f

Browse files
committed
chore: update zip shell
1 parent c68571b commit f26139f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

scripts/extension-zip.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import path from 'node:path'
33
import { fileURLToPath } from 'node:url'
44
import archiver from 'archiver'
55
import ProgressBar from 'progress'
6-
import readdirGlob from 'readdir-glob'
6+
import { readdirGlob } from 'readdir-glob'
77

88
const __dirname = path.dirname(fileURLToPath(import.meta.url))
99
const INCLUDE_FILES = [
@@ -47,10 +47,9 @@ async function zip(filename: string, target: string) {
4747
}
4848
async function parseFileStats() {
4949
return new Promise<void>((resolve, reject) => {
50-
// @ts-expect-error skip
51-
const globber = readdirGlob.readdirGlob(targetPkgDir, { pattern: INCLUDE_FILES, skip: EXCLUDE_DIRS, mark: true, stat: true })
50+
const globber = readdirGlob(targetPkgDir, { pattern: INCLUDE_FILES, skip: EXCLUDE_DIRS, mark: true, stat: true })
5251
globber.on('match', (match) => {
53-
if (!match.stat.isDirectory())
52+
if (!match.stat?.isDirectory())
5453
status.total++
5554
})
5655
globber.on('error', (err) => {

0 commit comments

Comments
 (0)