feat: update readdir/readdir-glob#116
Open
43081j wants to merge 1 commit into
Open
Conversation
Both have new major versions so we need a bit more code to adopt them. Basically, the "found files" (i.e. those we traversed but haven't yet checked if we ignore) no longer come from `tiny-readdir` as a result. Instead, we have to listen to `Dirent` emit and build our own set.
commit: |
43081j
commented
Jul 23, 2026
| import type { ContextOptions, FormatOptions, FunctionMaybe, Key, LogLevel, Options, PrettierConfigWithOverrides, PrettierPlugin } from "./types.js"; | ||
| import type { PluginsOptions } from "./types.js"; | ||
|
|
||
| type DirentWithParentPath = Dirent & { parentPath: string }; |
Collaborator
Author
There was a problem hiding this comment.
FYI @fabiospampinato in case you want to expose this on your Dirent type
43081j
commented
Jul 23, 2026
| }; | ||
|
|
||
| // Globs are matched against paths relative to the root, which are never prefixed with "./" | ||
| const globsNormalized = globs.map((glob) => glob.replace(/^(!*)(?:\.\/)+/, "$1")); |
Collaborator
Author
There was a problem hiding this comment.
@fabiospampinato FYI too, it seems the switch to zeptomatch means !./foo/*.ts, ./foo/*.ts, etc used to work and no longer do.
that may be the right thing to do, just flagging. we can work with it here by stripping ./
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Both have new major versions so we need a bit more code to adopt them.
Basically, the "found files" (i.e. those we traversed but haven't yet
checked if we ignore) no longer come from
tiny-readdiras a result.Instead, we have to listen to
Direntemit and build our own set.