Releases: slackapi/bolt-js
@slack/bolt@4.0.0-nextGen.2
What's Changed (beta)
This beta release contains feature enhancements to Bolt JS for developers participating in the Slack Platform Beta 🚀
Compatible with the Slack CLI tool
Create a new app from a Github sample template
$ slack create my-app -t slack-samples/bolt-js-starter-template -b future
Run your app for local development from the CLI. We take care of installation, tokens and starting the app in development mode.
$ slack run
Configure your app in code
Declare a manifest.js
or manifest.ts
file import handly utility functions and define any recomposable units contained such as Functions
, Workflows
and Triggers
.
# my-app/manifest.js
const { Manifest } = require('@slack/bolt');
module.exports = Manifest({
runOnSlack: false,
name: '',
displayName: '',
description: '',
botScopes: ['chat:write'],
socketModeEnabled: true,
workflows: [TimeOffWorkflow],
features: {
appHome: {
messagesTabEnabled: true,
messagesTabReadOnlyEnabled: true,
},
},
settings: {
interactivity: {
is_enabled: true,
},
org_deploy_enabled: false,
},
});
Compose Custom Function handling logic via a SlackFunction
.
Write a recomposable unit of logic:
Example:
const myFunc = new SlackFunction('fn_callback_id', () => {});
Attach optional handlers for block_action
and view
events related to your function.
Example:
myFunc.action('action_id', () => {})
.view('view_callback_id', () => {});
Enhancements
- Bolt-JS projects containing a valid
slack.json
file in their project root are now Slack CLI compatible by @srajiang - Adds CLI hook implementations
get-manifest
start
andget-hooks
by @srajiang - Exports utility types and functions intended for
manifest.js
authoring by @srajiang @neptunel - Adds SlackFunction and Function Localized Interactivity handling by @srajiang in #1567
Full Changelog
https://github.com/slackapi/bolt-js/compare/@slack/bolt@3.12.1...@slack/bolt@4.0.0-nextGen.2
@slack/bolt@3.12.1
- Fix #1509 HTTPReceiver does not immediately respond to an invalid signature request (no response instead) (via #1528 ) - thanks @seratch! @nirvparekh!
- Document improvements (#1524 #1526) - thanks @wongjas!
Here is the list of all the issues / pull requests included in the release: https://github.com/slackapi/bolt-js/milestone/28?closed=1
@slack/bolt@3.12.0
- Fix #1507 Add type support for
message_metadata_*
event types (via #1508) - thanks @dannyhostetler! - Allow passing additional types for Global and Middleware Context (via #1505) - thanks @M1kep!
- Fix #1510: Add
isEnterpriseInstall
to Context (via #1511) - thanks @rockingskier! - Fix #1052: Request verification failed: Failed to verify authenticity: stale (via #1503) - thanks @srajiang!
- Fixed receiver warning typo (via #1492) - thanks @nick-w-nick!
Here is the list of all the issues / pull requests included in the release: https://github.com/slackapi/bolt-js/milestone/21?closed=1
@slack/bolt@3.11.3
- Fix #1488 Incorrect types with ViewUpdateResponseAction and ViewPushResponseAction (via #1490) - thanks @seratch @ducminh-phan!
Here is the list of all the issues / pull requests included in the release: https://github.com/slackapi/bolt-js/milestone/26?closed=1
@slack/bolt@3.11.2
- Bug fixes:
- Fix #1454: Missing type declarations for HomeView (via #1455) - thanks @seratch!
- TypeScript 4.7 compiler compatibility (via #1466) - thanks @seratch!
- Fix #1472:
say
type incorrectly inferred as never when usingpin_added
orreaction_*
events (via #1473 and #1476) - thanks @seratch! - Fix an action typo in the docs (via #1475) - thanks @BenAlderfer!
- Add more logs for error patterns in AwsLambdaReceiver (via #1481) - thanks @seratch!
- Fix #1478:
ack()
is not accessible in global middleware in TypeScript (via #1482) - thanks @seratch!
Here is the list of all the issues / pull requests included in the release: https://github.com/slackapi/bolt-js/milestone/25?closed=1
@slack/bolt@3.11.1
- New features / improvements:
- Adding support for new user-change events with types (via #1448) - thanks @filmaj
- Slack prints failed with the error "operation_timeout" when slack command runs and finishes successfully in AWS Lambda (via #1435 #1452) - thanks @nicolls1
- Upgrade socket-mode dependency to the latest minor (via #1441 ) - thanks @seratch !
Here is the list of all the issues / pull requests included in the release: https://github.com/slackapi/bolt-js/milestone/24?closed=1
@slack/bolt@3.11.0
📣 Important Announcement
Since this version, the default behavior of the OAuth flow has been changed for better security. The changes are:
InstallProvider
(The underlying OAuth module) verifies not only the query string but also its corresponding browser cookie data- The default
StateStore
(ClearStateStore
) makes sure that the state parameter is not too old (the default lifetime is 10 minutes)
Refer to #1335 #1391 slackapi/node-slack-sdk#1435 slackapi/node-slack-sdk#1436 for the context. If you encounter behavior changes described at #1412, consider either changing your app code or setting installerOptions.legacyStateVerification: true
for now.
🎁 🐛 New features / improvements:
- #1391 Fix #1335 Proper use of state parameter for the OAuth CSRF protection - Thanks @seratch
- #1405 Fix #1404 SocketModeReceiver app process exits when any of its event listeners throws an exception - Thanks @seratch
- #1359 Fix #1358 Expose common utilities for building HTTP module based receivers - Thanks @seratch
- #1406 Add more error handlers to ExpressReceiver - Thanks @seratch @Gregoor
- #1392 Fix #1385 Create a signature validation function that is not tied to the request - Thanks @seratch @danerwilliams
- #1393 Fix #1376 CustomRoute interface should be accessible from developers - Thanks @seratch
- #1381 Fix #1380 by adding more event payload types - Thanks @seratch @aasiddiq
- #1400 Fix #1397 bolt-js does not accept ssl_check requests properly - Thanks @seratch
- #1340 Fix #1334 Export
EnvelopedEvent
interface to users - Thanks @martin-cycle - #1366 Fix #1364 Update axios to latest 0.26.1 - Thanks @seratch @msrivastav13
- #1369 Fix #1368 Log
httpServer.close
error only when theserver
exists - Thanks @sbcgua - #1336 #1401 #1403 #1407 Improve the SDK's test assets - Thanks @seratch @filmaj
📝 Document updates:
- #1384 Deploy the App to Heroku with one click - Thanks @MaurizioBella
Here are all the issues / pull requests included in the release.
@slack/bolt@3.10.0
🎁 🐛 New features / improvements:
- Added an option to
deferInitialization
of App - #248 #1303 - Thanks @seratch and @SpencerKaiser - We're now explicitly setting content-type on
HTTPReceiver
responses to/slack/install
route - #1279 #1280 - Thanks @filmaj - Reduced unnecessary error throwing in case of
tokens_authorize
/app_uninstalled
event #674 #1328, - Thanks @seratch - Updated
SlackEvent
union type to includeChannelIDChangedEvent
- #1302 #1301 Thanks @pmezard and @srajiang - Corrected typing for
UserChangeEvent.user.updated
attribute #1320 #1322 - Thanks @seratch and @pmezard - Removed redundant authorize code #1231 #1327 - Thanks @seratch and @TEMHITHORPHE
- Corrected some pesky quotes #1323 - Thanks @nicolls1
📝 Document updates:
- New documentation for
deferInitialization
#1304, #1308 - Thanks @filmaj, @wongjas, @seratch! - Improved clarity and content of OAuth documentation #1329 #1315 #1318 - Thanks @srajiang, @horeaporutiu
- Added a 🇯🇵 translation for
userScopes
property - #1295 - Thanks @wongjas - Updated
respond
argument docs to includeviews
listener #1313 - Thanks @seratch
Here are all the issues / pull requests included in the release.
@slack/bolt@3.9.0
- New features / improvements:
- Bump
@slack/web-api
dependency to at least v6.6.0 to address a security vulnerability inaxios
(via #1276) - thanks @filmaj! - Bump
@slack/oauth
dependency to at least v2.4.0 to address major bugs (via #1273) - thanks @seratch! - Fix #1256:
$PORT
fails to bind on Heroku (via #1210) - thanks @filmaj! - Add missing
Channel*MessageEvent
types (via #1254) - thanks @seratch! - Fix #190: Context method
updateConversation
should accept expiration time (via #1221) - thanks @shubhamjajoo! - Fix #1206: custom routes incorrectly match against full URL including querystring parameters (via #1207) - thanks @moustacheful!
- Bump
- Document updates:
- Improve App initialization error logs and Authenticating with OAuth document (via #1250) - thanks @srajiang!
- Fix #795: improving documentation around serverless deployments to make more accessible (via #1254) - thanks @filmaj!
- Update anchors in the Japanese reference page (via #1247) - thanks @seratch!
- Fix #1237: Use correct message subtype in Listening to Events documentation (via #1240) - thanks @wongjas!
- Fix #1233 and #1216: Remove redundant
state
information from the Listening to Modals documentation (via #1236) - thanks @wongjas! - Fix #1241: Update examples to use the
logger
instead ofconsole.log
(via #1242) - thanks @wongjas! - Cleanup Lambda example and docs around
processBeforeResponse
(via #1229) - thanks @ramblingenzyme! - Fix #1197: Japanese version of documents around
extendedErrorHandler
(via #1227) - thanks @wongjas! - Add documentation for socket mode and developer mode (via #1218) - thanks @TheManWhoStaresAtCode!
- Fix #1219: Japanese version of additional socket mode and developer mode documentation (via #1226) - thanks @wongjas!
- Fix #1010: Add documentation for
view_closed
support (via #1214) - thanks @TheManWhoStaresAtCode! - Fix #1200: Remove references to passing a port to the
start
method when using socket mode (via #1202) - thanks @filmaj!
- Developer / maintainer-relevant changes:
Here is the list of all the issues / pull requests included in the release: https://github.com/slackapi/bolt-js/milestone/16?closed=1
@slack/bolt@3.8.1
- New features / improvements:
- Fix #759 #1109 #1110 by adding custom properties in ReceiverEvent and Context objects (#1177) - Thanks @seratch!
- Fix #860 Enable developers to customize the built-in receivers more (#1183) - Thanks @seratch!
- Fix #1181 Add port property to installerOptions in the HTTPReceiver (#1184) - Thanks @seratch @M1kep!
- Add port property to installerOptions in the HTTPReceiver (#1181) - Thanks @srajiang!
- Add context to global error handler (#525) - Thanks @raycharius!
- Fix #1098 next() is optional in middleware in TypeScript (#1099) - Thanks @seratch!
- Fix #1148 - Adjust the app.message listener interface in TypeScript to compile the examples in documents (#1185) - Thanks @M1kep!
- BlockAction interface does not include state despite state being present in actual object (#1141 #1144) - Thanks @seratch @Richard-PTT!
- Add more information to unhandled incoming request logging (#1143) - Thanks @misscoded!
- Bump axios version to 0.21.2 or higher for better security (#1162) - Thanks @xmariopereira!
- Fix the v3.8.0 publish error (#1194) - Thanks @brianjychan
- Document updates:
- Japanese document updates (#1047 #1152 #1131 #1154 #1165 #1163 #1166 #1169 #1175) - Thanks @wongjas!
- Fix the logging example so that it is valid JS (#1172 #1174) - Thanks @filmaj!
- Fix documentation about state verification option (#1168) - Thanks @stophecom!
- Fix call in AWS handler to match example (and be correct) (#1190) - Thanks @sirctseb!
- using directMention() documentation doesn't seem to be correct in docs (#1148) - Thanks @O-Mutt!
- Clarify /slack/events path requirement (#1153) - Thanks @mars!
- Update Japanese docs to apply token rotation (#1009) changes (#1014) - Thanks @misscoded!
- Update slugs in document pages (#1161) - Thanks @srajiang!
- Japanese document updates (#1067 #1137) - Thanks @seratch!
- Minor updates related to #1046 (#1047) - Thanks @seratch!
Here is the list of all the issues / pull requests included in the release: https://github.com/slackapi/bolt-js/milestone/15?closed=1