Skip to content

Commit a5834aa

Browse files
authored
chore: remove is-glob dependency (#643)
1 parent ef18aa1 commit a5834aa

File tree

3 files changed

+4
-13
lines changed

3 files changed

+4
-13
lines changed

‎package-lock.json

+2-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on .

‎package.json

-2
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
"@apidevtools/json-schema-ref-parser": "^11.5.5",
5252
"@types/json-schema": "^7.0.15",
5353
"@types/lodash": "^4.17.7",
54-
"is-glob": "^4.0.3",
5554
"js-yaml": "^4.1.0",
5655
"lodash": "^4.17.21",
5756
"minimist": "^1.2.8",
@@ -60,7 +59,6 @@
6059
},
6160
"devDependencies": {
6261
"@types/cli-color": "^2.0.6",
63-
"@types/is-glob": "^4.0.4",
6462
"@types/js-yaml": "^4.0.9",
6563
"@types/minimist": "^1.2.5",
6664
"@types/node": "^20.12.7",

‎src/cli.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22

33
import minimist from 'minimist'
44
import {readFileSync, writeFileSync, existsSync, lstatSync, readdirSync, mkdirSync} from 'fs'
5-
import {glob} from 'tinyglobby'
6-
import isGlob from 'is-glob'
5+
import {glob, isDynamicPattern} from 'tinyglobby'
76
import {join, resolve, dirname} from 'path'
87
import {compile, DEFAULT_OPTIONS, Options} from './index'
98
import {pathTransform, error, parseFileAsJSONSchema, justName} from './utils'
@@ -39,7 +38,7 @@ async function main(argv: minimist.ParsedArgs) {
3938
const argIn: string = argv._[0] || argv.input
4039
const argOut: string | undefined = argv._[1] || argv.output // the output can be omitted so this can be undefined
4140

42-
const ISGLOB = isGlob(argIn)
41+
const ISGLOB = argIn && isDynamicPattern(argIn)
4342
const ISDIR = isDir(argIn)
4443

4544
if ((ISGLOB || ISDIR) && argOut && argOut.includes('.d.ts')) {

0 commit comments

Comments
 (0)