Skip to content

Commit

Permalink
chore: migrate to tinyglobby
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Feb 16, 2025
1 parent 09fcbf7 commit ba9bbc8
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 27 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
"@types/babel__code-frame": "^7.0.6",
"@types/debug": "^4.1.12",
"@types/fs-extra": "^11.0.1",
"@types/klaw": "^3.0.3",
"@types/minimist": "^1.2.2",
"@types/node": "^16.0.0",
"@types/prompts": "^2.0.13",
Expand All @@ -52,7 +51,6 @@
"fast-glob": "^3.2.7",
"fast-json-stable-stringify": "^2.1.0",
"fs-extra": "^11.1.0",
"klaw": "^4.0.1",
"lint-staged": "^11.0.0",
"minimist": "^1.2.5",
"npm-run-all2": "^5.0.0",
Expand All @@ -65,6 +63,7 @@
"sort-package-json": "^2.10.0",
"strip-ansi": "^7.0.0",
"tiny-invariant": "^1.1.0",
"tinyglobby": "^0.2.10",
"typescript": "^5.5.3",
"vite": "^5.4.14",
"vite-plugin-checker": "workspace:*",
Expand Down
10 changes: 4 additions & 6 deletions playground/config-no-runtime-in-build/__tests__/test.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import fs from 'fs'
import klaw from 'klaw'
import { glob } from 'tinyglobby'
import path from 'path'
import { describe, expect, it } from 'vitest'

Expand All @@ -9,11 +9,9 @@ describe('config-no-runtime-code-in-build', () => {
describe.runIf(isBuild)('build', () => {
it('should not contain plugin code in build artifacts', async () => {
await sleepForServerReady()
for await (const file of klaw(path.resolve(testDir, 'dist'))) {
if (file.stats.isFile()) {
const content = await fs.promises.readFile(file.path, 'utf-8')
expect(content).not.toContain('vite-plugin-checker')
}
for await (const file of await glob(path.resolve(testDir, 'dist'), { onlyFiles: true })) {
const content = await fs.promises.readFile(file, 'utf-8')
expect(content).not.toContain('vite-plugin-checker')
}
})
})
Expand Down
49 changes: 30 additions & 19 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ba9bbc8

Please sign in to comment.