@iobroker/repochecker 4.2.0-alpha.5 → 4.2.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.
- package/README.md +259 -255
- package/lib/M000_PackageJson.js +1 -1
- package/lib/M100_IOPackageJson.js +1 -1
- package/lib/M400_Repository.js +1 -1
- package/lib/M500_Code.js +110 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,385 +1,389 @@
|
|
|
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
|
|
37
|
-
- (
|
|
38
|
-
- (copilot)
|
|
39
|
-
- (
|
|
40
|
-
- (
|
|
41
|
-
- (copilot)
|
|
42
|
-
- (copilot)
|
|
43
|
-
- (copilot) Added check for .
|
|
44
|
-
- (copilot) Added
|
|
45
|
-
- (copilot)
|
|
46
|
-
- (copilot)
|
|
47
|
-
- (copilot)
|
|
36
|
+
### 4.2.0 (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
|
+
- (copilot) Added io-package.json schema validation against official schema (W205, W207, W208) [#503].
|
|
42
|
+
- (copilot) Added check for deprecated adapter methods (createState/createChannel/createDevice/deleteState/deleteChannel/deleteDevice) (W533) [#182].
|
|
43
|
+
- (copilot) Added check for outdated lib/tools.js file usage (W532) [#432].
|
|
44
|
+
- (copilot) Added VS Code schema definitions checker for .vscode/settings.json - validates json.schemas for io-package.json and jsonConfig files [#336].
|
|
45
|
+
- (copilot) Change W510 to E510: Convert missing admin i18n files from warning to error [#400].
|
|
46
|
+
- (copilot) Renumbered all issues in M500__JsonConfig.js from 500-511 range to 550-561 range [#481].
|
|
47
|
+
- (copilot) Added check for .commitinfo file - error if present (E905), warning if not in .gitignore (W906) [#467].
|
|
48
|
+
- (copilot) Added check for allowInit attribute [#181].
|
|
49
|
+
- (copilot) Added detection for empty dependency objects in io-package.json (E200, E201) [#422].
|
|
50
|
+
- (copilot) Added suggestion to restart 'vis-2' when 'vis' is in restartAdapters (S202) [#412].
|
|
51
|
+
- (copilot) Modified W513 gulpfile.js warning to check for @iobroker/adapter-dev dependency and add S531 suggestion [#469].
|
|
48
52
|
- (copilot) Fixed W195 warning for array elements - add W203 warning for unsupported array encryption [#399].
|
|
49
53
|
|
|
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].
|
|
54
|
+
### 4.1.0 (2025-09-11)
|
|
55
|
+
- (mcm1957) eslint-config and testing suggestions have been updated.
|
|
56
|
+
- (mcm1957) adapter-core suggestions has been updated.
|
|
57
|
+
- (mcm1957) URGENT and IMPORTANT issued are watched now.
|
|
58
|
+
- (mcm1957) Using @iobroker/eslint-config is suggested now.
|
|
59
|
+
- (mcm1957) Adding @iobroker/testing to dependencies is logged as error now [#447].
|
|
60
|
+
- (mcm1957) Text for S191 has been extended [#393].
|
|
61
|
+
- (mcm1957) Text for S052 has been corrected [#434].
|
|
62
|
+
- (mcm1957) Formatting if W174 has been improved [#408].
|
|
63
|
+
- (mcm1957) @types/* as dependency now raise a warning [#421].
|
|
60
64
|
- (mcm1957) Dependencies have been updated.
|
|
61
65
|
|
|
62
|
-
### 4.0.2 (2025-08-12)
|
|
66
|
+
### 4.0.2 (2025-08-12)
|
|
63
67
|
- (mcm1957) js-controller 6.0.11 recommended now.
|
|
64
68
|
|
|
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].
|
|
69
|
+
### 4.0.1 (2025-08-11)
|
|
70
|
+
- (mcm1957) Wrong suggestion to add admin dependency has been corrected [#452].
|
|
71
|
+
- (mcm1957) Text for E952 has been corrected [#446].
|
|
72
|
+
- (mcm1957) Adapt wording at W098 / E029 [#448].
|
|
73
|
+
- (mcm1957) Adapter-core 3.3.1 suggestion added [#455].
|
|
74
|
+
- (mcm1957) Admin 7.6.17 recommendation added [#435].
|
|
71
75
|
- (mcm1957) jsonConfig expertMode flag added [#386].
|
|
72
76
|
|
|
73
|
-
### 4.0.0 (2025-08-05)
|
|
74
|
-
- (mcm1957) use jsdelivr.com to retrive files from github.
|
|
77
|
+
### 4.0.0 (2025-08-05)
|
|
78
|
+
- (mcm1957) use jsdelivr.com to retrive files from github.
|
|
75
79
|
- (mcm1957) Dependencies have been updated.
|
|
76
80
|
|
|
77
|
-
### 3.5.8 (2025-05-17)
|
|
81
|
+
### 3.5.8 (2025-05-17)
|
|
78
82
|
- (mcm1957) add authorization for github using OWN_GITHUB_TOKEN.
|
|
79
83
|
|
|
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]
|
|
84
|
+
### 3.5.5 (2025-04-28)
|
|
85
|
+
- (mcm1957) Node.js 20 is suggested now.
|
|
86
|
+
- (mcm1957) Suggested release for several packages has been encreased.
|
|
87
|
+
- (mcm1957) Do not raise E186 if E190 is raised anyway. [#387]
|
|
84
88
|
- (mcm1957) Dependencies have been updated.0
|
|
85
89
|
|
|
86
|
-
### 3.5.4 (2025-03-03)
|
|
90
|
+
### 3.5.4 (2025-03-03)
|
|
87
91
|
- (mcm1957) Ignore boolean paramters when checking protectedNative/encryptedNative. [#395]
|
|
88
92
|
|
|
89
|
-
### 3.5.3 (2025-02-21)
|
|
93
|
+
### 3.5.3 (2025-02-21)
|
|
90
94
|
- (mcm1957) Crash has been fixed if protectedNative/encryptedNative is not an array. [#385]
|
|
91
95
|
|
|
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]
|
|
96
|
+
### 3.5.2 (2025-02-19)
|
|
97
|
+
- (mcm1957) Incorrect admin suggestion for very olf html adapters corrected. [#383]
|
|
98
|
+
- (mcm1957) Errors during parsing if icon improved. [#381]
|
|
95
99
|
- (mcm1957) Crash if protectedNative or encryptedNative is missing. [#382]
|
|
96
100
|
|
|
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.
|
|
101
|
+
### 3.5.0 (2025-02-18)
|
|
102
|
+
- (mcm1957) Fixed dependency warning ([W174]) has been reduces to suggestion. [#374]
|
|
103
|
+
- (mcm1957) Some changes to jsonConfig check have been implemented.
|
|
104
|
+
- (mcm1957) common.supportCustoms check has been added. [#379]
|
|
105
|
+
- (mcm1957) Check that key listed at encryptedNative or protectedNative is listed at native too. [#218]
|
|
106
|
+
- (mcm1957) Check that key listed at encryptedNative is listed at protectedNative too. [#342]
|
|
107
|
+
- (mcm1957) Check that extension adapters require web adapter. [#311]
|
|
108
|
+
- (mcm1957) List of suspicious keys to protect has been extended. [#358]
|
|
109
|
+
- (mcm1957) checking of 'admin' globalDependency has been added.
|
|
110
|
+
- (mcm1957) checking of 'publishConfig.registry' has been added.
|
|
111
|
+
- (mcm1957) New commandline option --noinfo added.
|
|
108
112
|
- (mcm1957) Logging has been adapted.
|
|
109
113
|
|
|
110
|
-
### 3.4.4 (2025-02-12)
|
|
114
|
+
### 3.4.4 (2025-02-12)
|
|
111
115
|
- (mcm1957) Some external attributes added to valid package.json attributes.
|
|
112
116
|
|
|
113
|
-
### 3.4.2 (2025-02-12)
|
|
117
|
+
### 3.4.2 (2025-02-12)
|
|
114
118
|
- (mcm1957) 'type' and 'types' added to valid package.json attributes.
|
|
115
119
|
|
|
116
|
-
### 3.4.1 (2025-02-11)
|
|
120
|
+
### 3.4.1 (2025-02-11)
|
|
117
121
|
- (mcm1957) Add 'publishConfig' to valid package.json attributes.
|
|
118
122
|
|
|
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.
|
|
123
|
+
### 3.4.0 (2025-02-11)
|
|
124
|
+
- (mcm1957) Do not suggest to migrate to adapter-dev if only gulpfile.js exists. (#334).
|
|
125
|
+
- (mcm1957) Warn if onlyWWW adapter uses adapter-core (#251).
|
|
126
|
+
- (mcm1957) Singleton checks have been reduced to suggestion level.
|
|
127
|
+
- (mcm1957) Adapter-core 3.2. required now.
|
|
128
|
+
- (mcm1957) Blacklists for peerDependencies and optionalDependencies have been added (#364).
|
|
129
|
+
- (mcm1957) Suggestings for typical devDependencies have been added (#344).
|
|
130
|
+
- (mcm1957) Checking of package dependencies has been enhanced.
|
|
131
|
+
- (mcm1957) Allow legacy-testing instead of testing.
|
|
132
|
+
- (mcm1957) Warn if axios is listed as devDependency (#314).
|
|
133
|
+
- (mcm1957) Adapt common.materialize deprecation message (#315).
|
|
134
|
+
- (mcm1957) Log an error if dependency is listed multiple times (#316).
|
|
135
|
+
- (mcm1957) Check package.json for invalid attributes.
|
|
136
|
+
- (mcm1957) Fix duplicated warning E432 and E434.
|
|
133
137
|
- (mcm1957) Adapt copyright year advisory.
|
|
134
138
|
|
|
135
|
-
### 3.3.2 (2025-01-20)
|
|
139
|
+
### 3.3.2 (2025-01-20)
|
|
136
140
|
- (mcm1957) Avoid crash if some file cannot be downloaded.
|
|
137
141
|
|
|
138
|
-
### 3.3.1 (2025-01-19)
|
|
142
|
+
### 3.3.1 (2025-01-19)
|
|
139
143
|
- (mcm1957) Report malformed semver specifications has been fixed.
|
|
140
144
|
|
|
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.
|
|
145
|
+
### 3.3.0 (2025-01-19)
|
|
146
|
+
- (mcm1957) "common.singleton" causes a warning now for non-onlyWWW Adapters.
|
|
147
|
+
- (mcm1957) "$schema" has been blacklisted at io-package.json.
|
|
148
|
+
- (mcm1957) Warn if 'common.nondeletable' flag is detected.
|
|
149
|
+
- (mcm1957) Report request as deprecated package.
|
|
150
|
+
- (mcm1957) Report malformed semver specifications.
|
|
151
|
+
- (mcm1957) Check of copyright-year complains about future dates now.
|
|
152
|
+
- (mcm1957) Checking for responsive design issues has been added.
|
|
149
153
|
- (mcm1957) Releaseinfo has been added to "checks" log.
|
|
150
154
|
|
|
151
|
-
### 3.2.4 (2025-01-16)
|
|
155
|
+
### 3.2.4 (2025-01-16)
|
|
152
156
|
- (mcm1957) Suggested release of testing and adapter-core increased.
|
|
153
157
|
|
|
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.
|
|
158
|
+
### 3.2.3 (2025-01-11)
|
|
159
|
+
- (mcm1957) An error is issued if js-controller dependency is missing.
|
|
160
|
+
- (mcm1957) Required js-controller has been increased to 5.0.19.
|
|
157
161
|
- (mcm1957) Recommended js-controller version is omitted if identical to required one.
|
|
158
162
|
|
|
159
|
-
### 3.2.2 (2024-11-01)
|
|
160
|
-
- (mcm1957) Link to open issues has been corrected.
|
|
163
|
+
### 3.2.2 (2024-11-01)
|
|
164
|
+
- (mcm1957) Link to open issues has been corrected.
|
|
161
165
|
- (mcm1957) Component name added to responsive check issues.
|
|
162
166
|
|
|
163
|
-
### 3.2.1 (2024-11-01)
|
|
167
|
+
### 3.2.1 (2024-11-01)
|
|
164
168
|
- (mcm1957) Size checking for "divider" and "staticImage" suspended.
|
|
165
169
|
|
|
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.
|
|
170
|
+
### 3.2.0 (2024-11-01)
|
|
171
|
+
- (oweitman) Script has been extended to use optionally local data for checking.
|
|
172
|
+
- (mcm1957) Warning if i18n is not used has been fixed [#324].
|
|
173
|
+
- (mcm1957) Check for importent issues has been added.
|
|
170
174
|
- (mcm1957) Checking of jsonConfig (initially) added.
|
|
171
175
|
|
|
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]
|
|
176
|
+
### 3.1.4 (2024-10-26)
|
|
177
|
+
- (mcm1957) linter has been activated and issues reported have been fixed.
|
|
178
|
+
- (mcm1957) Blacklist for package/dependencies has been extended.
|
|
179
|
+
- (mcm1957) Recommend adapter-core 3.2.2 now.
|
|
180
|
+
- (mcm1957) Clearify test for "[E952] .npmignore not found". [#320]
|
|
177
181
|
- (mcm1957) Abort processing if iobroker.live not reachable. [#321]
|
|
178
182
|
|
|
179
|
-
### 3.1.3 (2024-10-11)
|
|
183
|
+
### 3.1.3 (2024-10-11)
|
|
180
184
|
- (mcm1957) Checker no longer crash id no npm package exists.
|
|
181
185
|
|
|
182
|
-
### 3.1.2 (2024-10-04)
|
|
186
|
+
### 3.1.2 (2024-10-04)
|
|
183
187
|
- (mcm1957) Require node 18 minimum as engines clause.
|
|
184
188
|
|
|
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.
|
|
189
|
+
### 3.1.1 (2024-10-04)
|
|
190
|
+
- (mcm1957) "[E166] 'common.mode: extension' is unknown" has been fixed [#308]
|
|
191
|
+
- (mcm1957) "[E904] file iob_npm.done found in repository, but not found in .gitignore" removed as covered by [E503]. [#309]
|
|
192
|
+
- (mcm1957) "[E500] node_modules found" has been retricted to adapetr root. [#297]
|
|
193
|
+
- (mcm1957) Do not check main entry if common.mode none or extension.
|
|
190
194
|
- (mcm1957) Change "[W113] Adapter should support compact mode" text and honor common.compact set to false. [#300]
|
|
191
195
|
|
|
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]
|
|
196
|
+
### 3.1.0 (2024-09-29)
|
|
197
|
+
- (mcm1957) "@iobroker/plugin-sentry" blacklisted as dependency [#301]
|
|
198
|
+
- (mcm1957) Accept .ts files as main file too. [#303]
|
|
195
199
|
- (mcm1957) [E405] and [E426] incorrect path has been corrected. [#299]
|
|
196
200
|
|
|
197
|
-
### 3.0.7 (2024-09-19)
|
|
201
|
+
### 3.0.7 (2024-09-19)
|
|
198
202
|
- (mcm1957) "[W523] 'package-lock.json"'not found in repo!" reduced to suggestion. [#298]
|
|
199
203
|
|
|
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]
|
|
204
|
+
### 3.0.6 (2024-09-13)
|
|
205
|
+
- (mcm1957) "[E124] Main file not found" no longer raised if `common.nogit` is set
|
|
206
|
+
- (mcm1957) 'Text of "common.main" is deprecated' has been adapted. [#266]
|
|
203
207
|
- (mcm1957) Ignore errors caused by complex .gitignor/.npmignore. [#288]
|
|
204
208
|
|
|
205
|
-
### 3.0.5 (2024-09-13)
|
|
209
|
+
### 3.0.5 (2024-09-13)
|
|
206
210
|
- (mcm1957) '@iobroker/dev-server' is valid as dev-dependency. [#260]
|
|
207
211
|
|
|
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]
|
|
212
|
+
### 3.0.4 (2024-09-12)
|
|
213
|
+
- (mcm1957) Abort with incorrect dependency definition fixed [#287]
|
|
214
|
+
- (mcm1957) Improve handling of malformed dependency definitions [#284]
|
|
215
|
+
- (mcm1957) Improve handling of malformed .releaseconfig.json files [#283]
|
|
216
|
+
- (mcm1957) Missing mandatory translations are considered an error now. [#277, #278]
|
|
217
|
+
- (mcm1957) '.npmignore found but "files" is used' is a warning now. [#274]
|
|
218
|
+
- (mcm1957) '@iobroker/dev-server' has been blacklisted as any dependency. [#260]
|
|
215
219
|
- (mcm1957) Do no longer require a js-controller dependency for wwwOnly adapters. [#250]
|
|
216
220
|
|
|
217
|
-
### 3.0.3 (2024-09-12)
|
|
221
|
+
### 3.0.3 (2024-09-12)
|
|
218
222
|
- (mcm1957) Check for iob_npm.done at `.npmignore` has been removed [#294]
|
|
219
223
|
|
|
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.
|
|
224
|
+
### 3.0.2 (2024-09-11)
|
|
225
|
+
- (mcm1957) Handling of a missing LICENSE file corrected. [#282]
|
|
226
|
+
- (mcm1957) [W126] Missing mandatory translation is an error now. [#293]
|
|
227
|
+
- (mcm1957) Record repochcker version used for tests.
|
|
224
228
|
- (mcm1957) Record GitHub commit-sha of last commit used for tests.
|
|
225
229
|
|
|
226
|
-
### 3.0.0 (2024-09-10)
|
|
227
|
-
- (mcm1957) Error and warning numbering has been reviewed and duplicates removed.
|
|
230
|
+
### 3.0.0 (2024-09-10)
|
|
231
|
+
- (mcm1957) Error and warning numbering has been reviewed and duplicates removed.
|
|
228
232
|
- (mcm1957) index.js has been split into seperated modules.
|
|
229
233
|
|
|
230
|
-
### 2.10.0 (2024-08-19)
|
|
234
|
+
### 2.10.0 (2024-08-19)
|
|
231
235
|
- (mcm1957) Suggestions ([Sxxx] have been added).
|
|
232
236
|
|
|
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].
|
|
237
|
+
### 2.9.1 (2024-08-12)
|
|
238
|
+
- (mcm1957) E162 - correct dependency check for js-controller. [#267].
|
|
239
|
+
- (mcm1957) E605 - copyright year range including whitespaces is now accepted. [#269].
|
|
240
|
+
- (mcm1957) E016 - missing vaiable expansion has been added. [#263].
|
|
237
241
|
- (mcm1957) E114 - typo at error message has been fixed [#261].
|
|
238
242
|
|
|
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].
|
|
243
|
+
### 2.9.0 (2024-07-29)
|
|
244
|
+
- (mcm1957) Adapt text if sources-dist(-stable).json need a correction [#97].
|
|
245
|
+
- (mcm1957) Missing "common.mode" error text corrected [#249].
|
|
246
|
+
- (mcm1957) Files "iob" and "iobroker" are disallowed now [#248].
|
|
247
|
+
- (mcm1957) Checks related to @alcalzone/releasescript modified [#71].
|
|
244
248
|
- (mcm1957) Text of E114 (missing adminUI) adapted.
|
|
245
249
|
|
|
246
|
-
### 2.8.1 (2024-07-28)
|
|
247
|
-
- (mcm1957) Check of js-controller version has been corrected [#247].
|
|
250
|
+
### 2.8.1 (2024-07-28)
|
|
251
|
+
- (mcm1957) Check of js-controller version has been corrected [#247].
|
|
248
252
|
- (mcm1957) Honor '>' at dependency checks too [#246].
|
|
249
253
|
|
|
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].
|
|
254
|
+
### 2.8.0 (2024-07-28)
|
|
255
|
+
- (mcm1957) Copyright year check has been fixed for single year entries.
|
|
256
|
+
- (mcm1957) js-controller version check added [#233].
|
|
257
|
+
- (mcm1957) Check for fixed version dependencies and for github dependencies [#233].
|
|
258
|
+
- (mcm1957) Missing language files reduced to warning [#203].
|
|
259
|
+
- (mcm1957) Missing .gitignore is considered an error now.
|
|
260
|
+
- (mcm1957) "common.noConfig" no longer reported as error if "common.adminUI" is present [#245].
|
|
257
261
|
- (mcm1957) "common.noConfig" must match "common.adminUI" setting [#170].
|
|
258
262
|
|
|
259
|
-
### 2.7.2 (2024-07-26)
|
|
263
|
+
### 2.7.2 (2024-07-26)
|
|
260
264
|
- (mcm1957) package-lock.json check fixed.
|
|
261
265
|
|
|
262
|
-
### 2.7.1 (2024-07-26)
|
|
266
|
+
### 2.7.1 (2024-07-26)
|
|
263
267
|
- (mcm1957) Reduce setTimeout/setInterval error to warning temporary.
|
|
264
268
|
|
|
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].
|
|
269
|
+
### 2.7.0 (2024-07-26)
|
|
270
|
+
- (mcm1957) Some non trivial keywords related to adapter are enforced now [#234].
|
|
271
|
+
- (mcm1957) Severity if [E105] / [W105] has been corrected [#204].
|
|
272
|
+
- (mcm1957) Disallow 'globalDependencies' at package.json [#204].
|
|
273
|
+
- (mcm1957) Several false positives for wwwOnly widgetadapters have been fixed [#230, #222].
|
|
274
|
+
- (mcm1957) Missing .npmignore is now considered an error [#229].
|
|
275
|
+
- (mcm1957) Usage of package.json 'files' section is now recommended.
|
|
276
|
+
- (mcm1957) If more than 7 common.news entries are present a warning is issued now [#232].
|
|
277
|
+
- (mcm1957) Versions listed at common.news are checked to exist at npm now [#226].
|
|
278
|
+
- (mcm1957) 'package-lock.json' is checked to exist at GitHub now [#188].
|
|
279
|
+
- (mcm1957) travis checks have been removed [#237].
|
|
276
280
|
- (mcm1957) Copyright year now honors commit year and npm publish year too [#237].
|
|
277
281
|
|
|
278
|
-
### 2.6.1 (2024-06-24)
|
|
282
|
+
### 2.6.1 (2024-06-24)
|
|
279
283
|
- (mcm1957) Check "[W156] Adapter should support admin 5 UI (jsonConfig)" checks for reactUi now.
|
|
280
284
|
|
|
281
|
-
### 2.6.0 (2024-06-24)
|
|
282
|
-
- (mcm1957) Check has been aded to ensure keywords and common.keywords are present. [#200]
|
|
285
|
+
### 2.6.0 (2024-06-24)
|
|
286
|
+
- (mcm1957) Check has been aded to ensure keywords and common.keywords are present. [#200]
|
|
283
287
|
- (mcm1957) Detection of react has been added, gulpfile.js is accepted for react based UIs now. [#223]
|
|
284
288
|
|
|
285
|
-
### 2.5.1 (2024-06-24)
|
|
286
|
-
- (mcm1957) Suggestion to update dependencies to recommended version added.
|
|
289
|
+
### 2.5.1 (2024-06-24)
|
|
290
|
+
- (mcm1957) Suggestion to update dependencies to recommended version added.
|
|
287
291
|
- (mcm1957) Adapter-core recommended set to 3.1.6 [#220]
|
|
288
292
|
|
|
289
|
-
### 2.5.0 (2024-05-30)
|
|
293
|
+
### 2.5.0 (2024-05-30)
|
|
290
294
|
- (mcm1957) Check to ensure that dependency revisions are available at repository added. [#180]
|
|
291
295
|
|
|
292
|
-
### 2.4.0 (2024-05-30)
|
|
293
|
-
- (mcm1957) Add check to protect sensitive data. [#195]
|
|
296
|
+
### 2.4.0 (2024-05-30)
|
|
297
|
+
- (mcm1957) Add check to protect sensitive data. [#195]
|
|
294
298
|
- (mcm1957) Add check to verify that dependencies and globalDepencies are of type array. [#90]
|
|
295
299
|
|
|
296
|
-
### 2.3.1 (2024-05-07)
|
|
297
|
-
- (mcm1957) Reduce number of missing translation warnings.
|
|
298
|
-
- (mcm1957) Seperate between required and recommended translations.
|
|
300
|
+
### 2.3.1 (2024-05-07)
|
|
301
|
+
- (mcm1957) Reduce number of missing translation warnings.
|
|
302
|
+
- (mcm1957) Seperate between required and recommended translations.
|
|
299
303
|
- (mcm1957) Log missing translations in detail.
|
|
300
304
|
|
|
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)
|
|
305
|
+
### 2.3.0 (2024-05-07)
|
|
306
|
+
- (mcm1957) Elements marked as deprectaed added to blacklist.
|
|
307
|
+
- (mcm1957) Blacklist added to block elements at package.json and io-package.json.
|
|
308
|
+
- (mcm1957) Error [E000] will be raised now if repository cannot be accessed at all [#194].
|
|
309
|
+
- (mcm1957) Reading of package.json and io-package.json has been moved to head of tests.
|
|
310
|
+
- (mcm1957) Check minimum and recommended node version at package.json (#160)
|
|
307
311
|
- (mcm1957) Raise an error if version at package.json is lower than latest release at npmjs [#192]
|
|
308
312
|
|
|
309
|
-
### 2.2.3 (2024-03-29)
|
|
313
|
+
### 2.2.3 (2024-03-29)
|
|
310
314
|
- (mcm1957) Checking of license has been improved
|
|
311
315
|
|
|
312
|
-
### 2.2.2 (2024-03-29)
|
|
313
|
-
- (mcm1957) Checking of adapter-core has been fixed
|
|
316
|
+
### 2.2.2 (2024-03-29)
|
|
317
|
+
- (mcm1957) Checking of adapter-core has been fixed
|
|
314
318
|
- (mcm1957) Load all potential interesting files, fixes [#149]
|
|
315
319
|
|
|
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
|
|
320
|
+
### 2.2.1 (2024-03-26)
|
|
321
|
+
- (mcm1957) Added check that own adapter is not listed at common.restartAdapters
|
|
322
|
+
- (mcm1957) Added check of version strings at common.news
|
|
323
|
+
- (mcm1957) Added check for recommended node version (node 18 for now)
|
|
324
|
+
- (mcm1957) Disallow common.mode == subscribe
|
|
325
|
+
- (mcm1957) Deprecate common.wakeup
|
|
322
326
|
- (mcm1957) Added check for adapter-core version (>= 3.0.6)
|
|
323
327
|
|
|
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
|
|
328
|
+
### 2.2.0 (2024-03-24)
|
|
329
|
+
- (klein0r) Added check for licenseInformation
|
|
330
|
+
- (klein0r) Added check for deprecated license
|
|
331
|
+
- (klein0r) Added check for required attribute common.tier
|
|
328
332
|
- (klein0r) Added check for disallowed attribute common.automaticUpgrade
|
|
329
333
|
|
|
330
|
-
### 2.1.13 (2024-01-02)
|
|
334
|
+
### 2.1.13 (2024-01-02)
|
|
331
335
|
- (bluefox) Corrected rule W156: adminUI.config === 'none' is allowed
|
|
332
336
|
|
|
333
|
-
### 2.1.12 (2023-09-21)
|
|
337
|
+
### 2.1.12 (2023-09-21)
|
|
334
338
|
- (bluefox) Added check of using '\_' in adapter name
|
|
335
339
|
|
|
336
|
-
### 2.1.11 (2023-09-05)
|
|
340
|
+
### 2.1.11 (2023-09-05)
|
|
337
341
|
- (bluefox) Added check of iobroker.js-controller in dependencies
|
|
338
342
|
|
|
339
|
-
### 2.1.7 (2023-08-14)
|
|
340
|
-
- (mcm57) Update index.js - fix typo in error message (packet.json)
|
|
343
|
+
### 2.1.7 (2023-08-14)
|
|
344
|
+
- (mcm57) Update index.js - fix typo in error message (packet.json)
|
|
341
345
|
- (mcm57) Update index.js - renumber E504/1 to 519 - fixes #112
|
|
342
346
|
|
|
343
|
-
### 2.1.6 (2022-12-08)
|
|
347
|
+
### 2.1.6 (2022-12-08)
|
|
344
348
|
- (bluefox) added better error logging
|
|
345
349
|
|
|
346
|
-
### 2.1.5 (2022-12-07)
|
|
350
|
+
### 2.1.5 (2022-12-07)
|
|
347
351
|
- (bluefox) added check of `.releaseconfig.json` file
|
|
348
352
|
|
|
349
|
-
### 2.1.4 (2022-08-19)
|
|
353
|
+
### 2.1.4 (2022-08-19)
|
|
350
354
|
- (bluefox) Added check for adapter name: it may not start with '\_'
|
|
351
355
|
|
|
352
|
-
### 2.1.2 (2022-07-14)
|
|
356
|
+
### 2.1.2 (2022-07-14)
|
|
353
357
|
- (bluefox) Fixed some errors
|
|
354
358
|
|
|
355
|
-
### 2.1.0 (2022-05-26)
|
|
359
|
+
### 2.1.0 (2022-05-26)
|
|
356
360
|
- (bluefox) Added support for jsonConfig.json5 and jsonCustom.json5
|
|
357
361
|
|
|
358
|
-
### 2.0.5 (2022-05-22)
|
|
362
|
+
### 2.0.5 (2022-05-22)
|
|
359
363
|
- (bluefox) Made it possible to run with npx
|
|
360
364
|
|
|
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
|
-
|
|
365
|
+
## License
|
|
366
|
+
|
|
367
|
+
The MIT License (MIT)
|
|
368
|
+
|
|
369
|
+
Copyright (c) 2014-2025 Denis Haev <dogafox@gmail.com>
|
|
370
|
+
|
|
371
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
372
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
373
|
+
in the Software without restriction, including without limitation the rights
|
|
374
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
375
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
376
|
+
furnished to do so, subject to the following conditions:
|
|
377
|
+
|
|
378
|
+
The above copyright notice and this permission notice shall be included in
|
|
379
|
+
all copies or substantial portions of the Software.
|
|
380
|
+
|
|
381
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
382
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
383
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
384
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
385
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
386
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
387
|
+
|
|
388
|
+
|
|
385
389
|
THE SOFTWARE.
|
package/lib/M000_PackageJson.js
CHANGED
|
@@ -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.
|
|
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.
|
|
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
|
}
|
package/lib/M400_Repository.js
CHANGED
|
@@ -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
|
-
'[
|
|
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
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
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