stevengill
released this
13 Jan 20:58
·
746 commits
to main
since this release
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 initializingApp
. If you used this option previously, you must useauthorize
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()
orInstallationStore.storeOrgInstallation()
. If you used these previously, you must useInstallationStore.fetchInstallation()
andInstallationStore.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 thesocketMode: 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
- This is implemented using the new
- 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 setdeveloperMode:
```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 forApp
. This will allow Bolt for JavaScript apps to more easily work with other popular web frameworks (Hapi.js, Koa, etc). (#670, #753) - thanks @aoberoiExpressReceiver
is still available to use for those of you that have usecases which aren’t covered byHTTPReceiver
.- 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-inhttp.createServer()
, so it’s very flexible. It will throw anHTTPReceiverDeferredRequestError
, with areq
andres
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 isapp.start(3000, { key: MY_TLS_KEY, cert: MY_TLS_CERT })
. (#234, #658) - thanks @aoberoi