Remove useless u flags in regular expressions (#18509)

This commit is contained in:
fisker Cheung authored and GitHub committed 2025-12-21 23:44:08 +08:00
1 parent 97f2e81d06
commit c9eb4bcd9e
131 files changed
+388 -405

No files matched your search

+2 -2
View File
@@ -49,7 +49,7 @@ function getEsbuildOptions({ packageConfig, file, cliOptions, buildOptions }) {
process(text) {
const exports = [
...text.matchAll(
/(?<=\n)exports\.(?<specifier>\w+) = \k<specifier>;/gu,
/(?<=\n)exports\.(?<specifier>\w+) = \k<specifier>;/g,
),
].map((match) => match.groups.specifier);
@@ -93,7 +93,7 @@ function getEsbuildOptions({ packageConfig, file, cliOptions, buildOptions }) {
// #12493, not sure what the problem is, but replace the cjs version with esm version seems fix it
{
module: require.resolve("tslib"),
path: require.resolve("tslib").replace(/tslib\.js$/u, "tslib.es6.js"),
path: require.resolve("tslib").replace(/tslib\.js$/, "tslib.es6.js"),
},
// https://github.com/evanw/esbuild/issues/2103
{