将 stripe 从 22.x 升级到 23.x
根据 TypeScript 类型自动比较 stripe 22.6.2 与 23.0.0 的公开 API。签名变化表示可能存在不兼容变更,并非确定结论。
概要
| 已删除的导入路径 | 0 |
|---|---|
| 已删除的导出 | 0 |
| 已修改的签名 | 0 |
| 已删除的类或接口成员 | 2 |
| 已修改的类或接口成员 | 2 |
| 新增弃用 | 0 |
| 要求变化(engines、peer 依赖) | 2 |
| 新增导出 | 0 |
已删除的导出
未发现。
已修改的签名
未发现。
已删除的类或接口成员
| member | import | 之前 |
|---|---|---|
Stripe.constructEventWithoutVerification | stripe | (payload: string): Event |
default.constructEventWithoutVerification | stripe | (payload: string): Event |
已修改的类或接口成员
| member | 之前 | 之后 |
|---|---|---|
Stripe.static API_VERSION | "2026-08-26.dahlia" | "2026-09-30.endive" |
default.static API_VERSION | "2026-08-26.dahlia" | "2026-09-30.endive" |
新增弃用
未发现。
要求变化(engines、peer 依赖)
| 之前 | 之后 | |
|---|---|---|
engines.node | >=18 | >=20 |
peerDependencies.@types/node | >=18 | >=20 |
这些版本之间的 changelog
软件包作者发布的文本,按原样显示。
23.0.0
This release changes the pinned API version to `2026-09-30.endive`.
* [#2844](https://github.com/stripe/stripe-node/pull/2844) Support `EventNotification`s with singleton related objects
* [#2853](https://github.com/stripe/stripe-node/pull/2853) Allow suppressing Stripe notices
Set the `STRIPE_SUPPRESS_NOTICES` environment variable to `true` to suppress Stripe notices in test and sandbox environments when not running under a detected AI agent. Notices remain enabled by default and continue to be shown to AI agents.
* [#2850](https://github.com/stripe/stripe-node/pull/2850) Fix account scoping for `EventNotificationHandler` callback clients
- Fix callback clients to use the event's Stripe context and preserve client telemetry.
- Fix 400 errors when using an `EventNotificationHandler` with a `StripeClient` configured with `stripeAccount`.
* ⚠️ [#2856](https://github.com/stripe/stripe-node/pull/2856) Remove V1-only fields from V2 list response types
Remove the V1-only `object`, `has_more`, and `url` fields from `Stripe.V2List<T>`. These fields were never populated and were added only to maintain type compatibility when correcting the V2 list response type in a minor release.
* ⚠️ [#2862](https://github.com/stripe/stripe-node/pull/2862) Remove Stripe.constructEventWithoutVerification
Removed the function `Stripe.constructEventWithoutVerification()` that was mistakenly added in version 22.5.0 of this package. The same functionality can be achieved via stripe.webhooks.constructEventWithoutVerification(payload);
* ⚠️ Generate operation-specific address parameters for V2 requests
- Change V2 request address properties from shared V1 address parameter types to operation-specific V2 interfaces.
* ⚠️ [#2865](https://github.com/stripe/stripe-node/pull/2865) Remove `ErrorType` export
Remove the ErrorType interface from the top level client. Users can use .errors instead since it works as both a type and a value
* ⚠️ [#2868](https://github.com/stripe/stripe-node/pull/2868) Classify incomplete response bodies as connection errors
- Responses that stall or are severed before the body is complete now throw `StripeConnectionError` instead of `StripeAPIError`.
* Fix `NodeHttpClient` compatibility with HTTP request interceptors
- Fix `NodeHttpClient` requests hanging when using Nock 14 or MSW interceptors ([#2211](https://github.com/stripe/stripe-node/issues/2211)).
* ⚠️ Drop support for Node 18
Drop support for Node.js 18. Node.js 20 is now the minimum supported version.
* ⚠️ [#2876](https://github.com/stripe/stripe-node/pull/2876) Update verifyHeader and verifyHeaderAsync methods to use DEFAULT_TOLERANCE
`stripe.webhooks.signature.verifyHeader()` and `verifyHeaderAsync()` previously skipped timestamp tolerance verification when the `tolerance` argument was omitted. They now default to `Webhook.DEFAULT_TOLERANCE`
Passing 0 to stripe.webhooks.constructEvent now properly skips timestamp tolerance verification. Previously, passing 0 wou把这些数据交给你的 AI 智能体
Vigia 是免费的 MCP 服务器:你的编程智能体在写代码之前就能检查版本、不兼容变更和安全漏洞。无需注册,无需 API 密钥。
claude mcp add --transport http vigia https://vigia.coredls.cloud/mcp
添加到 Cursor添加到 VS Code★ 在 GitHub 上加星
任何其他 MCP 客户端
{ "mcpServers": { "vigia": { "url": "https://vigia.coredls.cloud/mcp" } } }常见问题
将 stripe 从 22 升级到 23 有哪些不兼容变更?
在 stripe 22.6.2 与 23.0.0 之间,Vigia 发现 0 个已删除的导出、0 个已修改的签名,以及 4 个已删除或修改的类或接口成员。
stripe 23 中弃用了哪些内容?
stripe 23.0.0 中有 0 个导出或成员新被标记为弃用。
供智能体使用
GET https://vigia.coredls.cloud/v1/packages/npm/stripe/upgrade?from=22.6.2&to=23.0.0