Skip to content
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

Add path to onProgress event #155

Merged
merged 6 commits into from Aug 30, 2023
Merged

Conversation

marchuffnagle
Copy link
Contributor

Add the path of the deleted file to the onProgress event. Fixes #154

readme.md Outdated
}
```

- `percent` is a value between `0` and `1`
- `path` will not be present if no files were deleted
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is missing in the TS doc comment.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And it should describe what it is, like in the TS docs. They should be in sync.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in a8b391e

index.d.ts Outdated
@@ -15,6 +15,11 @@ export interface ProgressData {
Completed percentage. A value between `0` and `1`.
*/
readonly percent: number;

/**
Path of deleted file
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From onProgress docs:

Called after each file or directory is deleted.

So it could be a directory too.


It would also be useful to make it clear it's an "absolute path".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in a8b391e

@marchuffnagle
Copy link
Contributor Author

PR feedback has been addressed, and builds are passing. This is ready for re-review.

@sindresorhus sindresorhus merged commit f5d31e6 into sindresorhus:main Aug 30, 2023
9 checks passed
@marchuffnagle marchuffnagle deleted the add-path branch August 30, 2023 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add path to ProgressData
2 participants