codeplay-common 2.1.14 → 2.1.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.
|
@@ -11,7 +11,10 @@ const configPath = path.join(process.cwd(), 'capacitor.config.json');
|
|
|
11
11
|
// Expected plugin list with minimum versions
|
|
12
12
|
const requiredPlugins = [
|
|
13
13
|
{ pattern: /backbutton-(\d+\.\d+)\.js$/, minVersion: '1.6', required: true, baseDir: 'js' },
|
|
14
|
-
|
|
14
|
+
|
|
15
|
+
/*/common-(\d+\.\d+)\.js$/*/
|
|
16
|
+
{ pattern: /common-(\d+\.\d+)(?:-beta-(\d+))?\.js$/, minVersion: '5.2', required: true, baseDir: 'js' },
|
|
17
|
+
|
|
15
18
|
{ pattern: /localization_settings-(\d+\.\d+)\.js$/, minVersion: '1.1', required: true, baseDir: 'js' },
|
|
16
19
|
{ pattern: /localization-(\d+\.\d+)\.js$/, minVersion: '1.3', required: true, baseDir: 'js' },
|
|
17
20
|
{ pattern: /localNotification-(\d+\.\d+)\.js$/, minVersion: '2.2', required: true, baseDir: 'js' },
|
|
@@ -94,6 +97,22 @@ try {
|
|
|
94
97
|
|
|
95
98
|
|
|
96
99
|
|
|
100
|
+
function compareWithBeta(installedVersion, minVersion, isBeta) {
|
|
101
|
+
const baseCompare = compareVersions(installedVersion, minVersion);
|
|
102
|
+
|
|
103
|
+
if (!isBeta) {
|
|
104
|
+
// Stable version → normal compare
|
|
105
|
+
return baseCompare;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// Beta version logic
|
|
109
|
+
if (baseCompare > 0) return 1; // 5.3-beta > 5.2
|
|
110
|
+
if (baseCompare < 0) return -1; // 5.1-beta < 5.2
|
|
111
|
+
|
|
112
|
+
// Same version but beta → LOWER than stable
|
|
113
|
+
return -1; // 5.2-beta < 5.2
|
|
114
|
+
}
|
|
115
|
+
|
|
97
116
|
|
|
98
117
|
|
|
99
118
|
|
|
@@ -976,15 +995,24 @@ function checkPlugins() {
|
|
|
976
995
|
const match = plugin.pattern.exec(matchedFile);
|
|
977
996
|
if (match) {
|
|
978
997
|
const currentVersion = match[1];
|
|
979
|
-
|
|
998
|
+
const isBeta = !!match[2]; // <-- only common has this
|
|
999
|
+
|
|
1000
|
+
const cmp = plugin.pattern.source.includes('beta')
|
|
1001
|
+
? compareWithBeta(currentVersion, plugin.minVersion, isBeta)
|
|
1002
|
+
: compareVersions(currentVersion, plugin.minVersion);
|
|
1003
|
+
|
|
1004
|
+
if (cmp < 0) {
|
|
980
1005
|
outdatedPlugins.push({
|
|
981
1006
|
name: path.relative(srcDir, matchedFile),
|
|
982
|
-
currentVersion
|
|
1007
|
+
currentVersion: isBeta
|
|
1008
|
+
? `${currentVersion}-beta`
|
|
1009
|
+
: currentVersion,
|
|
983
1010
|
requiredVersion: plugin.minVersion
|
|
984
1011
|
});
|
|
985
1012
|
}
|
|
986
1013
|
}
|
|
987
1014
|
}
|
|
1015
|
+
|
|
988
1016
|
}
|
|
989
1017
|
|
|
990
1018
|
|