Skip to content

Commit fc98c8c

Browse files
WilliamBergaminClaudezimegsrtaalejlukegalbraithrussell
authored
feat: Node Slack SDK major version release candidate (#2603)
Co-authored-by: Claude <svc-devxp-claude@slack-corp.com> Co-authored-by: Eden Zimbelman <eden.zimbelman@salesforce.com> Co-authored-by: Ale Mercado <104795114+srtaalej@users.noreply.github.com> Co-authored-by: Luke Russell <31357343+lukegalbraithrussell@users.noreply.github.com>
1 parent c37b47e commit fc98c8c

102 files changed

Lines changed: 2838 additions & 1706 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@slack/cli-hooks": major
3+
---
4+
5+
Drop Node.js 18 support. The minimum supported Node.js version is now 20.

.changeset/drop-node18-cli-test.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@slack/cli-test": major
3+
---
4+
5+
Drop Node.js 18 support. The minimum supported Node.js version is now 20.

.changeset/drop-node18-logger.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@slack/logger": major
3+
---
4+
5+
Drop Node.js 18 support. The minimum supported Node.js version is now 20.

.changeset/drop-node18-oauth.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@slack/oauth": major
3+
---
4+
5+
Drop Node.js 18 support. The minimum supported Node.js version is now 20.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@slack/socket-mode": major
3+
---
4+
5+
Drop Node.js 18 support. The minimum supported Node.js version is now 20.

.changeset/drop-node18-types.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@slack/types": major
3+
---
4+
5+
Drop Node.js 18 support. The minimum supported Node.js version is now 20.

.changeset/drop-node18-web-api.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@slack/web-api": major
3+
---
4+
5+
Drop Node.js 18 support. The minimum supported Node.js version is now 20.

.changeset/drop-node18-webhook.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@slack/webhook": major
3+
---
4+
5+
Drop Node.js 18 support. The minimum supported Node.js version is now 20.

.changeset/manifest-agent-view.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@slack/web-api": minor
3+
---
4+
5+
feat: expand app manifest types — add `agent_view` and `assistant_view` features, recent agent events (`app_context_changed`, `assistant_thread_started`, `assistant_thread_context_changed`), optional OAuth scopes (`bot_optional`/`user_optional`), and event `metadata_subscriptions`

.changeset/oauth-error-classes.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
"@slack/oauth": major
3+
---
4+
5+
Error classes now extend a new `SlackOAuthError` abstract base class (which extends `Error`), bringing `@slack/oauth` in line with the error handling in `@slack/web-api` and `@slack/webhook`. You can catch any error thrown by this package with `if (error instanceof SlackOAuthError)`, in addition to the existing per-class `instanceof` checks (`AuthorizationError`, `InstallerInitializationError`, etc.).
6+
7+
`AuthorizationError` now populates the standard [`Error.cause`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause) property with the underlying error when one is available (for example, the failure that caused `authorize()` to reject). The existing `original` property is still present and carries the same value.
8+
9+
```javascript
10+
import { AuthorizationError } from '@slack/oauth';
11+
12+
try {
13+
await installer.authorize({ teamId, enterpriseId });
14+
} catch (error) {
15+
if (error instanceof AuthorizationError) {
16+
console.log(error.cause); // the underlying error
17+
console.log(error.original); // same value — kept for backward compat
18+
}
19+
}
20+
```
21+
22+
The `error.code` property and `ErrorCode` enum values are unchanged, so existing `error.code` checks continue to work. The `CodedError` interface is retained (it is part of the public `CallbackOptions#failure` callback signature), but for new code we recommend `instanceof` checks against `SlackOAuthError` or a specific subclass.
23+
24+
Note: `error.name` now reflects the specific class name (e.g. `'AuthorizationError'`) instead of the generic `'Error'`. If you branch on `error.name`, update those checks accordingly.

0 commit comments

Comments
 (0)