diff --git a/lib/util/regex.ts b/lib/util/regex.ts index 2f5263c0e5..f3735d2bcf 100644 --- a/lib/util/regex.ts +++ b/lib/util/regex.ts @@ -68,6 +68,11 @@ export function regEx( } } +/** + * Escapes any RegExp syntax characters in the input string, returning a new string that can be safely interpolated into a RegExp as a literal string to match. + * + * @deprecated use `RegExp.escape` instead + */ export function escapeRegExp(input: string): string { return input.replace(regEx(/[.*+\-?^${}()|[\]\\]/g), '\\$&'); // $& means the whole matched string } diff --git a/tsconfig.json b/tsconfig.json index 08badf3a25..63a3c13534 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -19,7 +19,7 @@ "noImplicitOverride": true, "useUnknownInCatchVariables": false /* we aren't prepared for enabling this by default since ts 4.4*/, "isolatedModules": true /* required for tsdown */, - "lib": ["ES2024"], + "lib": ["ES2025"] /* node v24.11.0+ supports ES2025 */, "types": ["node", "vitest/globals"], "checkJs": true, "skipLibCheck": true, // https://github.com/vitejs/vite/discussions/12466#discussioncomment-7596971