@iobroker/repochecker 4.2.0-alpha.5 → 4.2.0-alpha.6

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
@@ -1,385 +1,391 @@
1
- # Adapter repository checker
2
-
3
- This is a code for frontend and back-end of the service <https://adapter-check.iobroker.in/>
4
-
5
- If you want to add your adapter to the public ioBroker repository, all tests on this page must be OK.
6
-
7
- ## How to test via cli
8
-
9
- You can pass your repository as a parameter to test
10
-
11
- `npx @iobroker/repochecker <repo> [branch]`
12
-
13
- ```bash
14
- npx @iobroker/repochecker https://github.com/ioBroker/ioBroker.javascript master
15
- ```
16
-
17
- Branch (`master/main/dev`) is optional.
18
-
19
- For extra debugging outputs you can pass the `--debug` parameter.
20
-
21
- For a local test you can pass the `--local` parameter. Most of the files are read locally.
22
- The link to the GitHub repository is still necessary because data from the project settings on GitHub is also checked.
23
-
24
- Example:
25
-
26
- ```bash
27
- npx @iobroker/repochecker https://github.com/ioBroker/ioBroker.javascript --local
28
- ```
29
-
30
- <!--
31
- Placeholder for the next version (at the beginning of the line):
32
- ### **WORK IN PROGRESS**
33
- -->
34
-
1
+ # Adapter repository checker
2
+
3
+ This is a code for frontend and back-end of the service <https://adapter-check.iobroker.in/>
4
+
5
+ If you want to add your adapter to the public ioBroker repository, all tests on this page must be OK.
6
+
7
+ ## How to test via cli
8
+
9
+ You can pass your repository as a parameter to test
10
+
11
+ `npx @iobroker/repochecker <repo> [branch]`
12
+
13
+ ```bash
14
+ npx @iobroker/repochecker https://github.com/ioBroker/ioBroker.javascript master
15
+ ```
16
+
17
+ Branch (`master/main/dev`) is optional.
18
+
19
+ For extra debugging outputs you can pass the `--debug` parameter.
20
+
21
+ For a local test you can pass the `--local` parameter. Most of the files are read locally.
22
+ The link to the GitHub repository is still necessary because data from the project settings on GitHub is also checked.
23
+
24
+ Example:
25
+
26
+ ```bash
27
+ npx @iobroker/repochecker https://github.com/ioBroker/ioBroker.javascript --local
28
+ ```
29
+
30
+ <!--
31
+ Placeholder for the next version (at the beginning of the line):
32
+ ### **WORK IN PROGRESS**
33
+ -->
34
+
35
35
  ## Changelog
