-
Notifications
You must be signed in to change notification settings - Fork 53
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
fix(#201): typings #202
fix(#201): typings #202
Conversation
breaking
maybe try |
why no breaking changes? just release a new major version? |
i mean all the not working typings are "breaking" changes... |
no. I do rare releases. Releasing v5 one month after v4 is unnecessary.
Yes, so this is a bug fixing, and is OK. For users who did not use |
thanks for the fast response :) if i had more time, i would get the unit tests up and running again |
@KillerCodeMonkey I have resolved the issue with backwards compat, check out c44446d |
sorry some changes are missing there readdirP should return EntryInfo[] and not Path[] what is just a string[]. And in the ReaddirpOptions the root should be optional |
but if i log the result of readdirp it gives me a list of EntryInfo[]... and not a list of strings So i guess, it should be export function readdirpPromise(
root: Path,
options: Partial<ReaddirpOptions> = {}
): Promise<EntryInfo[]> {
return new Promise<EntryInfo[]>((resolve, reject) => {
const files: EntryInfo[] = [];
readdirp(root, options)
.on('data', (entry) => files.push(entry))
.on('end', () => resolve(files))
.on('error', (error) => reject(error));
});
} and the interface for the options, should mark the root option as optional export type ReaddirpOptions = {
root?: string;
fileFilter?: Predicate;
directoryFilter?: Predicate;
type?: EntryType;
lstat?: boolean;
depth?: number;
alwaysStat?: boolean;
highWaterMark?: number;
}; |
nice and now just mark the |
|
yes |
So it's already there: |
ah then i missed that, sorry |
so then i guess it is ready to ship :). if you like to release a beta version, let me know. I am here to tests it for my purposes with the promise function |
This is not a huge issue, so I will wait for a month or so before doing 4.0.2 with other fixes. There is no need to release beta. 1. Users can build their own readdirp from github source. 2. Users can override types using |
I follow rare release schedule for supply chain security, it makes it easier for users to verify ocassional releases of my software. If, instead, I was spamming "weekly release", it would have been harder to reason about. |
yes yes. it was just an idea. |
thanks again :) |
fix:
fix #201