-
-
Notifications
You must be signed in to change notification settings - Fork 200
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: switch from fast-glob to fdir #2433
Conversation
Tweaked a few things and switched to fdir in |
packages/svelte-check/src/index.ts
Outdated
}); | ||
const absFilePaths = files.map((f) => path.resolve(workspaceUri.fsPath, f)); | ||
const isIngored = (path: string) => { |
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.
const isIngored = (path: string) => { | |
const isIgnored = (path: string) => { |
Glad you were able to figure out how to call |
think going with |
fast-glob default to follow symlinks but |
Interesting! I think the behavior of not following symlinks is better, and instead walk the tree like the user sees it visually. In that sense I would acutally count this as a nice side-effect bugfix. |
- breaking: make TypeScript a peer dependency - breaking: require node 18 or later - breaking: require Svelte 4 or later (devDependencies pinned to Svelte 3 because other packages in this repo still use it. Theoretically we still support Svelte 3 with svelte-check v4 but this gives us the opportunity to adjust that later without a major) - chore: switch from fast-glob to fdir (#2433) closes #2397 fixes #2364 --------- Co-authored-by: Simon Holthausen <[email protected]> Co-authored-by: Ben McCann <[email protected]>
.withPathSeparator('/') | ||
.exclude((_, path) => { | ||
// no / at the start, path could start with node_modules | ||
return path.includes('node_modules/') || path.includes('/.'); |
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.
Was the second term necessary?
According to the previous code, the pattern was added as a workaround to exclude node_modules
in a .
directory.
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 necessary to not traverse into directories such as .git
etc (directories starting with a dot are generally considered to be private), and I can't think of a situation where you would have a svelte.config.js
in one of those directories - do you have such a case or why do you ask?
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.
I have used .
directories for caching/generated content but don't think they needed checking/processing so far.
Was just wondering if this could be simplified, but it's probably also faster this way.
closes #2397
fixes #2364
fast-glob:
https://npmgraph.js.org/?q=fast-glob
https://bundlephobia.com/package/[email protected]
fdir:
https://npmgraph.js.org/?q=fdir
https://bundlephobia.com/package/[email protected]
docs: https://github.com/thecodrr/fdir/blob/master/documentation.md