Skip to content

Commit ba9bbc8

Browse files
committed
chore: migrate to tinyglobby
1 parent 09fcbf7 commit ba9bbc8

File tree

3 files changed

+35
-27
lines changed

3 files changed

+35
-27
lines changed

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
"@types/babel__code-frame": "^7.0.6",
4141
"@types/debug": "^4.1.12",
4242
"@types/fs-extra": "^11.0.1",
43-
"@types/klaw": "^3.0.3",
4443
"@types/minimist": "^1.2.2",
4544
"@types/node": "^16.0.0",
4645
"@types/prompts": "^2.0.13",
@@ -52,7 +51,6 @@
5251
"fast-glob": "^3.2.7",
5352
"fast-json-stable-stringify": "^2.1.0",
5453
"fs-extra": "^11.1.0",
55-
"klaw": "^4.0.1",
5654
"lint-staged": "^11.0.0",
5755
"minimist": "^1.2.5",
5856
"npm-run-all2": "^5.0.0",
@@ -65,6 +63,7 @@
6563
"sort-package-json": "^2.10.0",
6664
"strip-ansi": "^7.0.0",
6765
"tiny-invariant": "^1.1.0",
66+
"tinyglobby": "^0.2.10",
6867
"typescript": "^5.5.3",
6968
"vite": "^5.4.14",
7069
"vite-plugin-checker": "workspace:*",

playground/config-no-runtime-in-build/__tests__/test.spec.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import fs from 'fs'
2-
import klaw from 'klaw'
2+
import { glob } from 'tinyglobby'
33
import path from 'path'
44
import { describe, expect, it } from 'vitest'
55

@@ -9,11 +9,9 @@ describe('config-no-runtime-code-in-build', () => {
99
describe.runIf(isBuild)('build', () => {
1010
it('should not contain plugin code in build artifacts', async () => {
1111
await sleepForServerReady()
12-
for await (const file of klaw(path.resolve(testDir, 'dist'))) {
13-
if (file.stats.isFile()) {
14-
const content = await fs.promises.readFile(file.path, 'utf-8')
15-
expect(content).not.toContain('vite-plugin-checker')
16-
}
12+
for await (const file of await glob(path.resolve(testDir, 'dist'), { onlyFiles: true })) {
13+
const content = await fs.promises.readFile(file, 'utf-8')
14+
expect(content).not.toContain('vite-plugin-checker')
1715
}
1816
})
1917
})

pnpm-lock.yaml

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

0 commit comments

Comments
 (0)