-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
refactor: async/await #34
Conversation
Unit test for |
date: item.date, | ||
tags: item.categories, | ||
excerpt: tomd.turndown(item.description || ''), | ||
content: tomd.turndown(item.content || item.description || '') |
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.
plan to implement a feature to request from the post's url if item.content
is absent, in a separate PR.
} | ||
|
||
if (feed) { | ||
for (const item of feed.items) { |
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.
the loop here can be utilized to limit new posts (#9), to do in future PR.
698782d
to
74c6754
Compare
Tested with a dummy rss2.xml. |
if (/^http(s)?:\/\//i.test(source)) { | ||
stream = request(source); | ||
input = await got(source, { resolveBodyOnly: true, retry: 0 }); |
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.
retry
is disabled to pass the unit test (in local machine with slow connection).
The got
options can be exposed to config in a separate PR.
BREAKING CHANGE: Drops Node 8 - necessary to support got v10
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.
LGTM!
Closes #31
BREAKING CHANGE: Drops Node 8
got v10 requires Node 10