Skip to content

Commit 1fa0fcb

Browse files
chore: use tinyglobby instead of glob (#2880)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
1 parent 801006a commit 1fa0fcb

File tree

5 files changed

+32
-32
lines changed

5 files changed

+32
-32
lines changed

gpt/generate.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// @ts-check
22

33
import fs from 'node:fs'
4-
import { glob } from 'glob'
4+
import { glob } from 'tinyglobby'
55

66
const outputPath = './gpt/db.json'
77
const packages = []
@@ -21,7 +21,7 @@ Promise.resolve()
2121
packages.push(pkg)
2222

2323
return glob(`./${dir}/src/**/*`, {
24-
nodir: true,
24+
onlyFiles: true,
2525
}).then((files) => {
2626
files.forEach((file) => {
2727
const content = fs.readFileSync(file, 'utf8')
@@ -58,7 +58,7 @@ Promise.resolve()
5858
examples.push(example)
5959

6060
return glob(`./${dir}/src/**/*`, {
61-
nodir: true,
61+
onlyFiles: true,
6262
}).then((files) => {
6363
files.forEach((file) => {
6464
const content = fs.readFileSync(file, 'utf8')

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"eslint": "^9.15.0",
4242
"eslint-plugin-react-hooks": "^5.1.0-rc-fb9a90fa48-20240614",
4343
"eslint-plugin-unused-imports": "^4.1.4",
44-
"glob": "^11.0.0",
44+
"tinyglobby": "^0.2.10",
4545
"jsdom": "^25.0.1",
4646
"nx": "^20.1.3",
4747
"prettier": "^3.3.3",

packages/create-router/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"@types/which": "^3.0.4",
4040
"commander": "^12.1.0",
4141
"cross-spawn": "^7.0.6",
42-
"fast-glob": "^3.3.2",
42+
"tinyglobby": "^0.2.10",
4343
"picocolors": "^1.1.1",
4444
"unbuild": "^2.0.0",
4545
"validate-npm-package-name": "^5.0.1",

packages/create-router/src/utils/copyTemplateFiles.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { copyFile, mkdir, readdir, stat } from 'node:fs/promises'
22
import { resolve } from 'node:path'
3-
import fastGlob from 'fast-glob'
3+
import { glob } from 'tinyglobby'
44
import { TEMPLATES_FOLDER } from '../constants'
55

66
/**
@@ -18,7 +18,7 @@ export async function copyTemplateFiles({
1818
sourceFolder,
1919
targetFolder,
2020
}: CopyTemplateFilesParams) {
21-
const files = await fastGlob.glob(file, {
21+
const files = await glob(file, {
2222
cwd: resolve(TEMPLATES_FOLDER, sourceFolder),
2323
onlyFiles: false,
2424
})

pnpm-lock.yaml

Lines changed: 25 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)