-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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)!: migrate fast-glob
to tinyglobby
#18243
Merged
Merged
Changes from 10 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
c08bd72
chore(deps): add `tinyglobby` in `packages/vite`
3f4a699
chore(deps): replace `fast-glob` with `tinyglobby`
2fb69ab
chore(deps): use `tinyglobby` in `be-integration`
90cc406
chore(deps): use `tinyglobby` in `playground/css`
70ce3a5
Merge 'upstream/main' into 'fast-glob-to-tinyglobby'
7c04f36
chore(deps): bump `tinyglobby` to 0.2.7
28a4b52
chore(deps): update the first glob argument
70ffc04
chore(deps): migrate remaining `fast-glob` usages
21e759e
chore(deps): update `fast-glob` references in docs
24a808a
chore(deps): fix failing tests
4799f70
chore(deps): fix another test failure
e6e0ab0
chore(deps): bump `tinyglobby`
04413fe
Merge branch 'main' of https://github.com/vitejs/vite into fast-glob-…
a19b70a
chore(deps): update the comment that mentions fast-glob
dbd3b0a
chore(deps): improve globbing in css.ts
ab2962f
Merge branch 'main' of https://github.com/vitejs/vite into fast-glob-…
905f3ee
chore(deps): simplify ignored pattern
d592bda
Merge branch 'main' of https://github.com/vitejs/vite into fast-glob-…
8a72fee
chore(deps): revert the change
866a27c
chore(deps): simplify globbing (again)
c5be962
Merge 'upstream/main' into 'fast-glob-to-tinyglobby'
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,6 @@ import fs from 'node:fs' | |
import fsp from 'node:fs/promises' | ||
import path from 'node:path' | ||
import { performance } from 'node:perf_hooks' | ||
import glob from 'fast-glob' | ||
import type { | ||
BuildContext, | ||
Loader, | ||
|
@@ -13,6 +12,7 @@ import type { | |
import esbuild, { formatMessages, transform } from 'esbuild' | ||
import type { PartialResolvedId } from 'rollup' | ||
import colors from 'picocolors' | ||
import { glob, isDynamicPattern } from 'tinyglobby' | ||
import { | ||
CSS_LANGS_RE, | ||
JS_TYPES_RE, | ||
|
@@ -332,12 +332,13 @@ function orderedDependencies(deps: Record<string, string>) { | |
|
||
function globEntries(pattern: string | string[], environment: ScanEnvironment) { | ||
const resolvedPatterns = arraify(pattern) | ||
if (resolvedPatterns.every((str) => !glob.isDynamicPattern(str))) { | ||
if (resolvedPatterns.every((str) => !isDynamicPattern(str))) { | ||
return resolvedPatterns.map((p) => | ||
normalizePath(path.resolve(environment.config.root, p)), | ||
) | ||
} | ||
return glob(pattern, { | ||
absolute: true, | ||
cwd: environment.config.root, | ||
ignore: [ | ||
'**/node_modules/**', | ||
|
@@ -347,8 +348,6 @@ function globEntries(pattern: string | string[], environment: ScanEnvironment) { | |
? [] | ||
: [`**/__tests__/**`, `**/coverage/**`]), | ||
], | ||
absolute: true, | ||
suppressErrors: true, // suppress EACCES errors | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Such errors are suppressed by default in |
||
}) | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should fast-glob be removed? Or does that depend on my PR to the rollup plugins?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's still bundled because the dynamic import plugin depends on it. If your PR doesn't get merged before v6 release, I think we can patch it since we only use the
dynamicImportToGlob
function.