From efe57da68612cd29bc3af036a7b738406a11d832 Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Tue, 8 Jul 2025 07:24:13 -0400 Subject: [PATCH] Fix regex for quoting file names to include + (caused pnpm directories to not match since they use +) --- components/bin/pack | 2 +- components/webpack.common.cjs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/bin/pack b/components/bin/pack index 11d399e2c..ebcf8a214 100755 --- a/components/bin/pack +++ b/components/bin/pack @@ -42,7 +42,7 @@ const bundle = (process.argv[3] || 'bundle'); * @return {RegExp} The regular expression for the name, */ function fileRegExp(name) { - return new RegExp(name.replace(/([\\.{}[\]()?*^$])/g, '\\$1'), 'g'); + return new RegExp(name.replace(/([\\.{}[\]()?*+^$])/g, '\\$1'), 'g'); } /** diff --git a/components/webpack.common.cjs b/components/webpack.common.cjs index 4ddac4795..3b56070f9 100644 --- a/components/webpack.common.cjs +++ b/components/webpack.common.cjs @@ -35,7 +35,7 @@ const DIRNAME = __dirname; * @return {string} The string with regex special characters escaped */ function quoteRE(string) { - return string.replace(/([\\.{}[\]()?*^$])/g, '\\$1'); + return string.replace(/([\\.{}[\]()?*+^$])/g, '\\$1'); } /****************************************************************/