Skip to content

bumps hubot version from 3 to 11 AND converts this to ESM #353

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
'use strict'
import { Adapter, Response, TextMessage, EnterMessage, LeaveMessage } from 'hubot'

const Adapter = require.main.require('hubot/src/adapter')
const Response = require.main.require('hubot/src/response')
const { TextMessage, EnterMessage, LeaveMessage } = require.main.require('hubot/src/message')
const { driver, api, methodCache, settings } = require('@rocket.chat/sdk')
import { driver, api, methodCache, settings } from '@rocket.chat/sdk'

/** Extend default response with custom adapter methods */
class RocketChatResponse extends Response {
Expand Down Expand Up @@ -183,4 +180,8 @@ class RocketChatBotAdapter extends Adapter {
}
}

exports.use = (robot) => new RocketChatBotAdapter(robot)
export default {
async use (robot) {
return new RocketChatBotAdapter(robot)
}
}
113 changes: 57 additions & 56 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,62 +1,63 @@
{
"name": "hubot-rocketchat",
"version": "2.0.0-development",
"files": [
"index.js"
],
"author": {
"name": "Rocket.Chat",
"url": "https://rocket.chat/"
},
"contributors": [
{
"name": "Sing Li",
"email": "[email protected]"
"name": "hubot-rocketchat",
"version": "2.1.0-development",
"type": "module",
"files": [
"index.js"
],
"author": {
"name": "Rocket.Chat",
"url": "https://rocket.chat/"
},
{
"name": "Gabriel Engel",
"email": "[email protected]"
"contributors": [
{
"name": "Sing Li",
"email": "[email protected]"
},
{
"name": "Gabriel Engel",
"email": "[email protected]"
},
{
"name": "Aaron Ogle",
"email": "[email protected]"
},
{
"name": "Tim Kinnane",
"email": "[email protected]"
}
],
"description": "Hubot Rocket.Chat Adapter",
"keywords": [
"hubot",
"adapter",
"rocketchat",
"rocket",
"chat"
],
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/RocketChat/hubot-rocketchat.git"
},
{
"name": "Aaron Ogle",
"email": "aaron.ogle@rocket.chat"
"bugs": {
"url": "https://github.com/RocketChat/hubot-rocketchat/issues",
"email": "support@rocket.chat"
},
{
"name": "Tim Kinnane",
"email": "[email protected]"
"main": "index.js",
"dependencies": {
"@rocket.chat/sdk": "^0.2.9-2",
"hubot": "11"
},
"peerDependencies": {
"hubot": "11"
},
"devDependencies": {
"base64-url": "^2.0.0",
"debug": "^2.6.9",
"fresh": "^0.5.2",
"mime": "^1.4.1",
"morgan": "^1.9.1",
"negotiator": "^0.6.1"
}
],
"description": "Hubot Rocket.Chat Adapter",
"keywords": [
"hubot",
"adapter",
"rocketchat",
"rocket",
"chat"
],
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/RocketChat/hubot-rocketchat.git"
},
"bugs": {
"url": "https://github.com/RocketChat/hubot-rocketchat/issues",
"email": "[email protected]"
},
"main": "index.js",
"dependencies": {
"@rocket.chat/sdk": "^0.2.1",
"hubot": "3"
},
"peerDependencies": {
"hubot": "3"
},
"devDependencies": {
"base64-url": "^2.0.0",
"debug": "^2.6.9",
"fresh": "^0.5.2",
"mime": "^1.4.1",
"morgan": "^1.9.1",
"negotiator": "^0.6.1"
}
}