New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

rss2mail

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rss2mail - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

4

package.json
{
"name": "rss2mail",
"version": "1.0.1",
"version": "1.0.2",
"description": "Convert an rss/atom feed to a bunch of emails in mbox/rnews compatible output; it does NOT send the emails",

@@ -26,5 +26,5 @@ "type": "module",

"grepfeed": "~2.0.0",
"lockfile": "~1.0.4",
"proper-lockfile": "~4.1.2",
"nodemailer": "~6.9.4"
}
}

@@ -15,3 +15,3 @@ # rss2mail

Nodejs 18.x
Nodejs 20.x

@@ -18,0 +18,0 @@ $ npm i -g rss2mail

@@ -9,3 +9,3 @@ #!/usr/bin/env node

import FeedParser from 'feedparser'
import lockfile from 'lockfile'
import lockfile from 'proper-lockfile'
import MailStream from './index.js'

@@ -35,24 +35,15 @@

let streams = [process.stdin, new FeedParser(), new MailStream(args)]
if (!args.values.o) streams.push(process.stdout)
let pipe = pipeline(...streams, err => {
if (err && err.code !== 'EPIPE') errx(err)
})
let out = process.stdout
let lock = Promise.resolve( () => {/* nop */})
if (args.values.o) {
pipe.on('data', chunk => {
let out = fs.createWriteStream(args.values.o, {flags: 'a'})
out.on('error', errx)
out.cork()
out.write(chunk) // to memory
out = fs.createWriteStream(args.values.o, {flags: 'a'})
lock = lockfile.lock(args.values.o, {retries: 10})
}
streams.push(out)
// we need locking for `chunk` may be > PIPE_BUF (4K on Linux)
let lock = args.values.o + '.lock'
lockfile.lock(lock, {wait: 5000}, err => {
if (err) errx(err)
out.uncork() // puts!
lockfile.unlock(lock, err => {
if (err) errx(err)
out.end() // flush, close
})
})
lock.then( unlock => {
pipeline(...streams, err => {
if (err && err.code !== 'EPIPE') errx(err)
unlock()
})
}
}).catch(errx)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc