Vigia

Nâng cấp nock từ 14.x lên 15.x

So sánh API công khai của nock 14.0.17 và 15.0.1, được tính tự động từ kiểu TypeScript. Chữ ký thay đổi là thay đổi có thể không tương thích, không phải điều chắc chắn.

Tóm tắt

Đường dẫn import bị xóa0
Export bị xóa42
Chữ ký thay đổi0
Thành viên lớp hoặc interface bị xóa0
Thành viên lớp hoặc interface thay đổi0
Mới bị ngừng hỗ trợ0
Thay đổi yêu cầu (engines, phụ thuộc peer)1
Export mới1

Export bị xóa

importexportkindTrước
nockBackinterfaceinterface
nockBodytypestring | Record<string, any>
nockbackvariable(fixtureName: string, nockedFn: (nockDone: () => void) => void): void | (fixtureName: string, options: BackOptions, nockedFn: (nockDone: () => void) => void): void | (fixtureName: string, options?: BackOptions | undefined): Promise<{ nockDone: () => void; context: BackContext; }>
nockloadfunction(path: string): Scope[]
nockScopeinterfaceinterface
nockdefinefunction(defs: Definition[]): Scope[]
nockisDonefunction(): boolean
nockOptionsinterfaceinterface
nockemittervariableNodeJS.EventEmitter
nockrestorefunction(): void
nockBackModetype"wild" | "dryrun" | "record" | "update" | "lockdown"
nockRecorderinterfaceinterface
nockactivatefunction(): void
nockcleanAllfunction(): void
nockisActivefunction(): boolean
nockloadDefsfunction(path: string): Definition[]
nockrecordervariableRecorder
nockReplyBodytypeany
nockDefinitioninterfaceinterface
nockStatusCodetypenumber
nockBackContextinterfaceinterface
nockBackOptionsinterfaceinterface
nockDataMatchertypestring | number | boolean | RegExp | DataMatcherArray | DataMatcherMap | null | undefined
nockInterceptorinterfaceinterface
nockactiveMocksfunction(): string[]
nockReplyHeaderstypeRecord<string, ReplyHeaderValue> | Map<string, ReplyHeaderValue> | ReplyHeaderValue[]
nockpendingMocksfunction(): string[]
nockReplyFnResulttypereadonly [number] | readonly [number, any] | readonly [number, any, ReplyHeaders]
nockDataMatcherMapinterfaceinterface
nockReplyFnContextinterfaceinterface
nockRecorderOptionsinterfaceinterface
nockDataMatcherArrayinterfaceinterface
nockReplyHeaderValuetypestring | string[] | ReplyHeaderFunction
nockenableNetConnectfunction(matcher?: string | RegExp | ((host: string) => boolean) | undefined): void
nockInterceptFunctiontype(uri: string | RegExp | ((uri: string) => boolean), requestBody?: any, interceptorOptions?: Options | undefined) => Interceptor
nockdisableNetConnectfunction(): void
nockremoveInterceptorfunction(interceptor: any): boolean
nockInterceptorSurfaceinterfaceinterface
nockRequestBodyMatchertypeany
nockReplyHeaderFunctiontype(req: ClientRequest, res: IncomingMessage, body: any) => string | string[]
nockRequestHeaderMatchertypestring | RegExp | ((fieldValue: string) => boolean)
nockabortPendingRequestsfunction(): void

Chữ ký thay đổi

Không phát hiện.

Thành viên lớp hoặc interface bị xóa

Không phát hiện.

Thành viên lớp hoặc interface thay đổi

Không phát hiện.

Mới bị ngừng hỗ trợ

Không phát hiện.

Thay đổi yêu cầu (engines, phụ thuộc peer)

TrướcSau
engines.node>=18.20.0 <20 || >=20.12.1>=20.12.1
Export mới (1)
importexportkind
nockdefaultfunction

Cung cấp dữ liệu này cho tác tử AI của bạn

Vigia là máy chủ MCP miễn phí: tác tử lập trình của bạn kiểm tra phiên bản, thay đổi phá vỡ tương thích và lỗ hổng trước khi viết mã. Không cần đăng ký, không cần khóa API.

claude mcp add --transport http vigia https://vigia.coredls.cloud/mcp

Thêm vào CursorThêm vào VS Code★ Gắn sao trên GitHub

Mọi ứng dụng MCP khác
{ "mcpServers": { "vigia": { "url": "https://vigia.coredls.cloud/mcp" } } }

Kỹ năng cho tác tử (SKILL.md): cho tác tử biết khi nào dùng Vigia · GitHub Action cho pull request

Câu hỏi thường gặp

Nâng cấp nock từ 14 lên 15 có những thay đổi không tương thích nào?

Giữa nock 14.0.17 và 15.0.1, Vigia tìm thấy 42 export bị xóa, 0 chữ ký thay đổi và 0 thành viên lớp hoặc interface bị xóa hay thay đổi.

Những gì bị ngừng hỗ trợ trong nock 15?

0 export hoặc thành viên mới bị đánh dấu ngừng hỗ trợ trong nock 15.0.1.

Dành cho tác tử

GET https://vigia.coredls.cloud/v1/packages/npm/nock/upgrade?from=14.0.17&to=15.0.1