Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update tinyglobby and use isDynamicPattern #6600

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@vite-pwa/vitepress": "^0.5.0",
"@vitejs/plugin-vue": "^5.1.2",
"https-localhost": "^4.7.1",
"tinyglobby": "^0.2.6",
"tinyglobby": "https://pkg.pr.new/tinyglobby@1f1fa12",
"unocss": "^0.62.0",
"unplugin-vue-components": "^0.27.4",
"vite": "^5.2.8",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"rollup-plugin-dts": "^6.1.1",
"rollup-plugin-esbuild": "^6.1.1",
"rollup-plugin-license": "^3.5.2",
"tinyglobby": "^0.2.6",
"tinyglobby": "https://pkg.pr.new/tinyglobby@1f1fa12",
"tsx": "^4.17.0",
"typescript": "^5.5.4",
"vite": "^5.4.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"flatted": "^3.3.1",
"pathe": "^1.1.2",
"sirv": "^2.0.4",
"tinyglobby": "^0.2.6",
"tinyglobby": "https://pkg.pr.new/tinyglobby@1f1fa12",
"tinyrainbow": "^1.2.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/vitest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@
"prompts": "^2.4.2",
"strip-ansi": "^7.1.0",
"strip-literal": "^2.1.0",
"tinyglobby": "^0.2.6",
"tinyglobby": "https://pkg.pr.new/tinyglobby@1f1fa12",
"ws": "^8.18.0"
}
}
77 changes: 0 additions & 77 deletions packages/vitest/src/node/workspace/fast-glob-pattern.ts

This file was deleted.

3 changes: 1 addition & 2 deletions packages/vitest/src/node/workspace/resolveWorkspace.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import { existsSync, promises as fs } from 'node:fs'
import { isMainThread } from 'node:worker_threads'
import { dirname, relative, resolve } from 'pathe'
import { type GlobOptions, glob } from 'tinyglobby'
import { type GlobOptions, glob, isDynamicPattern } from 'tinyglobby'
import { mergeConfig } from 'vite'
import type { Vitest } from '../core'
import type { UserConfig, UserWorkspaceConfig, WorkspaceProjectConfiguration } from '../types/config'
import type { WorkspaceProject } from '../workspace'
import { initializeProject } from '../workspace'
import { configFiles as defaultConfigFiles } from '../../constants'
import { isDynamicPattern } from './fast-glob-pattern'

export async function resolveWorkspace(
vitest: Vitest,
Expand Down
48 changes: 29 additions & 19 deletions pnpm-lock.yaml

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

32 changes: 32 additions & 0 deletions test/reporters/repro.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import path from 'node:path'
import { glob } from 'tinyglobby'

// [repro]
// node test/reporters/repro.mjs # => freeze
// rm -rf test/reporters/node_modules
// node test/reporters/repro.mjs # => OK

// globFiles in packages/vitest/src/node/workspace.ts
const args = {
include: ['../tests/reporters.spec.ts'],
exclude: [
// '../**/node_modules/**', // <-- ignore also needs to be prefixed?
'**/node_modules/**',
'**/dist/**',
'**/cypress/**',
'**/.{idea,git,cache,output,temp}/**',
'**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build,eslint,prettier}.config.*',
],
cwd: path.join(import.meta.dirname, './reportTest2'),
}

console.log('[args]', args)

Check failure on line 23 in test/reporters/repro.mjs

View workflow job for this annotation

GitHub Actions / Lint: node-latest, ubuntu-latest

Unexpected console statement
const result = await glob(args.include, {
absolute: true,
dot: true,
cwd: args.cwd,
ignore: args.exclude,
expandDirectories: false,
})

console.log('[result]', result)

Check failure on line 32 in test/reporters/repro.mjs

View workflow job for this annotation

GitHub Actions / Lint: node-latest, ubuntu-latest

Unexpected console statement
Loading