build: allow es2025 lib (#42612)

This commit is contained in:
Michael Kriese
2026-05-09 09:13:04 +02:00
committed by GitHub
parent cb96dee10b
commit b4362ffe1a
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -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
}
+1 -1
View File
@@ -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