mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-02 09:59:55 +08:00
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) |  |  | --- ### Release Notes <details> <summary>slackapi/node-slack-sdk (@​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)] - [@​slack/logger](https://redirect.github.com/slack/logger)@​5.0.0 - [@​slack/types](https://redirect.github.com/slack/types)@​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 "@​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 "@​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)] - [@​slack/types](https://redirect.github.com/slack/types)@​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>
This commit is contained in:
@@ -268,7 +268,7 @@ __metadata:
|
||||
resolution: "@affine/changelog@workspace:tools/changelog"
|
||||
dependencies:
|
||||
"@napi-rs/simple-git": "npm:^1.0.0"
|
||||
"@slack/web-api": "npm:^7.15.1"
|
||||
"@slack/web-api": "npm:^8.0.0"
|
||||
"@types/node": "npm:^22.0.0"
|
||||
changelogithub: "npm:^13.0.0"
|
||||
jsx-slack: "npm:^6.1.2"
|
||||
@@ -363,7 +363,7 @@ __metadata:
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@affine/copilot-result@workspace:tools/copilot-result"
|
||||
dependencies:
|
||||
"@slack/web-api": "npm:^7.15.1"
|
||||
"@slack/web-api": "npm:^8.0.0"
|
||||
"@types/node": "npm:^22.0.0"
|
||||
jsx-slack: "npm:^6.1.2"
|
||||
marked: "npm:^15.0.12"
|
||||
@@ -15306,39 +15306,42 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@slack/logger@npm:^4.0.1":
|
||||
version: 4.0.1
|
||||
resolution: "@slack/logger@npm:4.0.1"
|
||||
"@slack/logger@npm:^5.0.0":
|
||||
version: 5.0.0
|
||||
resolution: "@slack/logger@npm:5.0.0"
|
||||
dependencies:
|
||||
"@types/node": "npm:>=18"
|
||||
checksum: 10/17e51749aa484262baa6cd8b057b7b2331ea6b140040d371c05ebe57ba61895c53b87e7e5bbfb1687c8e56199a78b36d675f06c35d8e20a363eabd9632cc8e96
|
||||
"@types/node": "npm:>=20"
|
||||
checksum: 10/1205051e827a048e12467c3c78a3f93880522dcc92450c25bb12771dc17f72831daae0cff98778919c9b5b3d41ec884de9a968681d6ea0cdc9ab02785adc09c4
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@slack/types@npm:^2.11.0, @slack/types@npm:^2.20.1":
|
||||
"@slack/types@npm:^2.11.0":
|
||||
version: 2.20.1
|
||||
resolution: "@slack/types@npm:2.20.1"
|
||||
checksum: 10/5d13017df8c8468f34e4d24579a26f5ada934a6b7139e88d894c7d1d14f47da826a20c08e2537c6ab74d7624a4b193dc2b34458bae6466173fad1fd5c053b6f6
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@slack/web-api@npm:^7.15.1":
|
||||
version: 7.15.1
|
||||
resolution: "@slack/web-api@npm:7.15.1"
|
||||
"@slack/types@npm:^3.0.0":
|
||||
version: 3.0.0
|
||||
resolution: "@slack/types@npm:3.0.0"
|
||||
checksum: 10/30ae3fc5b28f7275f155edc1628284099ec814fd80843d76d410b4c36317f4aefc4f35938bbacc0aaff4ca9dbd8777ededb241f771c7e02e835828a07c376f85
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@slack/web-api@npm:^8.0.0":
|
||||
version: 8.0.0
|
||||
resolution: "@slack/web-api@npm:8.0.0"
|
||||
dependencies:
|
||||
"@slack/logger": "npm:^4.0.1"
|
||||
"@slack/types": "npm:^2.20.1"
|
||||
"@types/node": "npm:>=18"
|
||||
"@slack/logger": "npm:^5.0.0"
|
||||
"@slack/types": "npm:^3.0.0"
|
||||
"@types/node": "npm:>=20"
|
||||
"@types/retry": "npm:0.12.0"
|
||||
axios: "npm:^1.15.0"
|
||||
eventemitter3: "npm:^5.0.1"
|
||||
form-data: "npm:^4.0.4"
|
||||
is-electron: "npm:2.2.2"
|
||||
is-stream: "npm:^2"
|
||||
p-queue: "npm:^6"
|
||||
p-retry: "npm:^4"
|
||||
retry: "npm:^0.13.1"
|
||||
checksum: 10/adcb05f19109756a0f2a4cd1f3706ec04a3a304449d1f96f74e39bc2b2d8026730cb688aca09884462f829f92b652408e0495e1dc9aa31f653c6a75ba4489544
|
||||
checksum: 10/88526cee2502f279ed42160d0f8710e5adfbfe6b28a41151ed8978f8bb090914b749b4f5b14fe7f03cbb5ae666df36d650c6e3275f7b03b21929dce751c65f7f
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -16974,12 +16977,12 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/node@npm:*, @types/node@npm:>=10.0.0, @types/node@npm:>=13.7.0, @types/node@npm:>=18, @types/node@npm:>=20.0.0, @types/node@npm:>=8.1.0":
|
||||
version: 25.6.0
|
||||
resolution: "@types/node@npm:25.6.0"
|
||||
"@types/node@npm:*, @types/node@npm:>=10.0.0, @types/node@npm:>=13.7.0, @types/node@npm:>=20, @types/node@npm:>=20.0.0, @types/node@npm:>=8.1.0":
|
||||
version: 26.1.2
|
||||
resolution: "@types/node@npm:26.1.2"
|
||||
dependencies:
|
||||
undici-types: "npm:~7.19.0"
|
||||
checksum: 10/99b18690a4be55904cbf8f6a6ac8eed5ec5b8d791fdd8ee2ae598b46c0fa9b83cda7b70dd7f00dbfb18189dcfc67648fdc7fdd3fcced2619a5a6453d9aec107d
|
||||
undici-types: "npm:~8.3.0"
|
||||
checksum: 10/2dd6d75b80c006deab4e381acc8cb2e3d634f10141f05fd6cadaabddd80a95f04aef7b00a574bd8fd5e08e940b899c23b91dd09a70b11a34a2762203b5eea25e
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -19090,18 +19093,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"axios@npm:^1.15.0":
|
||||
version: 1.18.1
|
||||
resolution: "axios@npm:1.18.1"
|
||||
dependencies:
|
||||
follow-redirects: "npm:^1.16.0"
|
||||
form-data: "npm:^4.0.5"
|
||||
https-proxy-agent: "npm:^5.0.1"
|
||||
proxy-from-env: "npm:^2.1.0"
|
||||
checksum: 10/c4cdced3ee0a9bf7dcae189fbc74a124aa079d4f04dbd995e602d39c1419476e8d021f87ee39ac8d8398e5a55e6d0b986238b3645f0d9177ac80de87c2a73f18
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"babel-plugin-macros@npm:^3.1.0":
|
||||
version: 3.1.0
|
||||
resolution: "babel-plugin-macros@npm:3.1.0"
|
||||
@@ -23972,7 +23963,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"follow-redirects@npm:^1.0.0, follow-redirects@npm:^1.16.0":
|
||||
"follow-redirects@npm:^1.0.0":
|
||||
version: 1.16.0
|
||||
resolution: "follow-redirects@npm:1.16.0"
|
||||
peerDependenciesMeta:
|
||||
@@ -25238,7 +25229,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"https-proxy-agent@npm:^5.0.0, https-proxy-agent@npm:^5.0.1":
|
||||
"https-proxy-agent@npm:^5.0.0":
|
||||
version: 5.0.1
|
||||
resolution: "https-proxy-agent@npm:5.0.1"
|
||||
dependencies:
|
||||
@@ -25740,13 +25731,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"is-electron@npm:2.2.2":
|
||||
version: 2.2.2
|
||||
resolution: "is-electron@npm:2.2.2"
|
||||
checksum: 10/de5aa8bd8d72c96675b8d0f93fab4cc21f62be5440f65bc05c61338ca27bd851a64200f31f1bf9facbaa01b3dbfed7997b2186741d84b93b63e0aff1db6a9494
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"is-extglob@npm:^2.1.1":
|
||||
version: 2.1.1
|
||||
resolution: "is-extglob@npm:2.1.1"
|
||||
@@ -25933,7 +25917,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"is-stream@npm:^2, is-stream@npm:^2.0.0":
|
||||
"is-stream@npm:^2.0.0":
|
||||
version: 2.0.1
|
||||
resolution: "is-stream@npm:2.0.1"
|
||||
checksum: 10/b8e05ccdf96ac330ea83c12450304d4a591f9958c11fd17bed240af8d5ffe08aedafa4c0f4cfccd4d28dc9d4d129daca1023633d5c11601a6cbc77521f6fae66
|
||||
@@ -30993,13 +30977,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"proxy-from-env@npm:^2.1.0":
|
||||
version: 2.1.0
|
||||
resolution: "proxy-from-env@npm:2.1.0"
|
||||
checksum: 10/fbbaf4dab2a6231dc9e394903a5f66f20475e36b734335790b46feb9da07c37d6b32e2c02e3e2ea4d4b23774c53d8562e5b7cc73282cb43f4a597b7eacaee2ee
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"pstree.remy@npm:^1.1.8":
|
||||
version: 1.1.8
|
||||
resolution: "pstree.remy@npm:1.1.8"
|
||||
@@ -34637,10 +34614,10 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"undici-types@npm:~7.19.0":
|
||||
version: 7.19.2
|
||||
resolution: "undici-types@npm:7.19.2"
|
||||
checksum: 10/05c34c63444c8caca7137f122b29ed50c1d7d05d1e0b2337f423575d3264054c4a0139e47e82e65723d09b97fcad6d8b0223b3550430a9006cc00e72a1e035bf
|
||||
"undici-types@npm:~8.3.0":
|
||||
version: 8.3.0
|
||||
resolution: "undici-types@npm:8.3.0"
|
||||
checksum: 10/6681d2837ac75a75ac1cc46090aa2b8ddc7c6b8ecc295a6cdb06838752a730da3d8afeecf05e5ab7903160eafad3a8b6ffa1927e5ded260590f4d4fef18646d5
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
|
||||
Reference in New Issue
Block a user