Isomorphic-git: progress event is missing type

Created on 29 Nov 2018  路  4Comments  路  Source: isomorphic-git/isomorphic-git

There are (at least) two types of progress-related messages when cloning. One tracks the progress of object counting, the other the progress of object compressing. However, when the message line is split up and emitted to the progress event, the payload doesn't indicate which type of progress it is (the type). Here's an example:

{ loaded: 1, total: 124, lengthComputable: true }
{ loaded: 2, total: 124, lengthComputable: true }
{ loaded: 3, total: 124, lengthComputable: true }
{ loaded: 4, total: 124, lengthComputable: true }
{ loaded: 5, total: 124, lengthComputable: true }
...
{ loaded: 1, total: 38, lengthComputable: true }
{ loaded: 2, total: 38, lengthComputable: true }
{ loaded: 3, total: 38, lengthComputable: true }
{ loaded: 4, total: 38, lengthComputable: true }
{ loaded: 5, total: 38, lengthComputable: true }
...

As a result, it makes it hard to build a progress bar based on this information.

Please consider adding a "type" field with the value "counting" or "compressing" so that both progress types can be tracked independently.

The workaround is to observe the message event and do the message splitting yourself.

chore released

All 4 comments

Yes, we need to sub-class progress events somehow. I was thinking by the event name, but adding a type attribute makes a lot of sense.

Another idea would be "stage", "phase", or "action", just to give you something to chew on.

:tada: This issue has been resolved in version 0.41.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

Thanks @wmhilton! Just in time for the first release of my application after the switch to isomorphic-git. :metal:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

TomasHubelbauer picture TomasHubelbauer  路  6Comments

tyru picture tyru  路  4Comments

njlr picture njlr  路  5Comments

wmhilton picture wmhilton  路  6Comments

willstott101 picture willstott101  路  4Comments