File tree Expand file tree Collapse file tree
packages/core/src/integrations Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -378,7 +378,10 @@ export function _sanitizeSqlQuery(sqlQuery: string | undefined): string {
378378 . replace ( / - ? \b \d + \. ? \d * [ e E ] [ + - ] ? \d + \b / g, '?' ) // Scientific notation
379379 . replace ( / - ? \b \d + \. \d + \b / g, '?' ) // Decimals
380380 . replace ( / - ? \. \d + \b / g, '?' ) // Decimals starting with dot
381- . replace ( / (?< ! \$ ) - ? \b \d + \b / g, '?' ) // Integers (NOT $n placeholders)
381+ // Constructed via `new RegExp` so the negative lookbehind is evaluated at
382+ // runtime. As a literal, it is a parse-time SyntaxError on Safari <16.4 —
383+ // which breaks any browser bundle that reaches this module via the core barrel.
384+ . replace ( new RegExp ( '(?<!\\$)-?\\b\\d+\\b' , 'g' ) , '?' ) // Integers (NOT $n placeholders)
382385 // Collapse IN clauses for cardinality (both ? and $n variants)
383386 . replace ( / \b I N \b \s * \( \s * \? (?: \s * , \s * \? ) * \s * \) / gi, 'IN (?)' )
384387 . replace ( / \b I N \b \s * \( \s * \$ \d + (?: \s * , \s * \$ \d + ) * \s * \) / gi, 'IN ($?)' )
You can’t perform that action at this time.
0 commit comments