From da87247f5d757678511c78f4a2ea2984e9577eb1 Mon Sep 17 00:00:00 2001 From: Oj Date: Mon, 7 Jun 2021 19:01:55 +0100 Subject: [PATCH] [PCCompatCheck] Better module.exports ignoring (accept no value inline) --- scripts/pccompatCheck.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/pccompatCheck.js b/scripts/pccompatCheck.js index ff915a7..1031ec3 100644 --- a/scripts/pccompatCheck.js +++ b/scripts/pccompatCheck.js @@ -57,7 +57,7 @@ for (const jsFile of glob.sync(`${cloneDir}/**/*.js`).concat(glob.sync(`${cloneD imp = imp.trim().split(':')[0]; const searchRegex1 = new RegExp(`^export.*${imp}.*$`, 'gm'); - const searchRegex2 = new RegExp(`^ *${imp}: `, 'gm'); + const searchRegex2 = new RegExp(`^ *${imp}[:,]`, 'gm'); const searchMatch = aliasJS.match(searchRegex1) || aliasJS.match(searchRegex2);