@iobroker/repochecker 4.2.1-alpha.0 → 5.0.0-alpha.0

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.
@@ -3,7 +3,7 @@
3
3
  This module is a support module for iobroker.repochecker
4
4
 
5
5
  Area checked: NPM
6
- Numbering : 250 - 299
6
+ Numbering : 2000 - 2999
7
7
 
8
8
  */
9
9
 
@@ -20,7 +20,7 @@ axios.defaults.headers = {
20
20
  // const common = require('./common.js');
21
21
 
22
22
  async function checkNpm(context) {
23
- console.log('\n[E250 - E299] checkNpm');
23
+ console.log('\n[E2000 - E2999] checkNpm');
24
24
  let body;
25
25
  try {
26
26
  const response = await axios(`https://registry.npmjs.org/iobroker.${context.adapterName}`);
@@ -33,7 +33,7 @@ async function checkNpm(context) {
33
33
  try {
34
34
  const _response = await axios(`https://www.npmjs.com/package/iobroker.${context.adapterName}`);
35
35
  if (!_response.data) {
36
- context.errors.push('[E250] Not found on npm. Please publish');
36
+ context.errors.push('[E2000] Not found on npm. Please publish');
37
37
  return context;
38
38
  }
39
39
  body = _response.data;
@@ -41,13 +41,13 @@ async function checkNpm(context) {
41
41
  context.checks.push('Adapter found on npm');
42
42
  if (!body.includes('href="/~bluefox"') && body.includes('href="/~iobluefox"')) {
43
43
  context.errors.push(
44
- `[E251] Bluefox was not found in the collaborators on NPM!. Please execute in adapter directory: "npm owner add bluefox iobroker.${context.adapterName}"`,
44
+ `[E2001] Bluefox was not found in the collaborators on NPM!. Please execute in adapter directory: "npm owner add bluefox iobroker.${context.adapterName}"`,
45
45
  );
46
46
  } else {
47
47
  context.checks.push('Bluefox found in collaborators on NPM');
48
48
  }
49
49
  } catch {
50
- context.errors.push('[E250] Not found on npm. Please publish');
50
+ context.errors.push('[E2000] Not found on npm. Please publish');
51
51
  return context;
52
52
  }
53
53
  } else {
@@ -58,7 +58,7 @@ async function checkNpm(context) {
58
58
  !body.maintainers.find(user => user.name === 'bluefox' || user.name === 'iobluefox')
59
59
  ) {
60
60
  context.errors.push(
61
- `[E251] Bluefox was not found in the collaborators on NPM!. Please execute in adapter directory: "npm owner add bluefox iobroker.${context.adapterName}"`,
61
+ `[E2001] Bluefox was not found in the collaborators on NPM!. Please execute in adapter directory: "npm owner add bluefox iobroker.${context.adapterName}"`,
62
62
  );
63
63
  } else {
64
64
  context.checks.push('Bluefox found in collaborators on NPM');
@@ -67,11 +67,11 @@ async function checkNpm(context) {
67
67
  if (!body['dist-tags'] || context.packageJson.version !== body['dist-tags'].latest) {
68
68
  if (compareVersions.compare(body['dist-tags'].latest, context.packageJson.version, '>=')) {
69
69
  context.errors.push(
70
- `[E253] Version of package.json (${context.packageJson.version}) lower than latest version on NPM (${(body['dist-tags'] && body['dist-tags'].latest) || JSON.stringify(body)})`,
70
+ `[E2003] Version of package.json (${context.packageJson.version}) lower than latest version on NPM (${(body['dist-tags'] && body['dist-tags'].latest) || JSON.stringify(body)})`,
71
71
  );
72
72
  } else {
73
73
  context.warnings.push(
74
- `[W252] Version of package.json (${context.packageJson.version}) doesn't match latest version on NPM (${(body['dist-tags'] && body['dist-tags'].latest) || JSON.stringify(body)})`,
74
+ `[W2002] Version of package.json (${context.packageJson.version}) doesn't match latest version on NPM (${(body['dist-tags'] && body['dist-tags'].latest) || JSON.stringify(body)})`,
75
75
  );
76
76
  }
77
77
  } else {
@@ -90,11 +90,11 @@ async function checkNpm(context) {
90
90
  if (missingVersions.length) {
91
91
  if (missingVersions.length === 1) {
92
92
  context.errors.push(
93
- `[E254] Version "${missingVersions.join(', ')}" listed at common.news at io-package.json does not exist at NPM. Please remove from news section.`,
93
+ `[E2004] Version "${missingVersions.join(', ')}" listed at common.news at io-package.json does not exist at NPM. Please remove from news section.`,
94
94
  );
95
95
  } else {
96
96
  context.errors.push(
97
- `[E254] Versions "${missingVersions.join(', ')}" listed at common.news at io-package.json do not exist at NPM. Please remove from news section.`,
97
+ `[E2004] Versions "${missingVersions.join(', ')}" listed at common.news at io-package.json do not exist at NPM. Please remove from news section.`,
98
98
  );
99
99
  }
100
100
  } else {
@@ -113,11 +113,11 @@ exports.checkNpm = checkNpm;
113
113
  // List of error and warnings used at this module
114
114
  // ----------------------------------------------
115
115
 
116
- // [250] Not found on npm. Please publish
117
- // [250] Not found on npm. Please publish
118
- // [251] Bluefox was not found in the collaborators on NPM!. Please execute in adapter directory: "npm owner add bluefox iobroker.${context.adapterName}"
119
- // [251] Bluefox was not found in the collaborators on NPM!. Please execute in adapter directory: "npm owner add bluefox iobroker.${context.adapterName}"
120
- // [252] Version of package.json (${context.packageJson.version}) doesn't match latest version on NPM (${
121
- // [253] Version of package.json (${context.packageJson.version}) lower than latest version on NPM (${
122
- // [254] Version "${missingVersions.join(', ')}" listed at common.news at io-package.json does not exist at NPM. Please remove from news section.
123
- // [254] Versions "${missingVersions.join(', ')}" listed at common.news at io-package.json do not exist at NPM. Please remove from news section.
116
+ // [2000] Not found on npm. Please publish
117
+ // [2000] Not found on npm. Please publish
118
+ // [2001] Bluefox was not found in the collaborators on NPM!. Please execute in adapter directory: "npm owner add bluefox iobroker.${context.adapterName}"
119
+ // [2001] Bluefox was not found in the collaborators on NPM!. Please execute in adapter directory: "npm owner add bluefox iobroker.${context.adapterName}"
120
+ // [2002] Version of package.json (${context.packageJson.version}) doesn't match latest version on NPM (${
121
+ // [2003] Version of package.json (${context.packageJson.version}) lower than latest version on NPM (${
122
+ // [2004] Version "${missingVersions.join(', ')}" listed at common.news at io-package.json does not exist at NPM. Please remove from news section.
123
+ // [2004] Versions "${missingVersions.join(', ')}" listed at common.news at io-package.json do not exist at NPM. Please remove from news section.
@@ -3,14 +3,14 @@
3
3
  This module is a support module for iobroker.repochecker
4
4
 
5
5
  Area checked: Testing
6
- Numbering : 300 - 399
6
+ Numbering : 3000 - 3099
7
7
 
8
8
  */
9
9
 
10
10
  // const common = require('./common.js');
11
11
 
12
12
  async function checkTests(context) {
13
- console.log('\n[E300 - E399] checkTests');
13
+ console.log('\n[E3000 - E3999] checking tests');
14
14
  // if found some file in `\.github\workflows` with the test inside => it is OK too
15
15
  if (
16
16
  context &&
@@ -28,31 +28,31 @@ async function checkTests(context) {
28
28
  // return axios(travisURL)
29
29
  // .then(response => {
30
30
  // if (!response.data) {
31
- // context.errors.push('[E300] Not found on travis. Please setup travis or use github actions (preferred)');
31
+ // context.errors.push('[E3000] Not found on travis. Please setup travis or use github actions (preferred)');
32
32
  // return context;
33
33
  // }
34
34
  // if (!response.headers || !response.headers['content-disposition']) {
35
- // context.errors.push('[E300] Not found on travis. Please setup travis or use github actions (preferred)');
35
+ // context.errors.push('[E3000] Not found on travis. Please setup travis or use github actions (preferred)');
36
36
  // return context;
37
37
  // }
38
38
  // // inline; filename="passing.png"
39
39
  // const m = response.headers['content-disposition'].match(/filename="(.+)"$/);
40
40
  // if (!m) {
41
- // context.errors.push('[E300] Not found on travis. Please setup travis or use github actions (preferred)');
41
+ // context.errors.push('[E3000] Not found on travis. Please setup travis or use github actions (preferred)');
42
42
  // return context;
43
43
  // }
44
44
  //
45
45
  // if (m[1] === 'unknown.png') {
46
- // context.errors.push('[E300] Not found on travis. Please setup travis or use github actions (preferred)');
46
+ // context.errors.push('[E3000] Not found on travis. Please setup travis or use github actions (preferred)');
47
47
  // return context;
48
48
  // }
49
49
  //
50
50
  // context.checks.push('Found on travis-ci');
51
51
  //
52
- // context.warnings.push('[W302] Use github actions instead of travis-ci');
52
+ // context.warnings.push('[W3002] Use github actions instead of travis-ci');
53
53
  //
54
54
  // if (m[1] !== 'passing.png') {
55
- // context.errors.push('[E301] Tests on Travis-ci.org are broken. Please fix.');
55
+ // context.errors.push('[E3001] Tests on Travis-ci.org are broken. Please fix.');
56
56
  // } else {
57
57
  // context.checks.push('Tests are OK on travis-ci');
58
58
  // }