From 29febd29d99ae35f74233690cb2d478649f95789 Mon Sep 17 00:00:00 2001 From: Misha Kaletsky <15040698+mmkal@users.noreply.github.com> Date: Sun, 19 Dec 2021 18:39:56 +0000 Subject: [PATCH] feat: add functionName to callsite frames (#321) * Add functionName to callsite frames * Add functionName to type * Fix lint errors * fix: add to declarations Co-authored-by: Misha Kaletsky --- src/declarations.d.ts | 1 + src/routines/executeQuery.ts | 1 + src/types.ts | 1 + 3 files changed, 3 insertions(+) diff --git a/src/declarations.d.ts b/src/declarations.d.ts index fd54e54c..08bd2c77 100644 --- a/src/declarations.d.ts +++ b/src/declarations.d.ts @@ -2,6 +2,7 @@ declare module 'get-stack-trace' { export const getStackTrace: () => Promise>; } diff --git a/src/routines/executeQuery.ts b/src/routines/executeQuery.ts index 1df0b429..cf5638ce 100644 --- a/src/routines/executeQuery.ts +++ b/src/routines/executeQuery.ts @@ -145,6 +145,7 @@ export const executeQuery = async ( return { columnNumber: callSite.columnNumber, fileName: callSite.fileName, + functionName: callSite.functionName, lineNumber: callSite.lineNumber, }; }); diff --git a/src/types.ts b/src/types.ts index 126cd76e..0c10b978 100644 --- a/src/types.ts +++ b/src/types.ts @@ -240,6 +240,7 @@ export type ConnectionContextType = { type CallSiteType = { readonly columnNumber: number, readonly fileName: string | null, + readonly functionName: string | null, readonly lineNumber: number, };