-
Notifications
You must be signed in to change notification settings - Fork 141
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
Check update instead of force download #49
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry it took so long to get to this, it looks OK just two small comments.
Note to self, this will be a breaking change when released 😄
src/needUpdate.js
Outdated
return resolve(false); | ||
}); | ||
} else { | ||
reject(`Failed to check current version of ${chromeStoreID}.`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should log something and resolve(true)
just in case? Rejecting this promise will simply mess with developers, we can try to help them out as much as possible 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked the API again, it should always response status 200
if there is no any network errors, so I just remove the line, and log message if response app.status
is error-invalidAppId
.
src/utils.js
Outdated
.then((res) => { | ||
let body = ''; | ||
res.on('data', (chunk) => { body += chunk; }); | ||
res.on('end', () => resolve(Object.assign(res, { body }))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Purely to avoid mutating what should be an isolated object can we change this to
Object.assign({}, res, { body })
Hey, @MarshallOfSound do you need any help with the finalization of this PR? |
Related to #28.
This was start work by SimulatedGREG's repo but no longer response. :\