Skip to content
Compare
Choose a tag to compare
@stevengill 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 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).
  • 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