-
Notifications
You must be signed in to change notification settings - Fork 680
Description
We're excited to announce the next major version of this package - or maybe we should say packages. This milestone is set to track the progress for its availability in March 2019.
TL;DR: If you're using a modern version of Node, and are not depending on any deprecated features, you can simply update your package.json with the latest version of the package(s) you use. No code changes! Take a look below for the new package names.
Please update to v5 before v4 is no longer supported, which is May 31, 2019.
New structure, same great experience 📦
This repository will become home to six, separately installable packages:
-
@slack/web-api- a package for using the Web API, whose main export is theWebClient. -
@slack/rtm-api- a package for using the RTM API, whose main export is theRTMClient. -
@slack/webhook- a package for using Incoming Webhooks, whose main export is theIncomingWebhook. -
@slack/client- an umbrella package that groups together the previous three packages. It combines those packages so that the exports are in the same structure as in versionsv4.x. As long as you're not using deprecated functionality, you can update to v5 with a simplenpm install @slack/client@latest. We'll stop publishing this package in the future, its only meant to alleviate migration friction in the short term. -
@slack/events-api- same package as it exists today, just moving the code into this repo. -
@slack/interactive-messages- same package as it exists today, just moving the code into this repo.
We recommend all users install only the package(s) they use in their app. So if you only call the Web API, you only need the @slack/web-api package. This will result in smaller dependency trees, which are better for performance (install time, cold boot time, etc).
This eliminates confusion for developers who need help when using our packages together. When there's only one repo and one set of issues, you're more likely to find what you need, and get attention for problems you're having.
We'll be updating our processes to reflect the structure change. The most relevant change for users is that we will close the issues in the slackapi/node-slack-events-api and slackapi/node-slack-interactive-messages repositories, and create copies of them in this repo. We'll update documentation to redirect visitors to this repo, and then archive those repos.
Add HTTP and HTTPS proxy support 🔒
The WebClient and RTMClient have been able to support using HTTP and HTTPS proxies through the agent configuration. That required using another dependency (such as https-proxy-agent) - but no more! Both of these classes now have a proxy option which can be set directly. This also means that the agent option has been removed, since there was no major use cases for it besides setting a proxy.
Update minimum Node version 8️⃣
As the support period for Node v6 LTS comes to a close, we're updating these packages to require v8 LTS or later. This change follows the policy we announced last year in the Support Schedule.
Return Promises (only) from Web API methods 🔜
Promises have become ubiquitous and performance has been improving. With the availability of async/await in all supported versions of Node, code clarity has also improved. The WebClient stops handling callback functions, and always returns a Promise.
If you're not ready or otherwise don't prefer using Promises, you can use the Node
built-in util.callbackify in your code to bring back the callbacks 🔙.
Logging updates 📝
The logger option for WebClient and RTMClient accept objects that implement the Logger interface. This interface has separate methods for each LogLevel, which allows a developer to more easily describe the handling those logs at each level. It also means your logger will deal with rich objects instead of a flattened string. The LoggerFunc interface will no longer be supported.
TypeScript 3.3 ✔️
This version takes advantage of the latest features in its exported type definitions. This includes the awaited /// <reference lib="..." /> reference directives, which will resolve some well-understood usability challenges.
Requirements (place an x in each of the [ ])
- I've read and understood the Contributing guidelines and have done my best effort to follow them.
- I've read and agree to the Code of Conduct.
- I've searched for any related issues and avoided creating a duplicate issue.