36
- ### 4.2.0-alpha.5 (2025-09-15)
37
- - (copilot) Added io-package.json schema validation against official schema (W205, W207, W208) [#503].
38
- - (copilot) Added check for deprecated adapter methods (createState/createChannel/createDevice/deleteState/deleteChannel/deleteDevice) (W533) [#182].
39
- - (copilot) Added check for outdated lib/tools.js file usage (W532) [#432].
40
- - (copilot) Added VS Code schema definitions checker for .vscode/settings.json - validates json.schemas for io-package.json and jsonConfig files [#336].
41
- - (copilot) Change W510 to E510: Convert missing admin i18n files from warning to error [#400].
42
- - (copilot) Renumbered all issues in M500__JsonConfig.js from 500-511 range to 550-561 range [#481].
43
- - (copilot) Added check for .commitinfo file - error if present (E905), warning if not in .gitignore (W906) [#467].
44
- - (copilot) Added check for allowInit attribute [#181].
45
- - (copilot) Added detection for empty dependency objects in io-package.json (E200, E201) [#422].
46
- - (copilot) Added suggestion to restart 'vis-2' when 'vis' is in restartAdapters (S202) [#412].
47
- - (copilot) Modified W513 gulpfile.js warning to check for @iobroker/adapter-dev dependency and add S531 suggestion [#469].
36
+ ### 4.2.0-alpha.6 (2025-09-20)
37
+ - (mcm1957) 'Request replacement text changed to suggest node:fetch [#498].
38
+ - (@copilot) Fixed false positive W533 warnings for deprecated adapter methods when called on local functions with same names [#520].
39
+ - (mcm1957) '[W438] .vscode/settings.json file missing "json.schemas" property' has been converted to suggestion [#516].
40
+ - (mcm1957) Severity of '[S191] admin dependency...' has been corrected [#510].
41
+
42
+ ### 4.2.0-alpha.5 (2025-09-15)
43
+ - (copilot) Added io-package.json schema validation against official schema (W205, W207, W208) [#503].
44
+ - (copilot) Added check for deprecated adapter methods (createState/createChannel/createDevice/deleteState/deleteChannel/deleteDevice) (W533) [#182].
45
+ - (copilot) Added check for outdated lib/tools.js file usage (W532) [#432].
46
+ - (copilot) Added VS Code schema definitions checker for .vscode/settings.json - validates json.schemas for io-package.json and jsonConfig files [#336].
47
+ - (copilot) Change W510 to E510: Convert missing admin i18n files from warning to error [#400].
48
+ - (copilot) Renumbered all issues in M500__JsonConfig.js from 500-511 range to 550-561 range [#481].
49
+ - (copilot) Added check for .commitinfo file - error if present (E905), warning if not in .gitignore (W906) [#467].
50
+ - (copilot) Added check for allowInit attribute [#181].
51
+ - (copilot) Added detection for empty dependency objects in io-package.json (E200, E201) [#422].
52
+ - (copilot) Added suggestion to restart 'vis-2' when 'vis' is in restartAdapters (S202) [#412].
53
+ - (copilot) Modified W513 gulpfile.js warning to check for @iobroker/adapter-dev dependency and add S531 suggestion [#469].
48
54
  - (copilot) Fixed W195 warning for array elements - add W203 warning for unsupported array encryption [#399].
49
55
 
50
- ### 4.1.0 (2025-09-11)
51
- - (mcm1957) eslint-config and testing suggestions have been updated.
52
- - (mcm1957) adapter-core suggestions has been updated.
53
- - (mcm1957) URGENT and IMPORTANT issued are watched now.
54
- - (mcm1957) Using @iobroker/eslint-config is suggested now.
55
- - (mcm1957) Adding @iobroker/testing to dependencies is logged as error now [#447].
56
- - (mcm1957) Text for S191 has been extended [#393].
57
- - (mcm1957) Text for S052 has been corrected [#434].
58
- - (mcm1957) Formatting if W174 has been improved [#408].
59
- - (mcm1957) @types/* as dependency now raise a warning [#421].
56
+ ### 4.1.0 (2025-09-11)
57
+ - (mcm1957) eslint-config and testing suggestions have been updated.
58
+ - (mcm1957) adapter-core suggestions has been updated.
59
+ - (mcm1957) URGENT and IMPORTANT issued are watched now.
60
+ - (mcm1957) Using @iobroker/eslint-config is suggested now.
61
+ - (mcm1957) Adding @iobroker/testing to dependencies is logged as error now [#447].
62
+ - (mcm1957) Text for S191 has been extended [#393].
63
+ - (mcm1957) Text for S052 has been corrected [#434].
64
+ - (mcm1957) Formatting if W174 has been improved [#408].
65
+ - (mcm1957) @types/* as dependency now raise a warning [#421].
60
66
  - (mcm1957) Dependencies have been updated.
61
67
 
62
- ### 4.0.2 (2025-08-12)
68
+ ### 4.0.2 (2025-08-12)
63
69
  - (mcm1957) js-controller 6.0.11 recommended now.
64
70
 
65
- ### 4.0.1 (2025-08-11)
66
- - (mcm1957) Wrong suggestion to add admin dependency has been corrected [#452].
67
- - (mcm1957) Text for E952 has been corrected [#446].
68
- - (mcm1957) Adapt wording at W098 / E029 [#448].
69
- - (mcm1957) Adapter-core 3.3.1 suggestion added [#455].
70
- - (mcm1957) Admin 7.6.17 recommendation added [#435].
71
+ ### 4.0.1 (2025-08-11)
72
+ - (mcm1957) Wrong suggestion to add admin dependency has been corrected [#452].
73
+ - (mcm1957) Text for E952 has been corrected [#446].
74
+ - (mcm1957) Adapt wording at W098 / E029 [#448].
75
+ - (mcm1957) Adapter-core 3.3.1 suggestion added [#455].
76
+ - (mcm1957) Admin 7.6.17 recommendation added [#435].
71
77
  - (mcm1957) jsonConfig expertMode flag added [#386].
72
78
 
73
- ### 4.0.0 (2025-08-05)
74
- - (mcm1957) use jsdelivr.com to retrive files from github.
79
+ ### 4.0.0 (2025-08-05)
80
+ - (mcm1957) use jsdelivr.com to retrive files from github.
75
81
  - (mcm1957) Dependencies have been updated.
76
82
 
77
- ### 3.5.8 (2025-05-17)
83
+ ### 3.5.8 (2025-05-17)
78
84
  - (mcm1957) add authorization for github using OWN_GITHUB_TOKEN.
79
85
 
80
- ### 3.5.5 (2025-04-28)
81
- - (mcm1957) Node.js 20 is suggested now.
82
- - (mcm1957) Suggested release for several packages has been encreased.
83
- - (mcm1957) Do not raise E186 if E190 is raised anyway. [#387]
86
+ ### 3.5.5 (2025-04-28)
87
+ - (mcm1957) Node.js 20 is suggested now.
88
+ - (mcm1957) Suggested release for several packages has been encreased.
89
+ - (mcm1957) Do not raise E186 if E190 is raised anyway. [#387]
84
90
  - (mcm1957) Dependencies have been updated.0
85
91
 
86
- ### 3.5.4 (2025-03-03)
92
+ ### 3.5.4 (2025-03-03)
87
93
  - (mcm1957) Ignore boolean paramters when checking protectedNative/encryptedNative. [#395]
88
94
 
89
- ### 3.5.3 (2025-02-21)
95
+ ### 3.5.3 (2025-02-21)
90
96
  - (mcm1957) Crash has been fixed if protectedNative/encryptedNative is not an array. [#385]
91
97
 
92
- ### 3.5.2 (2025-02-19)
93
- - (mcm1957) Incorrect admin suggestion for very olf html adapters corrected. [#383]
94
- - (mcm1957) Errors during parsing if icon improved. [#381]
98
+ ### 3.5.2 (2025-02-19)
99
+ - (mcm1957) Incorrect admin suggestion for very olf html adapters corrected. [#383]
100
+ - (mcm1957) Errors during parsing if icon improved. [#381]
95
101
  - (mcm1957) Crash if protectedNative or encryptedNative is missing. [#382]
96
102
 
97
- ### 3.5.0 (2025-02-18)
98
- - (mcm1957) Fixed dependency warning ([W174]) has been reduces to suggestion. [#374]
99
- - (mcm1957) Some changes to jsonConfig check have been implemented.
100
- - (mcm1957) common.supportCustoms check has been added. [#379]
101
- - (mcm1957) Check that key listed at encryptedNative or protectedNative is listed at native too. [#218]
102
- - (mcm1957) Check that key listed at encryptedNative is listed at protectedNative too. [#342]
103
- - (mcm1957) Check that extension adapters require web adapter. [#311]
104
- - (mcm1957) List of suspicious keys to protect has been extended. [#358]
105
- - (mcm1957) checking of 'admin' globalDependency has been added.
106
- - (mcm1957) checking of 'publishConfig.registry' has been added.
107
- - (mcm1957) New commandline option --noinfo added.
103
+ ### 3.5.0 (2025-02-18)
104
+ - (mcm1957) Fixed dependency warning ([W174]) has been reduces to suggestion. [#374]
105
+ - (mcm1957) Some changes to jsonConfig check have been implemented.
106
+ - (mcm1957) common.supportCustoms check has been added. [#379]
107
+ - (mcm1957) Check that key listed at encryptedNative or protectedNative is listed at native too. [#218]
108
+ - (mcm1957) Check that key listed at encryptedNative is listed at protectedNative too. [#342]
109
+ - (mcm1957) Check that extension adapters require web adapter. [#311]
110
+ - (mcm1957) List of suspicious keys to protect has been extended. [#358]
111
+ - (mcm1957) checking of 'admin' globalDependency has been added.
112
+ - (mcm1957) checking of 'publishConfig.registry' has been added.
113
+ - (mcm1957) New commandline option --noinfo added.
108
114
  - (mcm1957) Logging has been adapted.
109
115
 
110
- ### 3.4.4 (2025-02-12)
116
+ ### 3.4.4 (2025-02-12)
111
117
  - (mcm1957) Some external attributes added to valid package.json attributes.
112
118
 
113
- ### 3.4.2 (2025-02-12)
119
+ ### 3.4.2 (2025-02-12)
114
120
  - (mcm1957) 'type' and 'types' added to valid package.json attributes.
115
121
 
116
- ### 3.4.1 (2025-02-11)
122
+ ### 3.4.1 (2025-02-11)
117
123
  - (mcm1957) Add 'publishConfig' to valid package.json attributes.
118
124
 
119
- ### 3.4.0 (2025-02-11)
120
- - (mcm1957) Do not suggest to migrate to adapter-dev if only gulpfile.js exists. (#334).
121
- - (mcm1957) Warn if onlyWWW adapter uses adapter-core (#251).
122
- - (mcm1957) Singleton checks have been reduced to suggestion level.
123
- - (mcm1957) Adapter-core 3.2. required now.
124
- - (mcm1957) Blacklists for peerDependencies and optionalDependencies have been added (#364).
125
- - (mcm1957) Suggestings for typical devDependencies have been added (#344).
126
- - (mcm1957) Checking of package dependencies has been enhanced.
127
- - (mcm1957) Allow legacy-testing instead of testing.
128
- - (mcm1957) Warn if axios is listed as devDependency (#314).
129
- - (mcm1957) Adapt common.materialize deprecation message (#315).
130
- - (mcm1957) Log an error if dependency is listed multiple times (#316).
131
- - (mcm1957) Check package.json for invalid attributes.
132
- - (mcm1957) Fix duplicated warning E432 and E434.
125
+ ### 3.4.0 (2025-02-11)
126
+ - (mcm1957) Do not suggest to migrate to adapter-dev if only gulpfile.js exists. (#334).
127
+ - (mcm1957) Warn if onlyWWW adapter uses adapter-core (#251).
128
+ - (mcm1957) Singleton checks have been reduced to suggestion level.
129
+ - (mcm1957) Adapter-core 3.2. required now.
130
+ - (mcm1957) Blacklists for peerDependencies and optionalDependencies have been added (#364).
131
+ - (mcm1957) Suggestings for typical devDependencies have been added (#344).
132
+ - (mcm1957) Checking of package dependencies has been enhanced.
133
+ - (mcm1957) Allow legacy-testing instead of testing.
134
+ - (mcm1957) Warn if axios is listed as devDependency (#314).
135
+ - (mcm1957) Adapt common.materialize deprecation message (#315).
136
+ - (mcm1957) Log an error if dependency is listed multiple times (#316).
137
+ - (mcm1957) Check package.json for invalid attributes.
138
+ - (mcm1957) Fix duplicated warning E432 and E434.
133
139
  - (mcm1957) Adapt copyright year advisory.
134
140
 
135
- ### 3.3.2 (2025-01-20)
141
+ ### 3.3.2 (2025-01-20)
136
142
  - (mcm1957) Avoid crash if some file cannot be downloaded.
137
143
 
138
- ### 3.3.1 (2025-01-19)
144
+ ### 3.3.1 (2025-01-19)
139
145
  - (mcm1957) Report malformed semver specifications has been fixed.
140
146
 
141
- ### 3.3.0 (2025-01-19)
142
- - (mcm1957) "common.singleton" causes a warning now for non-onlyWWW Adapters.
143
- - (mcm1957) "$schema" has been blacklisted at io-package.json.
144
- - (mcm1957) Warn if 'common.nondeletable' flag is detected.
145
- - (mcm1957) Report request as deprecated package.
146
- - (mcm1957) Report malformed semver specifications.
147
- - (mcm1957) Check of copyright-year complains about future dates now.
148
- - (mcm1957) Checking for responsive design issues has been added.
147
+ ### 3.3.0 (2025-01-19)
148
+ - (mcm1957) "common.singleton" causes a warning now for non-onlyWWW Adapters.
149
+ - (mcm1957) "$schema" has been blacklisted at io-package.json.
150
+ - (mcm1957) Warn if 'common.nondeletable' flag is detected.
151
+ - (mcm1957) Report request as deprecated package.
152
+ - (mcm1957) Report malformed semver specifications.
153
+ - (mcm1957) Check of copyright-year complains about future dates now.
154
+ - (mcm1957) Checking for responsive design issues has been added.
149
155
  - (mcm1957) Releaseinfo has been added to "checks" log.
150
156
 
151
- ### 3.2.4 (2025-01-16)
157
+ ### 3.2.4 (2025-01-16)
152
158
  - (mcm1957) Suggested release of testing and adapter-core increased.
153
159
 
154
- ### 3.2.3 (2025-01-11)
155
- - (mcm1957) An error is issued if js-controller dependency is missing.
156
- - (mcm1957) Required js-controller has been increased to 5.0.19.
160
+ ### 3.2.3 (2025-01-11)
161
+ - (mcm1957) An error is issued if js-controller dependency is missing.
162
+ - (mcm1957) Required js-controller has been increased to 5.0.19.
157
163
  - (mcm1957) Recommended js-controller version is omitted if identical to required one.
158
164
 
159
- ### 3.2.2 (2024-11-01)
160
- - (mcm1957) Link to open issues has been corrected.
165
+ ### 3.2.2 (2024-11-01)
166
+ - (mcm1957) Link to open issues has been corrected.
161
167
  - (mcm1957) Component name added to responsive check issues.
162
168
 
163
- ### 3.2.1 (2024-11-01)
169
+ ### 3.2.1 (2024-11-01)
164
170
  - (mcm1957) Size checking for "divider" and "staticImage" suspended.
165
171
 
166
- ### 3.2.0 (2024-11-01)
167
- - (oweitman) Script has been extended to use optionally local data for checking.
168
- - (mcm1957) Warning if i18n is not used has been fixed [#324].
169
- - (mcm1957) Check for importent issues has been added.
172
+ ### 3.2.0 (2024-11-01)
173
+ - (oweitman) Script has been extended to use optionally local data for checking.
174
+ - (mcm1957) Warning if i18n is not used has been fixed [#324].
175
+ - (mcm1957) Check for importent issues has been added.
170
176
  - (mcm1957) Checking of jsonConfig (initially) added.
171
177
 
172
- ### 3.1.4 (2024-10-26)
173
- - (mcm1957) linter has been activated and issues reported have been fixed.
174
- - (mcm1957) Blacklist for package/dependencies has been extended.
175
- - (mcm1957) Recommend adapter-core 3.2.2 now.
176
- - (mcm1957) Clearify test for "[E952] .npmignore not found". [#320]
178
+ ### 3.1.4 (2024-10-26)
179
+ - (mcm1957) linter has been activated and issues reported have been fixed.
180
+ - (mcm1957) Blacklist for package/dependencies has been extended.
181
+ - (mcm1957) Recommend adapter-core 3.2.2 now.
182
+ - (mcm1957) Clearify test for "[E952] .npmignore not found". [#320]
177
183
  - (mcm1957) Abort processing if iobroker.live not reachable. [#321]
178
184
 
179
- ### 3.1.3 (2024-10-11)
185
+ ### 3.1.3 (2024-10-11)
180
186
  - (mcm1957) Checker no longer crash id no npm package exists.
181
187
 
182
- ### 3.1.2 (2024-10-04)
188
+ ### 3.1.2 (2024-10-04)
183
189
  - (mcm1957) Require node 18 minimum as engines clause.
184
190
 
185
- ### 3.1.1 (2024-10-04)
186
- - (mcm1957) "[E166] 'common.mode: extension' is unknown" has been fixed [#308]
187
- - (mcm1957) "[E904] file iob_npm.done found in repository, but not found in .gitignore" removed as covered by [E503]. [#309]
188
- - (mcm1957) "[E500] node_modules found" has been retricted to adapetr root. [#297]
189
- - (mcm1957) Do not check main entry if common.mode none or extension.
191
+ ### 3.1.1 (2024-10-04)
192
+ - (mcm1957) "[E166] 'common.mode: extension' is unknown" has been fixed [#308]
193
+ - (mcm1957) "[E904] file iob_npm.done found in repository, but not found in .gitignore" removed as covered by [E503]. [#309]
194
+ - (mcm1957) "[E500] node_modules found" has been retricted to adapetr root. [#297]
195
+ - (mcm1957) Do not check main entry if common.mode none or extension.
190
196
  - (mcm1957) Change "[W113] Adapter should support compact mode" text and honor common.compact set to false. [#300]
191
197
 
192
- ### 3.1.0 (2024-09-29)
193
- - (mcm1957) "@iobroker/plugin-sentry" blacklisted as dependency [#301]
194
- - (mcm1957) Accept .ts files as main file too. [#303]
198
+ ### 3.1.0 (2024-09-29)
199
+ - (mcm1957) "@iobroker/plugin-sentry" blacklisted as dependency [#301]
200
+ - (mcm1957) Accept .ts files as main file too. [#303]
195
201
  - (mcm1957) [E405] and [E426] incorrect path has been corrected. [#299]
196
202
 
197
- ### 3.0.7 (2024-09-19)
203
+ ### 3.0.7 (2024-09-19)
198
204
  - (mcm1957) "[W523] 'package-lock.json"'not found in repo!" reduced to suggestion. [#298]
199
205
 
200
- ### 3.0.6 (2024-09-13)
201
- - (mcm1957) "[E124] Main file not found" no longer raised if `common.nogit` is set
202
- - (mcm1957) 'Text of "common.main" is deprecated' has been adapted. [#266]
206
+ ### 3.0.6 (2024-09-13)
207
+ - (mcm1957) "[E124] Main file not found" no longer raised if `common.nogit` is set
208
+ - (mcm1957) 'Text of "common.main" is deprecated' has been adapted. [#266]
203
209
  - (mcm1957) Ignore errors caused by complex .gitignor/.npmignore. [#288]
204
210
 
205
- ### 3.0.5 (2024-09-13)
211
+ ### 3.0.5 (2024-09-13)
206
212
  - (mcm1957) '@iobroker/dev-server' is valid as dev-dependency. [#260]
207
213
 
208
- ### 3.0.4 (2024-09-12)
209
- - (mcm1957) Abort with incorrect dependency definition fixed [#287]
210
- - (mcm1957) Improve handling of malformed dependency definitions [#284]
211
- - (mcm1957) Improve handling of malformed .releaseconfig.json files [#283]
212
- - (mcm1957) Missing mandatory translations are considered an error now. [#277, #278]
213
- - (mcm1957) '.npmignore found but "files" is used' is a warning now. [#274]
214
- - (mcm1957) '@iobroker/dev-server' has been blacklisted as any dependency. [#260]
214
+ ### 3.0.4 (2024-09-12)
215
+ - (mcm1957) Abort with incorrect dependency definition fixed [#287]
216
+ - (mcm1957) Improve handling of malformed dependency definitions [#284]
217
+ - (mcm1957) Improve handling of malformed .releaseconfig.json files [#283]
218
+ - (mcm1957) Missing mandatory translations are considered an error now. [#277, #278]
219
+ - (mcm1957) '.npmignore found but "files" is used' is a warning now. [#274]
220
+ - (mcm1957) '@iobroker/dev-server' has been blacklisted as any dependency. [#260]
215
221
  - (mcm1957) Do no longer require a js-controller dependency for wwwOnly adapters. [#250]
216
222
 
217
- ### 3.0.3 (2024-09-12)
223
+ ### 3.0.3 (2024-09-12)
218
224
  - (mcm1957) Check for iob_npm.done at `.npmignore` has been removed [#294]
219
225
 
220
- ### 3.0.2 (2024-09-11)
221
- - (mcm1957) Handling of a missing LICENSE file corrected. [#282]
222
- - (mcm1957) [W126] Missing mandatory translation is an error now. [#293]
223
- - (mcm1957) Record repochcker version used for tests.
226
+ ### 3.0.2 (2024-09-11)
227
+ - (mcm1957) Handling of a missing LICENSE file corrected. [#282]
228
+ - (mcm1957) [W126] Missing mandatory translation is an error now. [#293]
229
+ - (mcm1957) Record repochcker version used for tests.
224
230
  - (mcm1957) Record GitHub commit-sha of last commit used for tests.
225
231
 
226
- ### 3.0.0 (2024-09-10)
227
- - (mcm1957) Error and warning numbering has been reviewed and duplicates removed.
232
+ ### 3.0.0 (2024-09-10)
233
+ - (mcm1957) Error and warning numbering has been reviewed and duplicates removed.
228
234
  - (mcm1957) index.js has been split into seperated modules.
229
235
 
230
- ### 2.10.0 (2024-08-19)
236
+ ### 2.10.0 (2024-08-19)
231
237
  - (mcm1957) Suggestions ([Sxxx] have been added).
232
238
 
233
- ### 2.9.1 (2024-08-12)
234
- - (mcm1957) E162 - correct dependency check for js-controller. [#267].
235
- - (mcm1957) E605 - copyright year range including whitespaces is now accepted. [#269].
236
- - (mcm1957) E016 - missing vaiable expansion has been added. [#263].
239
+ ### 2.9.1 (2024-08-12)
240
+ - (mcm1957) E162 - correct dependency check for js-controller. [#267].
241
+ - (mcm1957) E605 - copyright year range including whitespaces is now accepted. [#269].
242
+ - (mcm1957) E016 - missing vaiable expansion has been added. [#263].
237
243
  - (mcm1957) E114 - typo at error message has been fixed [#261].
238
244
 
239
- ### 2.9.0 (2024-07-29)
240
- - (mcm1957) Adapt text if sources-dist(-stable).json need a correction [#97].
241
- - (mcm1957) Missing "common.mode" error text corrected [#249].
242
- - (mcm1957) Files "iob" and "iobroker" are disallowed now [#248].
243
- - (mcm1957) Checks related to @alcalzone/releasescript modified [#71].
245
+ ### 2.9.0 (2024-07-29)
246
+ - (mcm1957) Adapt text if sources-dist(-stable).json need a correction [#97].
247
+ - (mcm1957) Missing "common.mode" error text corrected [#249].
248
+ - (mcm1957) Files "iob" and "iobroker" are disallowed now [#248].
249
+ - (mcm1957) Checks related to @alcalzone/releasescript modified [#71].
244
250
  - (mcm1957) Text of E114 (missing adminUI) adapted.
245
251
 
246
- ### 2.8.1 (2024-07-28)
247
- - (mcm1957) Check of js-controller version has been corrected [#247].
252
+ ### 2.8.1 (2024-07-28)
253
+ - (mcm1957) Check of js-controller version has been corrected [#247].
248
254
  - (mcm1957) Honor '>' at dependency checks too [#246].
249
255
 
250
- ### 2.8.0 (2024-07-28)
251
- - (mcm1957) Copyright year check has been fixed for single year entries.
252
- - (mcm1957) js-controller version check added [#233].
253
- - (mcm1957) Check for fixed version dependencies and for github dependencies [#233].
254
- - (mcm1957) Missing language files reduced to warning [#203].
255
- - (mcm1957) Missing .gitignore is considered an error now.
256
- - (mcm1957) "common.noConfig" no longer reported as error if "common.adminUI" is present [#245].
256
+ ### 2.8.0 (2024-07-28)
257
+ - (mcm1957) Copyright year check has been fixed for single year entries.
258
+ - (mcm1957) js-controller version check added [#233].
259
+ - (mcm1957) Check for fixed version dependencies and for github dependencies [#233].
260
+ - (mcm1957) Missing language files reduced to warning [#203].
261
+ - (mcm1957) Missing .gitignore is considered an error now.
262
+ - (mcm1957) "common.noConfig" no longer reported as error if "common.adminUI" is present [#245].
257
263
  - (mcm1957) "common.noConfig" must match "common.adminUI" setting [#170].
258
264
 
259
- ### 2.7.2 (2024-07-26)
265
+ ### 2.7.2 (2024-07-26)
260
266
  - (mcm1957) package-lock.json check fixed.
261
267
 
262
- ### 2.7.1 (2024-07-26)
268
+ ### 2.7.1 (2024-07-26)
263
269
  - (mcm1957) Reduce setTimeout/setInterval error to warning temporary.
264
270
 
265
- ### 2.7.0 (2024-07-26)
266
- - (mcm1957) Some non trivial keywords related to adapter are enforced now [#234].
267
- - (mcm1957) Severity if [E105] / [W105] has been corrected [#204].
268
- - (mcm1957) Disallow 'globalDependencies' at package.json [#204].
269
- - (mcm1957) Several false positives for wwwOnly widgetadapters have been fixed [#230, #222].
270
- - (mcm1957) Missing .npmignore is now considered an error [#229].
271
- - (mcm1957) Usage of package.json 'files' section is now recommended.
272
- - (mcm1957) If more than 7 common.news entries are present a warning is issued now [#232].
273
- - (mcm1957) Versions listed at common.news are checked to exist at npm now [#226].
274
- - (mcm1957) 'package-lock.json' is checked to exist at GitHub now [#188].
275
- - (mcm1957) travis checks have been removed [#237].
271
+ ### 2.7.0 (2024-07-26)
272
+ - (mcm1957) Some non trivial keywords related to adapter are enforced now [#234].
273
+ - (mcm1957) Severity if [E105] / [W105] has been corrected [#204].
274
+ - (mcm1957) Disallow 'globalDependencies' at package.json [#204].
275
+ - (mcm1957) Several false positives for wwwOnly widgetadapters have been fixed [#230, #222].
276
+ - (mcm1957) Missing .npmignore is now considered an error [#229].
277
+ - (mcm1957) Usage of package.json 'files' section is now recommended.
278
+ - (mcm1957) If more than 7 common.news entries are present a warning is issued now [#232].
279
+ - (mcm1957) Versions listed at common.news are checked to exist at npm now [#226].
280
+ - (mcm1957) 'package-lock.json' is checked to exist at GitHub now [#188].
281
+ - (mcm1957) travis checks have been removed [#237].
276
282
  - (mcm1957) Copyright year now honors commit year and npm publish year too [#237].
277
283
 
278
- ### 2.6.1 (2024-06-24)
284
+ ### 2.6.1 (2024-06-24)
279
285
  - (mcm1957) Check "[W156] Adapter should support admin 5 UI (jsonConfig)" checks for reactUi now.
280
286
 
281
- ### 2.6.0 (2024-06-24)
282
- - (mcm1957) Check has been aded to ensure keywords and common.keywords are present. [#200]
287
+ ### 2.6.0 (2024-06-24)
288
+ - (mcm1957) Check has been aded to ensure keywords and common.keywords are present. [#200]
283
289
  - (mcm1957) Detection of react has been added, gulpfile.js is accepted for react based UIs now. [#223]
284
290
 
285
- ### 2.5.1 (2024-06-24)
286
- - (mcm1957) Suggestion to update dependencies to recommended version added.
291
+ ### 2.5.1 (2024-06-24)
292
+ - (mcm1957) Suggestion to update dependencies to recommended version added.
287
293
  - (mcm1957) Adapter-core recommended set to 3.1.6 [#220]
288
294
 
289
- ### 2.5.0 (2024-05-30)
295
+ ### 2.5.0 (2024-05-30)
290
296
  - (mcm1957) Check to ensure that dependency revisions are available at repository added. [#180]
291
297
 
292
- ### 2.4.0 (2024-05-30)
293
- - (mcm1957) Add check to protect sensitive data. [#195]
298
+ ### 2.4.0 (2024-05-30)
299
+ - (mcm1957) Add check to protect sensitive data. [#195]
294
300
  - (mcm1957) Add check to verify that dependencies and globalDepencies are of type array. [#90]
295
301
 
296
- ### 2.3.1 (2024-05-07)
297
- - (mcm1957) Reduce number of missing translation warnings.
298
- - (mcm1957) Seperate between required and recommended translations.
302
+ ### 2.3.1 (2024-05-07)
303
+ - (mcm1957) Reduce number of missing translation warnings.
304
+ - (mcm1957) Seperate between required and recommended translations.
299
305
  - (mcm1957) Log missing translations in detail.
300
306
 
301
- ### 2.3.0 (2024-05-07)
302
- - (mcm1957) Elements marked as deprectaed added to blacklist.
303
- - (mcm1957) Blacklist added to block elements at package.json and io-package.json.
304
- - (mcm1957) Error [E000] will be raised now if repository cannot be accessed at all [#194].
305
- - (mcm1957) Reading of package.json and io-package.json has been moved to head of tests.
306
- - (mcm1957) Check minimum and recommended node version at package.json (#160)
307
+ ### 2.3.0 (2024-05-07)
308
+ - (mcm1957) Elements marked as deprectaed added to blacklist.
309
+ - (mcm1957) Blacklist added to block elements at package.json and io-package.json.
310
+ - (mcm1957) Error [E000] will be raised now if repository cannot be accessed at all [#194].
311
+ - (mcm1957) Reading of package.json and io-package.json has been moved to head of tests.
312
+ - (mcm1957) Check minimum and recommended node version at package.json (#160)
307
313
  - (mcm1957) Raise an error if version at package.json is lower than latest release at npmjs [#192]
308
314
 
309
- ### 2.2.3 (2024-03-29)
315
+ ### 2.2.3 (2024-03-29)
310
316
  - (mcm1957) Checking of license has been improved
311
317
 
312
- ### 2.2.2 (2024-03-29)
313
- - (mcm1957) Checking of adapter-core has been fixed
318
+ ### 2.2.2 (2024-03-29)
319
+ - (mcm1957) Checking of adapter-core has been fixed
314
320
  - (mcm1957) Load all potential interesting files, fixes [#149]
315
321
 
316
- ### 2.2.1 (2024-03-26)
317
- - (mcm1957) Added check that own adapter is not listed at common.restartAdapters
318
- - (mcm1957) Added check of version strings at common.news
319
- - (mcm1957) Added check for recommended node version (node 18 for now)
320
- - (mcm1957) Disallow common.mode == subscribe
321
- - (mcm1957) Deprecate common.wakeup
322
+ ### 2.2.1 (2024-03-26)
323
+ - (mcm1957) Added check that own adapter is not listed at common.restartAdapters
324
+ - (mcm1957) Added check of version strings at common.news
325
+ - (mcm1957) Added check for recommended node version (node 18 for now)
326
+ - (mcm1957) Disallow common.mode == subscribe
327
+ - (mcm1957) Deprecate common.wakeup
322
328
  - (mcm1957) Added check for adapter-core version (>= 3.0.6)
323
329
 
324
- ### 2.2.0 (2024-03-24)
325
- - (klein0r) Added check for licenseInformation
326
- - (klein0r) Added check for deprecated license
327
- - (klein0r) Added check for required attribute common.tier
330
+ ### 2.2.0 (2024-03-24)
331
+ - (klein0r) Added check for licenseInformation
332
+ - (klein0r) Added check for deprecated license
333
+ - (klein0r) Added check for required attribute common.tier
328
334
  - (klein0r) Added check for disallowed attribute common.automaticUpgrade
329
335
 
330
- ### 2.1.13 (2024-01-02)
336
+ ### 2.1.13 (2024-01-02)
331
337
  - (bluefox) Corrected rule W156: adminUI.config === 'none' is allowed
332
338
 
333
- ### 2.1.12 (2023-09-21)
339
+ ### 2.1.12 (2023-09-21)
334
340
  - (bluefox) Added check of using '\_' in adapter name
335
341
 
336
- ### 2.1.11 (2023-09-05)
342
+ ### 2.1.11 (2023-09-05)
337
343
  - (bluefox) Added check of iobroker.js-controller in dependencies
338
344
 
339
- ### 2.1.7 (2023-08-14)
340
- - (mcm57) Update index.js - fix typo in error message (packet.json)
345
+ ### 2.1.7 (2023-08-14)
346
+ - (mcm57) Update index.js - fix typo in error message (packet.json)
341
347
  - (mcm57) Update index.js - renumber E504/1 to 519 - fixes #112
342
348
 
343
- ### 2.1.6 (2022-12-08)
349
+ ### 2.1.6 (2022-12-08)
344
350
  - (bluefox) added better error logging
345
351
 
346
- ### 2.1.5 (2022-12-07)
352
+ ### 2.1.5 (2022-12-07)
347
353
  - (bluefox) added check of `.releaseconfig.json` file
348
354
 
349
- ### 2.1.4 (2022-08-19)
355
+ ### 2.1.4 (2022-08-19)
350
356
  - (bluefox) Added check for adapter name: it may not start with '\_'
351
357
 
352
- ### 2.1.2 (2022-07-14)
358
+ ### 2.1.2 (2022-07-14)
353
359
  - (bluefox) Fixed some errors
354
360
 
355
- ### 2.1.0 (2022-05-26)
361
+ ### 2.1.0 (2022-05-26)
356
362
  - (bluefox) Added support for jsonConfig.json5 and jsonCustom.json5
357
363
 
358
- ### 2.0.5 (2022-05-22)
364
+ ### 2.0.5 (2022-05-22)
359
365
  - (bluefox) Made it possible to run with npx
360
366
 
361
- ## License
362
-
363
- The MIT License (MIT)
364
-
365
- Copyright (c) 2014-2025 Denis Haev <dogafox@gmail.com>
366
-
367
- Permission is hereby granted, free of charge, to any person obtaining a copy
368
- of this software and associated documentation files (the "Software"), to deal
369
- in the Software without restriction, including without limitation the rights
370
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
371
- copies of the Software, and to permit persons to whom the Software is
372
- furnished to do so, subject to the following conditions:
373
-
374
- The above copyright notice and this permission notice shall be included in
375
- all copies or substantial portions of the Software.
376
-
377
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
378
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
379
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
380
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
381
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
382
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
383
-
384
-
367
+ ## License
368
+
369
+ The MIT License (MIT)
370
+
371
+ Copyright (c) 2014-2025 Denis Haev <dogafox@gmail.com>
372
+
373
+ Permission is hereby granted, free of charge, to any person obtaining a copy
374
+ of this software and associated documentation files (the "Software"), to deal
375
+ in the Software without restriction, including without limitation the rights
376
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
377
+ copies of the Software, and to permit persons to whom the Software is
378
+ furnished to do so, subject to the following conditions:
379
+
380
+ The above copyright notice and this permission notice shall be included in
381
+ all copies or substantial portions of the Software.
382
+
383
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
384
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
385
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
386
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
387
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
388
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
389
+
390
+
385
391
  THE SOFTWARE.
@@ -83,7 +83,7 @@ const blacklistedAllDependenciesPackageJson = {
83
83
  err: true,
84
84
  },
85
85
  request: {
86
- msg: "'request' package is deprecated and no longer maintained. Please consider migrating to package 'axios'.",
86
+ msg: "'request' package is deprecated and no longer maintained. Consider migrating to native 'node:fetch' or 'axios' if more complex functionality is needed.",
87
87
  err: false,
88
88
  },
89
89
  };
@@ -955,7 +955,7 @@ async function checkIOPackageJson(context) {
955
955
  currentAdminVersion = adminDependency['admin'].replace(/[^\d.]/g, '');
956
956
  }
957
957
  if (!requireAdmin) {
958
- context.errors.push(
958
+ context.warnings.push(
959
959
  `[S191] admin dependency (${adminDependency['admin']}) at io-package.json is not required as 'common.adminUI' specifies that no UI exists. Feel free to remove.`,
960
960
  );
961
961
  }
@@ -381,7 +381,7 @@ async function checkVSCodeSchemas(context) {
381
381
  // Check if json.schemas exists
382
382
  if (!settingsJson['json.schemas']) {
383
383
  context.warnings.push(
384
- '[W438] .vscode/settings.json file missing "json.schemas" property. Add schema definitions for better IntelliSense support.',
384
+ '[S438] .vscode/settings.json file missing "json.schemas" property. Add schema definitions for better IntelliSense support.',
385
385
  );
386
386
  return;
387
387
  }
package/lib/M500_Code.js CHANGED
@@ -538,7 +538,7 @@ async function checkCode(context) {
538
538
  content.includes('./lib/tools') ||
539
539
  content.includes('../lib/tools') ||
540
540
  content.includes('./tools') ||
541
- content.includes('../tools')
541
+ content.includes('../tools')
542
542
  ) {
543
543
  isUsed = true;
544
544
  break;
@@ -561,6 +561,108 @@ async function checkCode(context) {
561
561
  'deleteDevice',
562
562
  ];
563
563
 
564
+ /**
565
+ * Checks if a line is within an adapter class context by examining the code structure.
566
+ * An adapter class context is one where:
567
+ * 1. The class extends utils.Adapter or similar adapter base classes
568
+ * 2. OR the code uses adapter = utils.Adapter() pattern
569
+ *
570
+ * @param {string[]} lines - All lines of the file
571
+ * @param {number} lineIndex - Current line index being checked
572
+ * @returns {boolean} True if the line is within an adapter class context
573
+ */
574
+ function isInAdapterClassContext(lines, lineIndex) {
575
+ // Look backwards and forwards to understand the context
576
+ // const contextRange = 50; // Look within 50 lines for class context
577
+ const contextRange = 1000; // Look within 1000 lines for class context
578
+ const startIdx = Math.max(0, lineIndex - contextRange);
579
+ const endIdx = Math.min(lines.length - 1, lineIndex + contextRange);
580
+
581
+ // Check for class that extends utils.Adapter pattern
582
+ for (let i = startIdx; i < endIdx; i++) {
583
+ const line = lines[i].trim();
584
+
585
+ // Pattern 1: class SomeClass extends utils.Adapter
586
+ if (/class\s+\w+\s+extends\s+utils\.Adapter/i.test(line)) {
587
+ // Check if current line is within this class
588
+ if (i < lineIndex) {
589
+ // Look for the class closing brace to see if we're inside
590
+ let braceCount = 0;
591
+ let foundOpenBrace = false;
592
+ for (let j = i; j <= lineIndex; j++) {
593
+ const checkLine = lines[j];
594
+ for (const char of checkLine) {
595
+ if (char === '{') {
596
+ braceCount++;
597
+ foundOpenBrace = true;
598
+ } else if (char === '}') {
599
+ braceCount--;
600
+ if (braceCount === 0 && foundOpenBrace && j < lineIndex) {
601
+ // Class ended before our line
602
+ break;
603
+ }
604
+ }
605
+ }
606
+ if (braceCount === 0 && foundOpenBrace && j < lineIndex) {
607
+ break;
608
+ }
609
+ }
610
+ if (braceCount > 0) {
611
+ return true; // We're inside the adapter class
612
+ }
613
+ }
614
+ }
615
+
616
+ // Pattern 2: adapter = utils.Adapter() or similar
617
+ if (/\badapter\s*=\s*utils\.Adapter\s*\(/i.test(line)) {
618
+ return true;
619
+ }
620
+
621
+ // Pattern 3: extends Adapter (without utils prefix)
622
+ if (/class\s+\w+\s+extends\s+Adapter/i.test(line) && i < lineIndex) {
623
+ // Similar brace counting logic as above
624
+ let braceCount = 0;
625
+ let foundOpenBrace = false;
626
+ for (let j = i; j <= lineIndex; j++) {
627
+ const checkLine = lines[j];
628
+ for (const char of checkLine) {
629
+ if (char === '{') {
630
+ braceCount++;
631
+ foundOpenBrace = true;
632
+ } else if (char === '}') {
633
+ braceCount--;
634
+ if (braceCount === 0 && foundOpenBrace && j < lineIndex) {
635
+ break;
636
+ }
637
+ }
638
+ }
639
+ if (braceCount === 0 && foundOpenBrace && j < lineIndex) {
640
+ break;
641
+ }
642
+ }
643
+ if (braceCount > 0) {
644
+ return true;
645
+ }
646
+ }
647
+ }
648
+
649
+ // Check if the method call is actually to a local function by looking for function definitions
650
+ const methodCallMatch = lines[lineIndex].match(/this\.(\w+)\s*\(/);
651
+ if (methodCallMatch) {
652
+ const methodName = methodCallMatch[1];
653
+ // Look for local function definition of this method
654
+ for (let i = 0; i < lines.length; i++) {
655
+ const line = lines[i].trim();
656
+ // Pattern: this.methodName = function or this.methodName = async function
657
+ if (new RegExp(`this\\.${methodName}\\s*=\\s*(async\\s+)?function`, 'i').test(line)) {
658
+ return false; // It's a local function, not adapter method
659
+ }
660
+ }
661
+ }
662
+
663
+ return false;
664
+ }
665
+
564
666
  // Track which deprecated methods have already been reported
565
667
  const reportedMethods = new Set();
566
668
 
@@ -608,10 +710,13 @@ async function checkCode(context) {
608
710
  'i',
609
711
  );
610
712
  if (!functionDefPattern.test(line)) {
611
- context.warnings.push(
612
- `[W533] method "${method}()" is deprecated and will be removed with future js-controller version. Please use "set/deleteObject()" instead.`,
613
- );
614
- reportedMethods.add(method);
713
+ // Only warn if we're in an adapter class context
714
+ if (isInAdapterClassContext(lines, i)) {
715
+ context.warnings.push(
716
+ `[W533] method "${method}()" is deprecated and will be removed with future js-controller version. Please use "set/deleteObject()" instead.`,
717
+ );
718
+ reportedMethods.add(method);
719
+ }
615
720
  }
616
721
  break; // Only warn once per line
617
722
  }
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "4.2.0-alpha.5",
2
+ "version": "4.2.0-alpha.6",
3
3
  "name": "@iobroker/repochecker",
4
4
  "dependencies": {
5
5
  "ajv": "^8.17.1",