Bolt: @slack/[email protected] Release

Release date:
January 13, 2021
Previous version:
@slack/[email protected] (released January 12, 2021)
Magnitude:
2,883 Diff Delta
Contributors:
3 total committers
Data confidence:
Commits:

Top Contributors in @slack/[email protected]

stevengill
aoberoi
seratch

Directory Browser for @slack/[email protected]

We haven't yet finished calculating and confirming the files and directories changed in this release. Please check back soon.

Release Notes Published

Breaking changes

  • Updated minimum Nodejs version to 12.13.0, updated minimum TypeScript version to 4.1 (#727, #728) - thanks @stevengill
  • Removed orgAuthorize option when initializing App. If you used this option previously, you must use authorize instead for both single workspace installs and org wide app installs. See the migration guide to learn more! (#730) - thanks @stevengill
  • The built-in OAuth with Org wide app installs no longer uses InstallationStore.fetchOrgInstallation() or InstallationStore.storeOrgInstallation(). If you used these previously, you must use InstallationStore.fetchInstallation() and InstallationStore.storeInstallation() instead. See the migration guide to learn more! (#730) - thanks @stevengill

New Features

  • Bolt for JavaScript now supports Socket Mode! When initializing an App, use the socketMode: true option to choose connecting to Slack without an HTTP server (:wave: goodbye managing ngrok). In order to use Socket Mode, you must first enable it for your app’s configuration (https://api.slack.com/apps → Your App → Socket Mode).
    • This is implemented using the new SocketModeReceiver class. This receiver allows your app to receive events from Slack over a WebSocket connection.
    • To learn more about Socket Mode, checkout the release blog post and Bolt for JavaScript docs and example
    • Implemented in #630 - thanks @stevengill, @aoberoi, @seratch, @shaydewael, @mwbrooks
  • Added a new Developer Mode. When initializing an App, conditionally check for when you’re not in production (e.g. process.NODE_ENV !== 'production' ) to set developerMode: ``true. Developer Mode currently enables debug logging, enables SocketMode, adds a custom failure handler for OAuth, and outputs the body of every incoming request. (#714, #742) - thanks @stevengill
  • HTTPReceiver is the new default receiver for App. This will allow Bolt for JavaScript apps to more easily work with other popular web frameworks (Hapi.js, Koa, etc). (#670, #753) - thanks @aoberoi
    • ExpressReceiver is still available to use for those of you that have usecases which aren’t covered by HTTPReceiver.
    • This new receiver does not allow you to add custom routes, but instead allows you to access its requestListener property to selectively send it requests. This property follows the exact function signature as the first argument to Node’s built-in http.createServer(), so it’s very flexible. It will throw an HTTPReceiverDeferredRequestError, with a req and res property if it was not able to handle a given request.
  • Added support for starting an HTTPS server with app.start() . This method now takes TLS options as its second parameter (after the port). The simplest example of starting an HTTP server is app.start(3000, { key: MY_TLS_KEY, cert: MY_TLS_CERT }). (#234, #658) - thanks @aoberoi