Skip to content
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

Prep for major release of rtm-api #1764

Merged
merged 4 commits into from
Apr 1, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
5 changes: 1 addition & 4 deletions packages/rtm-api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ const rtm = new RTMClient(token, {

## Requirements

This package supports Node v14 and higher. It's highly recommended to use [the latest LTS version of
This package supports Node v18 and higher. It's highly recommended to use [the latest LTS version of
node](https://github.com/nodejs/Release#release-schedule), and the documentation is written using syntax and features
from that version.

Expand All @@ -440,6 +440,3 @@ If you get stuck, we're here to help. The following are the best ways to get ass

* [Issue Tracker](http://github.com/slackapi/node-slack-sdk/issues) for questions, feature requests, bug reports and
general discussion related to these packages. Try searching before you create a new issue.
* [Email us](mailto:[email protected]) in Slack developer support: `[email protected]`
* [Bot Developers Hangout](https://community.botkit.ai/): a Slack community for developers
building all types of bots. You can find the maintainers and users of these packages in **#sdk-node-slack-sdk**.
45 changes: 22 additions & 23 deletions packages/rtm-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
"dist/**/*"
],
"engines": {
"node": ">= 12.13.0",
"npm": ">= 6.12.0"
"node": ">=18",
"npm": ">=8.6.0"
},
"repository": "slackapi/node-slack-sdk",
"homepage": "https://slack.dev/node-slack-sdk/rtm-api",
Expand All @@ -37,34 +37,33 @@
"prepare": "npm run build",
"build": "npm run build:clean && tsc",
"build:clean": "shx rm -rf ./dist",
"lint": "eslint --ext .ts src",
"test": "npm run lint && npm run build && echo \"Tests are not implemented.\" && exit 0",
"lint": "eslint --fix --ext .ts src",
"test": "npm run lint && npm run build",
"ref-docs:model": "api-extractor run"
},
"dependencies": {
"@slack/logger": ">=1.0.0 <3.0.0",
"@slack/web-api": "^6.11.2",
"@types/node": ">=12.0.0",
"@types/p-queue": "^2.3.2",
"@types/ws": "^7.4.7",
"eventemitter3": "^3.1.0",
"@slack/logger": "^4",
"@slack/web-api": "^7",
"@types/node": ">=18",
"eventemitter3": "^5",
"finity": "^0.5.4",
"p-cancelable": "^1.1.0",
"p-queue": "^2.4.2",
"ws": "^7.5.3"
"p-cancelable": "^2",
"p-queue": "^6",
"ws": "^8"
},
"devDependencies": {
"@microsoft/api-extractor": "^7.38.0",
"@typescript-eslint/eslint-plugin": "^6.4.1",
"@typescript-eslint/parser": "^6.4.0",
"eslint": "^8.47.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-airbnb-typescript": "^17.1.0",
"eslint-plugin-import": "^2.28.1",
"@microsoft/api-extractor": "^7",
"@typescript-eslint/eslint-plugin": "^6",
"@typescript-eslint/parser": "^6",
"@types/ws": "^8",
"eslint": "^8",
"eslint-config-airbnb-base": "^15",
"eslint-config-airbnb-typescript": "^17",
"eslint-plugin-import": "^2",
"eslint-plugin-import-newlines": "^1.3.4",
"eslint-plugin-jsdoc": "^46.5.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-jsdoc": "^48",
"eslint-plugin-node": "^11",
"shx": "^0.3.2",
"typescript": "^4.1.0"
"typescript": "5.3.3"
}
}
4 changes: 2 additions & 2 deletions packages/rtm-api/src/RTMClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export class RTMClient extends EventEmitter {
// determine which Web API method to use for the connection
const connectMethod = this.useRtmConnect ? 'rtm.connect' : 'rtm.start';

return this.webClient.apiCall(connectMethod, this.startOpts !== undefined ? this.startOpts : {})
return this.webClient.apiCall(connectMethod, this.startOpts !== undefined ? { ...this.startOpts } : {})
.then((result: WebAPICallResult) => {
const startData = result as RTMStartResult;

Expand Down Expand Up @@ -601,7 +601,7 @@ export class RTMClient extends EventEmitter {
this.logger.error(`A websocket error occurred: ${event.message}`);
this.emit('error', websocketErrorWithOriginal(event.error));
});
this.websocket.addEventListener('message', this.onWebsocketMessage.bind(this));
this.websocket.on('message', this.onWebsocketMessage.bind(this));
}

/**
Expand Down
Loading