filipedeschamps / rss-feed-emitter

Super RSS News Feed aggregator written in Node.js and ES6
MIT License
1.06k stars 77 forks source link

"skipFirstLoad: true" Doesn't Work? #190

Closed JimLynchCodes closed 4 years ago

JimLynchCodes commented 4 years ago

Hi, I am using this code:

const RssFeedEmitter = require('rss-feed-emitter');
const feeder = new RssFeedEmitter({ skipFirstLoad: true });

feeder.add({
    url: 'http://www.nintendolife.com/feeds/news',
    refresh: 2000
});

feeder.on('new-item', function (item) {
    console.log(item);
})

console.log('Feed watcher bot is listening... ')

but it returns a whole mountain of posts. I would think it shouldn't return anything but the console.log statement since the skipFirstLoad: true was passed in... 🤔

JimLynchCodes commented 4 years ago

using node v12.16.1 and rss-feed-emitter v3.1.0

JimLynchCodes commented 4 years ago

same result with node v11.15.0... 😢

TobiTenno commented 4 years ago

our unit tests seem to think it works fine

midzer commented 4 years ago

Can confirm this issue

djholt commented 4 years ago

I can confirm this also.

mfreiwald commented 4 years ago

https://github.com/filipedeschamps/rss-feed-emitter/blob/367cec24b50cb4933729f159217442004adb977e/src/FeedManager.js#L70

Must be changed to this.populateNewItemsInFeed(data, firstLoad);

filipedeschamps commented 4 years ago

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

The release is available on:

Your semantic-release bot :package::rocket: