@iobroker/repochecker 2.1.3 → 2.1.4

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.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/index.js +21 -23
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -20,7 +20,7 @@ Branch (`master/main/dev`) is optional.
20
20
  -->
21
21
 
22
22
  ## Changelog
23
- ### 2.1.3 (2022-08-19)
23
+ ### 2.1.4 (2022-08-19)
24
24
  * (bluefox) Added check for adapter name: it may not start with '_'
25
25
 
26
26
  ### 2.1.2 (2022-07-14)
package/index.js CHANGED
@@ -1156,7 +1156,7 @@ function checkNpm(context) {
1156
1156
  // bug in NPM some modules could be accessed via normal web page, but not by API
1157
1157
  if (!body) {
1158
1158
  try {
1159
- const _response = await axios('https://www.npmjs.com/package/iobroker.' + context.adapterName);
1159
+ const _response = await axios(`https://www.npmjs.com/package/iobroker.${context.adapterName}`);
1160
1160
  if (!_response.data) {
1161
1161
  context.errors.push('[E200] Not found on npm. Please publish');
1162
1162
  return context;
@@ -1174,30 +1174,28 @@ function checkNpm(context) {
1174
1174
  context.errors.push('[E200] Not found on npm. Please publish');
1175
1175
  return context;
1176
1176
  }
1177
- }
1178
- context.checks.push('Adapter found on npm');
1179
-
1180
- if (!body ||
1181
- !body.collected ||
1182
- !body.collected.metadata ||
1183
- !body.collected.metadata.maintainers ||
1184
- !body.collected.metadata.maintainers.length ||
1185
- !body.collected.metadata.maintainers.find(user => user.username === 'bluefox' || user.username === 'iobluefox')) {
1186
- context.errors.push(`[E201] Bluefox was not found in the collaborators on NPM!. Please execute in adapter directory: "npm owner add bluefox iobroker.${context.adapterName}"`);
1187
1177
  } else {
1188
- context.checks.push('Bluefox found in collaborators on NPM');
1189
- }
1178
+ context.checks.push('Adapter found on npm');
1179
+ if (!body.collected ||
1180
+ !body.collected.metadata ||
1181
+ !body.collected.metadata.maintainers ||
1182
+ !body.collected.metadata.maintainers.length ||
1183
+ !body.collected.metadata.maintainers.find(user => user.username === 'bluefox' || user.username === 'iobluefox')) {
1184
+ context.errors.push(`[E201] Bluefox was not found in the collaborators on NPM!. Please execute in adapter directory: "npm owner add bluefox iobroker.${context.adapterName}"`);
1185
+ } else {
1186
+ context.checks.push('Bluefox found in collaborators on NPM');
1187
+ }
1190
1188
 
1191
- if (!body ||
1192
- !body.collected ||
1193
- !body.collected.metadata ||
1194
- !body.collected.metadata.version ||
1195
- context.packageJson.version !== body.collected.metadata.version
1196
- ) {
1197
- context.warnings.push(`[W202] Version of package.json (${context.packageJson.version}) doesn't match latest version on NPM (${
1198
- (body && body.collected && body.collected.metadata && body.collected.metadata.version) || JSON.stringify(body)})`);
1199
- } else {
1200
- context.checks.push('Version of package.json matches latest version on NPM');
1189
+ if (!body.collected ||
1190
+ !body.collected.metadata ||
1191
+ !body.collected.metadata.version ||
1192
+ context.packageJson.version !== body.collected.metadata.version
1193
+ ) {
1194
+ context.warnings.push(`[W202] Version of package.json (${context.packageJson.version}) doesn't match latest version on NPM (${
1195
+ (body && body.collected && body.collected.metadata && body.collected.metadata.version) || JSON.stringify(body)})`);
1196
+ } else {
1197
+ context.checks.push('Version of package.json matches latest version on NPM');
1198
+ }
1201
1199
  }
1202
1200
 
1203
1201
  return context;
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.1.3",
2
+ "version": "2.1.4",
3
3
  "name": "@iobroker/repochecker",
4
4
  "dependencies": {
5
5
  "axios": "^0.27.2",