Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hubot-npm

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hubot-npm - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

test/event.json

32

index.js

@@ -10,1 +10,33 @@ // Description:

'use strict';
const getMessage = (data) => {
switch (data.event) {
case 'package:publish':
return `${data.name}@${data.version} published – https://www.npmjs.com/package/${data.name}`;
}
};
module.exports = (robot) => {
robot.router.post('/hubot/npm', (req, res) => {
const data = req.body;
let room = req.query.room;
if (!room) {
return res.status(400).end('Missing ?room parameter');
}
if (room && !/^#/.test(room)) {
room = `#${room}`;
}
const message = getMessage(data);
if (message) {
robot.send({
room: [room]
}, message);
}
res.end('OK');
});
};

6

package.json
{
"name": "hubot-npm",
"version": "0.0.1",
"version": "0.0.2",
"description": "Hubot script for npm notifications",

@@ -29,4 +29,6 @@ "main": "index.js",

"eslint": "^2.11.1",
"mocha": "^2.5.3"
"lodash": "^4.13.1",
"mocha": "^2.5.3",
"supertest": "^1.2.0"
}
}
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