codeplay-common 3.2.14 โ 3.2.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -658,9 +658,15 @@ function scanDirectory(dir) {
|
|
|
658
658
|
|
|
659
659
|
// ๐จ Special check ONLY for common-configuration.js
|
|
660
660
|
if (dir === STATUSBAR_FILE) {
|
|
661
|
-
|
|
661
|
+
let content = fs.readFileSync(dir, 'utf8');
|
|
662
|
+
|
|
663
|
+
// ๐งน Remove ALL comments (single-line + multi-line)
|
|
664
|
+
const contentWithoutComments = content
|
|
665
|
+
.replace(/\/\/.*$/gm, '') // remove // comments
|
|
666
|
+
.replace(/\/\*[\s\S]*?\*\//g, ''); // remove /* */ comments
|
|
662
667
|
|
|
663
|
-
|
|
668
|
+
// โ
Now check only real code
|
|
669
|
+
if (contentWithoutComments.includes('Capacitor.Plugins.StatusBar.setStyle')) {
|
|
664
670
|
console.error(`\nโ ERROR: StatusBar.setStyle should NOT be used in common-configuration.js`);
|
|
665
671
|
console.error(`๐ซ iOS status bar is controlled via other methods. Remove this line.`);
|
|
666
672
|
console.error(`๐ File: ${dir}\n`);
|
|
@@ -30,10 +30,17 @@ Note: This changes are added with my old(current) code. Might we need to integra
|
|
|
30
30
|
const STATUSBAR_REGEX = /^(?!\s*\/\/).*Capacitor\.Plugins\.StatusBar\.setStyle/m;
|
|
31
31
|
....
|
|
32
32
|
....
|
|
33
|
+
// ๐จ Special check ONLY for common-configuration.js
|
|
33
34
|
if (dir === STATUSBAR_FILE) {
|
|
34
|
-
|
|
35
|
+
let content = fs.readFileSync(dir, 'utf8');
|
|
35
36
|
|
|
36
|
-
|
|
37
|
+
// ๐งน Remove ALL comments (single-line + multi-line)
|
|
38
|
+
const contentWithoutComments = content
|
|
39
|
+
.replace(/\/\/.*$/gm, '') // remove // comments
|
|
40
|
+
.replace(/\/\*[\s\S]*?\*\//g, ''); // remove /* */ comments
|
|
41
|
+
|
|
42
|
+
// โ
Now check only real code
|
|
43
|
+
if (contentWithoutComments.includes('Capacitor.Plugins.StatusBar.setStyle')) {
|
|
37
44
|
console.error(`\nโ ERROR: StatusBar.setStyle should NOT be used in common-configuration.js`);
|
|
38
45
|
console.error(`๐ซ iOS status bar is controlled via other methods. Remove this line.`);
|
|
39
46
|
console.error(`๐ File: ${dir}\n`);
|