Skip to content
Merged
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
42 changes: 22 additions & 20 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@
"smol-toml": "^1.9.1",
"specialist": "^2.0.0",
"tiny-editorconfig": "^1.0.2",
"tiny-readdir": "^3.1.1",
"tiny-readdir-glob": "^2.0.0",
"tiny-readdir": "^3.1.2",
"tiny-readdir-glob": "^2.0.1",
"tiny-spinner": "^2.0.5",
"worktank": "^3.0.3",
"zeptomatch": "^2.1.0",
Expand Down
6 changes: 1 addition & 5 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ import zeptomatchIsStatic from "zeptomatch-is-static";
import type { ContextOptions, FormatOptions, FunctionMaybe, Key, LogLevel, Options, PrettierConfigWithOverrides, PrettierPlugin } from "./types.js";
import type { PluginsOptions } from "./types.js";

type DirentWithParentPath = Dirent & { parentPath: string };

function castArray<T>(value: T | T[]): T[] {
return isArray(value) ? value : [value];
}
Expand Down Expand Up @@ -129,9 +127,7 @@ async function getGlobPaths(rootPath: string, globs: string[], withNodeModules:
const onDirents = (dirents: Dirent[]): undefined => {
for (const dirent of dirents) {
const direntName = dirent.name;
// TODO (jg): remove this cast once tiny-readdir knows about
// the `parentPath` property on Dirent objects
const direntPath = fastJoinedPath((dirent as DirentWithParentPath).parentPath, direntName);
const direntPath = fastJoinedPath(dirent.path, direntName);
if (ignore(direntPath)) continue;
if (dirent.isFile()) {
filesFound.push(direntPath);
Expand Down
Loading