Files
AFFiNE-Mirror/tools
renovate[bot] 8df82901ea chore: bump up @slack/web-api version to v8 (#15405)
This PR contains the following updates:

| Package | Change |
[Age](https://docs.renovatebot.com/merge-confidence/) |
[Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [@slack/web-api](https://docs.slack.dev/tools/node-slack-sdk/web-api/)
([source](https://redirect.github.com/slackapi/node-slack-sdk)) |
[`^7.15.1` →
`^8.0.0`](https://renovatebot.com/diffs/npm/@slack%2fweb-api/7.15.1/8.0.0)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/@slack%2fweb-api/8.0.0?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@slack%2fweb-api/7.15.1/8.0.0?slim=true)
|

---

### Release Notes

<details>
<summary>slackapi/node-slack-sdk (@&#8203;slack/web-api)</summary>

###
[`v8.0.0`](https://redirect.github.com/slackapi/node-slack-sdk/releases/tag/%40slack/web-api%408.0.0)

[Compare
Source](https://redirect.github.com/slackapi/node-slack-sdk/compare/@slack/web-api@7.19.0...@slack/web-api@8.0.0)

##### Major Changes

-
[`fc98c8c`](https://redirect.github.com/slackapi/node-slack-sdk/commit/fc98c8c):
Drop Node.js 18 support. The minimum supported Node.js version is now
20.

-
[`fc98c8c`](https://redirect.github.com/slackapi/node-slack-sdk/commit/fc98c8c):
Redesigned error handling to use proper `Error` subclasses instead of
plain objects with a `code` property.

**Migration:** Replace `if (error.code === ErrorCode.PlatformError)`
with `if (error instanceof WebAPIPlatformError)`. All error classes
extend a common `SlackError` base class (which extends `Error`), so you
can also catch all SDK errors with `if (error instanceof SlackError)`.

  **New error class hierarchy:**

  - `SlackError` (abstract base)
    - `WebAPIPlatformError` — Slack API returned `ok: false`
- `WebAPIRequestError` — Network/transport failure (original error in
`cause`)
    - `WebAPIHTTPError` — Non-200 HTTP status from Slack
    - `WebAPIRateLimitedError` — HTTP 429 with `retryAfter` seconds
- `WebAPIFileUploadInvalidArgumentsError` — Invalid file upload
arguments
- `WebAPIFileUploadReadFileDataError` — Failed to read file data for
upload

**Removed factory functions** (these were internal but exported — use
`new` with the corresponding class instead):

  - `errorWithCode()`
  - `platformErrorFromResult()` → `new WebAPIPlatformError(...)`
  - `requestErrorWithOriginal()` → `new WebAPIRequestError(...)`
  - `httpErrorFromResponse()` → `new WebAPIHTTPError(...)`
  - `rateLimitedErrorWithDelay()` → `new WebAPIRateLimitedError(...)`

  **Other breaking type changes:**

- `WebAPIHTTPError.headers` type changed from `IncomingHttpHeaders` to
`Record<string, string>`.
- The `CodedError` interface is deprecated — use `instanceof` checks
with specific error classes instead.
- Error `.name` values changed from generic `'Error'` to descriptive
class names (e.g., `'WebAPIPlatformError'`).

-
[`fc98c8c`](https://redirect.github.com/slackapi/node-slack-sdk/commit/fc98c8c):
Replaced `axios` with the standard Fetch API for all HTTP transport. The
following options and types have been removed from `WebClientOptions`:

- **`agent`** — Use the new `fetch` option to provide a custom fetch
implementation with proxy or keep-alive support. For proxies, prefer the
built-in `http.setGlobalProxyFromEnv()` or `NODE_USE_ENV_PROXY=1`
(Node.js 24+). For advanced use cases:
    ```ts
    import { fetch, Agent } from "undici";
    const client = new WebClient(token, {
      fetch: (url, init) =>
        fetch(url, {
          ...init,
          dispatcher: new Agent({ keepAliveTimeout: 60_000 }),
        }),
    });
    ```
- **`tls`** and **`TLSOptions`** — Configure TLS via a custom `fetch`
implementation with an undici `Agent`, or use the `NODE_EXTRA_CA_CERTS`
environment variable.
- **`requestInterceptor`** and **`RequestInterceptor`** type — Wrap the
`fetch` function to intercept or modify requests before they are sent.
- **`adapter`** and **`AdapterConfig`** type — Use the `fetch` option
instead.
- **`RequestConfig`** type (was an alias for Axios'
`InternalAxiosRequestConfig`) — Removed entirely.
- **`attachOriginalToWebAPIRequestError`** option — Removed. The
original error is now always available via the standard `cause` property
on `WebAPIRequestError`.

The dependencies `axios`, `form-data`, `is-electron`, and `is-stream`
have been removed. The default `fetch` implementation is
`globalThis.fetch` (available in Node.js 20+).

New exported types for custom fetch implementations: `FetchFunction`,
`FetchResponse`, `FetchRequestInit`, `FetchHeaders`.

-
[`fc98c8c`](https://redirect.github.com/slackapi/node-slack-sdk/commit/fc98c8c):
Removed previously-deprecated API methods and their associated
request/response types:

- **`files.upload`** — Use `filesUploadV2` instead (available since
v6.7). The `filesUploadV2` method handles the multi-step upload process
automatically.
- **`rtm.start`** — Use `rtm.connect` instead. The `rtm.start` method
was deprecated by Slack in favor of the lighter-weight `rtm.connect`.
- **`workflows.stepCompleted`**, **`workflows.stepFailed`**,
**`workflows.updateStep`** — These methods supported the retired [Steps
from
Apps](https://api.slack.com/changelog/2023-08-workflow-steps-from-apps-step-back)
feature (deprecated August 2023, retired September 2024). The
`workflows.featured.*` and `admin.workflows.*` methods for the current
Workflow Builder remain available.

##### Minor Changes

-
[`fc98c8c`](https://redirect.github.com/slackapi/node-slack-sdk/commit/fc98c8c):
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`

##### Patch Changes

-
[`bb49d99`](https://redirect.github.com/slackapi/node-slack-sdk/commit/bb49d99):
fix: apply redact() to API response bodies in debug logs and recurse
into nested objects, preventing tokens from leaking into logs when debug
logging is enabled
- Updated dependencies
\[[`fc98c8c`](https://redirect.github.com/slackapi/node-slack-sdk/commit/fc98c8c)]
- Updated dependencies
\[[`fc98c8c`](https://redirect.github.com/slackapi/node-slack-sdk/commit/fc98c8c)]
-
[@&#8203;slack/logger](https://redirect.github.com/slack/logger)@&#8203;5.0.0
-
[@&#8203;slack/types](https://redirect.github.com/slack/types)@&#8203;3.0.0

###
[`v7.19.0`](https://redirect.github.com/slackapi/node-slack-sdk/releases/tag/%40slack/web-api%407.19.0)

[Compare
Source](https://redirect.github.com/slackapi/node-slack-sdk/compare/@slack/web-api@7.18.0...@slack/web-api@7.19.0)

##### Minor Changes

-
[`a795b86`](https://redirect.github.com/slackapi/node-slack-sdk/commit/a795b86):
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`

###
[`v7.18.0`](https://redirect.github.com/slackapi/node-slack-sdk/releases/tag/%40slack/web-api%407.18.0)

[Compare
Source](https://redirect.github.com/slackapi/node-slack-sdk/compare/@slack/web-api@7.17.0...@slack/web-api@7.18.0)

##### Minor Changes

-
[`07744de`](https://redirect.github.com/slackapi/node-slack-sdk/commit/07744de):
feat: make `thread_ts` optional for
`assistant.threads.setSuggestedPrompts`

###
[`v7.17.0`](https://redirect.github.com/slackapi/node-slack-sdk/releases/tag/%40slack/web-api%407.17.0)

[Compare
Source](https://redirect.github.com/slackapi/node-slack-sdk/compare/@slack/web-api@7.16.0...@slack/web-api@7.17.0)

##### Minor Changes

-
[`2085900`](https://redirect.github.com/slackapi/node-slack-sdk/commit/2085900):
feat: expose public read-only `ts` getter on `ChatStreamer` for fallback
to [`chat.update`](https://docs.slack.dev/reference/methods/chat.update)
when a stream expires server-side

  ```js
  import { WebClient } from "@&#8203;slack/web-api";

  const client = new WebClient(process.env.SLACK_BOT_TOKEN);

  const streamer = client.chatStream({
    channel: "C0123456789",
    thread_ts: "1700000001.123456",
    recipient_team_id: "T0123456789",
    recipient_user_id: "U0123456789",
  });

  await streamer.append({ markdown_text: "hello!" });
  // streamer.ts is now set after the first flush
  console.log(streamer.ts);

  await streamer.stop();
  ```

###
[`v7.16.0`](https://redirect.github.com/slackapi/node-slack-sdk/releases/tag/%40slack/web-api%407.16.0)

[Compare
Source](https://redirect.github.com/slackapi/node-slack-sdk/compare/@slack/web-api@7.15.2...@slack/web-api@7.16.0)

##### Minor Changes

-
[`2814969`](https://redirect.github.com/slackapi/node-slack-sdk/commit/2814969):
feat: add `highlight_type` to
[`files.completeUploadExternal`](https://docs.slack.dev/reference/methods/files.completeUploadExternal)
and
[`filesUploadV2`](https://docs.slack.dev/tools/node-slack-sdk/web-api#upload-a-file)
for optimistic rendering

  ```js
  import { WebClient } from "@&#8203;slack/web-api";

  const client = new WebClient(process.env.SLACK_BOT_TOKEN);

  await client.filesUploadV2({
    channel_id: "C0123456789",
    file: "./image.png",
    filename: "image.png",
    title: "Image Upload",
    highlight_type: "png",
  });
  ```

###
[`v7.15.2`](https://redirect.github.com/slackapi/node-slack-sdk/releases/tag/%40slack/web-api%407.15.2)

[Compare
Source](https://redirect.github.com/slackapi/node-slack-sdk/compare/@slack/web-api@7.15.1...@slack/web-api@7.15.2)

##### Patch Changes

-
[`4b6fe3a`](https://redirect.github.com/slackapi/node-slack-sdk/commit/4b6fe3a):
feat: add authorship arguments - `icon_emoji`, `icon_url`, and
`username` - to the
[`assistant.threads.setStatus`](https://docs.slack.dev/reference/methods/assistant.threads.setStatus/)
and
[`chat.startStream`](https://docs.slack.dev/reference/methods/chat.startStream/)
methods
- Updated dependencies
\[[`4f03ee8`](https://redirect.github.com/slackapi/node-slack-sdk/commit/4f03ee8)]
-
[@&#8203;slack/types](https://redirect.github.com/slack/types)@&#8203;2.21.0

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/toeverything/AFFiNE).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4zLjIiLCJ1cGRhdGVkSW5WZXIiOiI0NC4zLjIiLCJ0YXJnZXRCcmFuY2giOiJjYW5hcnkiLCJsYWJlbHMiOlsiZGVwZW5kZW5jaWVzIl19-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-08-01 17:28:05 +08:00
..
2026-06-24 23:55:19 +08:00
2026-06-24 23:55:19 +08:00
2026-06-24 23:55:19 +08:00