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

hubot

Package Overview
Dependencies
Maintainers
7
Versions
145
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hubot - npm Package Compare versions

Comparing version 10.0.3 to 10.0.4

61

index.js
'use strict'
require('coffeescript/register')
const inherits = require('util').inherits
const User = require('./src/user')
const Brain = require('./src/brain')
const Robot = require('./src/robot')
const Adapter = require('./src/adapter')
const Response = require('./src/response')
const Listener = require('./src/listener')
const Message = require('./src/message')
const DataStore = require('./src/datastore')
const hubotExport = require('./es2015')
// make all es2015 class declarations compatible with CoffeeScript’s extend
// see https://github.com/hubotio/evolution/pull/4#issuecomment-306437501
module.exports = Object.keys(hubotExport).reduce((map, current) => {
if (current !== 'loadBot') {
map[current] = makeClassCoffeeScriptCompatible(hubotExport[current])
} else {
map[current] = hubotExport[current]
module.exports = {
User,
Brain,
Robot,
Adapter,
Response,
Listener: Listener.Listener,
TextListener: Listener.TextListener,
Message: Message.Message,
TextMessage: Message.TextMessage,
EnterMessage: Message.EnterMessage,
LeaveMessage: Message.LeaveMessage,
TopicMessage: Message.TopicMessage,
CatchAllMessage: Message.CatchAllMessage,
DataStore: DataStore.DataStore,
DataStoreUnavailable: DataStore.DataStoreUnavailable,
loadBot (adapter, enableHttpd, name, alias) {
return new module.exports.Robot(adapter, enableHttpd, name, alias)
}
return map
}, {})
function makeClassCoffeeScriptCompatible (klass) {
function CoffeeScriptCompatibleClass () {
const Hack = Function.prototype.bind.apply(klass, [null].concat([].slice.call(arguments)))
const instance = new Hack()
// pass methods from child to returned instance
for (const key in this) {
instance[key] = this[key]
}
// support for constructor methods which call super()
// in which this.* properties are set
for (const key in instance) {
this[key] = instance[key]
}
return instance
}
inherits(CoffeeScriptCompatibleClass, klass)
return CoffeeScriptCompatibleClass
}
{
"name": "hubot",
"version": "10.0.3",
"version": "10.0.4",
"author": "hubot",

@@ -18,3 +18,2 @@ "keywords": [

"dependencies": {
"coffeescript": "^2.7.0",
"connect-multiparty": "^2.2.0",

@@ -21,0 +20,0 @@ "express": "^4.18.2",

@@ -9,2 +9,4 @@ ![Pipeline Status](https://github.com/hubotio/hubot/actions/workflows/pipeline.yml/badge.svg)

**Please note that in v11, CoffeeScript support was removed.**
Hubot is a framework to build chat bots, modeled after GitHub's Campfire bot of the same name, hubot.

@@ -11,0 +13,0 @@ He's pretty cool. He's [extendable with scripts](https://hubotio.github.io/hubot/docs#scripts) and can work

@@ -331,6 +331,2 @@ 'use strict'

async loadcoffee (filePath) {
return await this.loadjs(filePath)
}
async loadjs (filePath) {

@@ -356,3 +352,3 @@ const script = require(filePath)

// see https://github.com/hubotio/hubot/issues/1355
if (['js', 'mjs', 'coffee'].indexOf(ext) === -1) {
if (['js', 'mjs'].indexOf(ext) === -1) {
this.logger.debug(`Skipping unsupported file type ${full}`)

@@ -485,3 +481,3 @@ return

this.adapter = this.requireAdapterFrom(path.resolve(path.join(__dirname, 'adapters', this.adapterName)))
} else if (['.js', '.cjs', '.coffee'].includes(ext)) {
} else if (['.js', '.cjs'].includes(ext)) {
this.adapter = this.requireAdapterFrom(path.resolve(adapterPath))

@@ -488,0 +484,0 @@ } else if (['.mjs'].includes(ext)) {

Sorry, the diff of this file is not supported yet

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