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

Check update instead of force download #49

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

jhen0409
Copy link
Contributor

Related to #28.

This was start work by SimulatedGREG's repo but no longer response. :\

Copy link
Owner

@MarshallOfSound MarshallOfSound left a 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 😄

return resolve(false);
});
} else {
reject(`Failed to check current version of ${chromeStoreID}.`);
Copy link
Owner

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 👍

Copy link
Contributor Author

@jhen0409 jhen0409 May 26, 2017

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 })));
Copy link
Owner

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 })

@linegel
Copy link

linegel commented Apr 9, 2020

Hey, @MarshallOfSound do you need any help with the finalization of this PR?

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.

3 participants