@iobroker/repochecker 2.6.0 → 2.6.1

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.
package/README.md CHANGED
@@ -20,6 +20,9 @@ Branch (`master/main/dev`) is optional.
20
20
  -->
21
21
 
22
22
  ## Changelog
23
+ ### 2.6.1 (2024-06-24)
24
+ * (mcm1957) Check "[W156] Adapter should support admin 5 UI (jsonConfig)" checks for reactUi now.
25
+
23
26
  ### 2.6.0 (2024-06-24)
24
27
  * (mcm1957) Check has been aded to ensure keywords and common.keywords are present. [#200]
25
28
  * (mcm1957) Detection of react has been added, gulpfile.js is accepted for react based UIs now. [#223]
package/doc/issues.json CHANGED
@@ -614,6 +614,9 @@
614
614
  "W521": {
615
615
  "title": "`gulp` found at devDependencies at package.json but no `gulpfile.js` found. Is this dependency really required?"
616
616
  },
617
+ "W522": {
618
+ "title": "Please consider migrating to admin 5 UI (jsonConfig)."
619
+ },
617
620
  "W801": {
618
621
  "title": ".npmignore not found"
619
622
  },
package/index.js CHANGED
@@ -1260,9 +1260,10 @@ function checkIOPackageJson(context) {
1260
1260
  context.checks.push('"common.materialize" or "common.adminUI.config" found in io-package.json');
1261
1261
  }
1262
1262
 
1263
- if (!context.ioPackageJson.common.adminUI || (context.ioPackageJson.common.adminUI.config !== 'json' && context.ioPackageJson.common.adminUI.config !== 'none')) {
1264
- context.warnings.push('[W156] Adapter should support admin 5 UI (jsonConfig) if you do not use a React based UI');
1265
- }
1263
+ // check moved to W520
1264
+ //if (!context.ioPackageJson.common.adminUI || (context.ioPackageJson.common.adminUI.config !== 'json' && context.ioPackageJson.common.adminUI.config !== 'none')) {
1265
+ // context.warnings.push('[W156] Adapter should support admin 5 UI (jsonConfig) if you do not use a React based UI');
1266
+ //}
1266
1267
  } else {
1267
1268
  context.checks.push('adapter has no admin config');
1268
1269
 
@@ -2060,7 +2061,8 @@ function checkCode(context) {
2060
2061
  'admin/jsonCustom.json5',
2061
2062
  'admin/blockly.js',
2062
2063
 
2063
- 'src-admin/package.json', // present if react is used
2064
+ 'src-admin/package.json', // check if react is used
2065
+ 'src/package.json', // check if react is used
2064
2066
  ];
2065
2067
  allowedLanguages.forEach(lang =>
2066
2068
  readFiles.push(`admin/i18n/${lang}/translations.json`));
@@ -2155,6 +2157,32 @@ function checkCode(context) {
2155
2157
  // console.log('REACT detected');
2156
2158
  usesReact = true;
2157
2159
  }
2160
+ if (packageJson.dependencies && packageJson.dependencies['@iobroker/adapter-react-v5'] ){
2161
+ // console.log('REACT detected');
2162
+ usesReact = true;
2163
+ }
2164
+ }
2165
+ if (context['/src/package.json']) {
2166
+ //console.log('"src/package.json" exists');
2167
+ let packageJson = JSON.parse(context['/src/package.json']);
2168
+ if (packageJson.devDependencies && packageJson.devDependencies['@iobroker/adapter-react-v5'] ){
2169
+ // console.log('REACT detected');
2170
+ usesReact = true;
2171
+ }
2172
+ if (packageJson.dependencies && packageJson.dependencies['@iobroker/adapter-react-v5'] ){
2173
+ // console.log('REACT detected');
2174
+ usesReact = true;
2175
+ }
2176
+ }
2177
+ if (context.packageJson.devDependencies && context.packageJson.devDependencies['@iobroker/adapter-react'] ){
2178
+ usesReact = true;
2179
+ }
2180
+
2181
+ if (! usesReact && !context.ioPackageJson.common.noConfig &&
2182
+ (!context.ioPackageJson.common.adminUI ||
2183
+ (context.ioPackageJson.common.adminUI.config !== 'json' && context.ioPackageJson.common.adminUI.config !== 'none')
2184
+ )) {
2185
+ context.warnings.push('[W522] Please consider migrating to admin 5 UI (jsonConfig).');
2158
2186
  }
2159
2187
 
2160
2188
  if (context.ioPackageJson.common.materialize || (context.ioPackageJson.common.adminUI && context.ioPackageJson.common.adminUI.config === 'materialize')) {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.6.0",
2
+ "version": "2.6.1",
3
3
  "name": "@iobroker/repochecker",
4
4
  "dependencies": {
5
5
  "axios": "^1.7.2",