This repository has been archived by the owner on Jul 11, 2023. It is now read-only.
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.
This a fairly large rewrite of the project, mostly done by boneskull (https://github.com/boneskull/rsync) to move Rsync from an object to a more modern class based layout. However, I found the changes over there addressed a few of the open issues on this project and I fixed up a few other small issues and bugs with boneskull's changes. Additionally, I've updated all the npm dependencies to the latest versions and ran the semistandard code standards across the project.
Open issues addressed in these changes include:
#69 #66 #61 #58 (Though this one was already solved and actually is set via the executable() function or as a parameter to new Rsync()) and #47
The API has changed in two major ways with these changes:
1: flags() has now become .setFlags() and .unsetFlags().
2: the .execute() function parameters and return have changed. It always returns a Promise now however, there is no way to return the original spawn process to the caller now. I'm not 100% sure it is necessary to have the ability to pass it up, but if it is that could be worked around as boneskull had it before I was in there mucking about. If this is necessary functionality, I'd be curious to look into how other projects have solved this without a kludgy use of callbacks. Perhaps that's the only real way to solve it...
My main objective with this pull request is to get feedback on the changes. If this project is abandoned perhaps I should submit a new npm rsync2 module or better yet I can just be a contributor on this project if any maintainers/admins are still active and create a version 2 release with these changes. Please let me know your thoughts.
I am using my forked version of boneskull's fork for my jsyncd project over here (https://github.com/jhundley9109/jsyncd).