oxlint 1.77.0 → 1.79.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/configuration_schema.json +318 -62
- package/dist/bindings.js +327 -316
- package/dist/index.d.ts +103 -23
- package/dist/lint.js +786 -723
- package/dist/plugins-dev.d.ts +2 -2
- package/package.json +20 -20
package/dist/bindings.js
CHANGED
|
@@ -29,88 +29,91 @@ function requireNative() {
|
|
|
29
29
|
} catch (err) {
|
|
30
30
|
loadErrors.push(err);
|
|
31
31
|
}
|
|
32
|
-
else if (process.platform === "android")
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
32
|
+
else if (process.platform === "android") {
|
|
33
|
+
if (process.arch === "arm64") {
|
|
34
|
+
try {
|
|
35
|
+
return require("./oxlint.android-arm64.node");
|
|
36
|
+
} catch (e) {
|
|
37
|
+
loadErrors.push(e);
|
|
38
|
+
}
|
|
39
|
+
try {
|
|
40
|
+
let binding = require("@oxlint/binding-android-arm64"), bindingPackageVersion = require("@oxlint/binding-android-arm64/package.json").version;
|
|
41
|
+
if (bindingPackageVersion !== "1.79.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.79.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
42
|
+
return binding;
|
|
43
|
+
} catch (e) {
|
|
44
|
+
loadErrors.push(e);
|
|
45
|
+
}
|
|
46
|
+
} else if (process.arch === "arm") {
|
|
47
|
+
try {
|
|
48
|
+
return require("./oxlint.android-arm-eabi.node");
|
|
49
|
+
} catch (e) {
|
|
50
|
+
loadErrors.push(e);
|
|
51
|
+
}
|
|
52
|
+
try {
|
|
53
|
+
let binding = require("@oxlint/binding-android-arm-eabi"), bindingPackageVersion = require("@oxlint/binding-android-arm-eabi/package.json").version;
|
|
54
|
+
if (bindingPackageVersion !== "1.79.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.79.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
55
|
+
return binding;
|
|
56
|
+
} catch (e) {
|
|
57
|
+
loadErrors.push(e);
|
|
58
|
+
}
|
|
59
|
+
} else loadErrors.push(/* @__PURE__ */ Error(`Unsupported architecture on Android ${process.arch}`));
|
|
60
|
+
} else if (process.platform === "win32") {
|
|
61
|
+
if (process.arch === "x64") {
|
|
62
|
+
if (process.config && process.config.variables && process.config.variables.shlib_suffix === "dll.a" || process.config && process.config.variables && process.config.variables.node_target_type === "shared_library") {
|
|
63
|
+
try {
|
|
64
|
+
return require("./oxlint.win32-x64-gnu.node");
|
|
65
|
+
} catch (e) {
|
|
66
|
+
loadErrors.push(e);
|
|
67
|
+
}
|
|
68
|
+
try {
|
|
69
|
+
let binding = require("@oxlint/binding-win32-x64-gnu"), bindingPackageVersion = require("@oxlint/binding-win32-x64-gnu/package.json").version;
|
|
70
|
+
if (bindingPackageVersion !== "1.79.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.79.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
71
|
+
return binding;
|
|
72
|
+
} catch (e) {
|
|
73
|
+
loadErrors.push(e);
|
|
74
|
+
}
|
|
75
|
+
} else {
|
|
76
|
+
try {
|
|
77
|
+
return require("./oxlint.win32-x64-msvc.node");
|
|
78
|
+
} catch (e) {
|
|
79
|
+
loadErrors.push(e);
|
|
80
|
+
}
|
|
81
|
+
try {
|
|
82
|
+
let binding = require("@oxlint/binding-win32-x64-msvc"), bindingPackageVersion = require("@oxlint/binding-win32-x64-msvc/package.json").version;
|
|
83
|
+
if (bindingPackageVersion !== "1.79.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.79.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
84
|
+
return binding;
|
|
85
|
+
} catch (e) {
|
|
86
|
+
loadErrors.push(e);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
} else if (process.arch === "ia32") {
|
|
90
|
+
try {
|
|
91
|
+
return require("./oxlint.win32-ia32-msvc.node");
|
|
92
|
+
} catch (e) {
|
|
93
|
+
loadErrors.push(e);
|
|
94
|
+
}
|
|
95
|
+
try {
|
|
96
|
+
let binding = require("@oxlint/binding-win32-ia32-msvc"), bindingPackageVersion = require("@oxlint/binding-win32-ia32-msvc/package.json").version;
|
|
97
|
+
if (bindingPackageVersion !== "1.79.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.79.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
98
|
+
return binding;
|
|
99
|
+
} catch (e) {
|
|
100
|
+
loadErrors.push(e);
|
|
101
|
+
}
|
|
102
|
+
} else if (process.arch === "arm64") {
|
|
103
|
+
try {
|
|
104
|
+
return require("./oxlint.win32-arm64-msvc.node");
|
|
105
|
+
} catch (e) {
|
|
106
|
+
loadErrors.push(e);
|
|
107
|
+
}
|
|
108
|
+
try {
|
|
109
|
+
let binding = require("@oxlint/binding-win32-arm64-msvc"), bindingPackageVersion = require("@oxlint/binding-win32-arm64-msvc/package.json").version;
|
|
110
|
+
if (bindingPackageVersion !== "1.79.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.79.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
111
|
+
return binding;
|
|
112
|
+
} catch (e) {
|
|
113
|
+
loadErrors.push(e);
|
|
114
|
+
}
|
|
115
|
+
} else loadErrors.push(/* @__PURE__ */ Error(`Unsupported architecture on Windows: ${process.arch}`));
|
|
116
|
+
} else if (process.platform === "darwin") {
|
|
114
117
|
try {
|
|
115
118
|
return require("./oxlint.darwin-universal.node");
|
|
116
119
|
} catch (e) {
|
|
@@ -118,7 +121,7 @@ function requireNative() {
|
|
|
118
121
|
}
|
|
119
122
|
try {
|
|
120
123
|
let binding = require("@oxlint/binding-darwin-universal"), bindingPackageVersion = require("@oxlint/binding-darwin-universal/package.json").version;
|
|
121
|
-
if (bindingPackageVersion !== "1.
|
|
124
|
+
if (bindingPackageVersion !== "1.79.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.79.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
122
125
|
return binding;
|
|
123
126
|
} catch (e) {
|
|
124
127
|
loadErrors.push(e);
|
|
@@ -131,7 +134,7 @@ function requireNative() {
|
|
|
131
134
|
}
|
|
132
135
|
try {
|
|
133
136
|
let binding = require("@oxlint/binding-darwin-x64"), bindingPackageVersion = require("@oxlint/binding-darwin-x64/package.json").version;
|
|
134
|
-
if (bindingPackageVersion !== "1.
|
|
137
|
+
if (bindingPackageVersion !== "1.79.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.79.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
135
138
|
return binding;
|
|
136
139
|
} catch (e) {
|
|
137
140
|
loadErrors.push(e);
|
|
@@ -144,242 +147,250 @@ function requireNative() {
|
|
|
144
147
|
}
|
|
145
148
|
try {
|
|
146
149
|
let binding = require("@oxlint/binding-darwin-arm64"), bindingPackageVersion = require("@oxlint/binding-darwin-arm64/package.json").version;
|
|
147
|
-
if (bindingPackageVersion !== "1.
|
|
150
|
+
if (bindingPackageVersion !== "1.79.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.79.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
148
151
|
return binding;
|
|
149
152
|
} catch (e) {
|
|
150
153
|
loadErrors.push(e);
|
|
151
154
|
}
|
|
152
155
|
} else loadErrors.push(/* @__PURE__ */ Error(`Unsupported architecture on macOS: ${process.arch}`));
|
|
153
|
-
} else if (process.platform === "freebsd")
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
156
|
+
} else if (process.platform === "freebsd") {
|
|
157
|
+
if (process.arch === "x64") {
|
|
158
|
+
try {
|
|
159
|
+
return require("./oxlint.freebsd-x64.node");
|
|
160
|
+
} catch (e) {
|
|
161
|
+
loadErrors.push(e);
|
|
162
|
+
}
|
|
163
|
+
try {
|
|
164
|
+
let binding = require("@oxlint/binding-freebsd-x64"), bindingPackageVersion = require("@oxlint/binding-freebsd-x64/package.json").version;
|
|
165
|
+
if (bindingPackageVersion !== "1.79.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.79.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
166
|
+
return binding;
|
|
167
|
+
} catch (e) {
|
|
168
|
+
loadErrors.push(e);
|
|
169
|
+
}
|
|
170
|
+
} else if (process.arch === "arm64") {
|
|
171
|
+
try {
|
|
172
|
+
return require("./oxlint.freebsd-arm64.node");
|
|
173
|
+
} catch (e) {
|
|
174
|
+
loadErrors.push(e);
|
|
175
|
+
}
|
|
176
|
+
try {
|
|
177
|
+
let binding = require("@oxlint/binding-freebsd-arm64"), bindingPackageVersion = require("@oxlint/binding-freebsd-arm64/package.json").version;
|
|
178
|
+
if (bindingPackageVersion !== "1.79.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.79.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
179
|
+
return binding;
|
|
180
|
+
} catch (e) {
|
|
181
|
+
loadErrors.push(e);
|
|
182
|
+
}
|
|
183
|
+
} else loadErrors.push(/* @__PURE__ */ Error(`Unsupported architecture on FreeBSD: ${process.arch}`));
|
|
184
|
+
} else if (process.platform === "linux") {
|
|
185
|
+
if (process.arch === "x64") {
|
|
186
|
+
if (isMusl()) {
|
|
187
|
+
try {
|
|
188
|
+
return require("./oxlint.linux-x64-musl.node");
|
|
189
|
+
} catch (e) {
|
|
190
|
+
loadErrors.push(e);
|
|
191
|
+
}
|
|
192
|
+
try {
|
|
193
|
+
let binding = require("@oxlint/binding-linux-x64-musl"), bindingPackageVersion = require("@oxlint/binding-linux-x64-musl/package.json").version;
|
|
194
|
+
if (bindingPackageVersion !== "1.79.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.79.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
195
|
+
return binding;
|
|
196
|
+
} catch (e) {
|
|
197
|
+
loadErrors.push(e);
|
|
198
|
+
}
|
|
199
|
+
} else {
|
|
200
|
+
try {
|
|
201
|
+
return require("./oxlint.linux-x64-gnu.node");
|
|
202
|
+
} catch (e) {
|
|
203
|
+
loadErrors.push(e);
|
|
204
|
+
}
|
|
205
|
+
try {
|
|
206
|
+
let binding = require("@oxlint/binding-linux-x64-gnu"), bindingPackageVersion = require("@oxlint/binding-linux-x64-gnu/package.json").version;
|
|
207
|
+
if (bindingPackageVersion !== "1.79.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.79.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
208
|
+
return binding;
|
|
209
|
+
} catch (e) {
|
|
210
|
+
loadErrors.push(e);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
} else if (process.arch === "arm64") {
|
|
214
|
+
if (isMusl()) {
|
|
215
|
+
try {
|
|
216
|
+
return require("./oxlint.linux-arm64-musl.node");
|
|
217
|
+
} catch (e) {
|
|
218
|
+
loadErrors.push(e);
|
|
219
|
+
}
|
|
220
|
+
try {
|
|
221
|
+
let binding = require("@oxlint/binding-linux-arm64-musl"), bindingPackageVersion = require("@oxlint/binding-linux-arm64-musl/package.json").version;
|
|
222
|
+
if (bindingPackageVersion !== "1.79.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.79.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
223
|
+
return binding;
|
|
224
|
+
} catch (e) {
|
|
225
|
+
loadErrors.push(e);
|
|
226
|
+
}
|
|
227
|
+
} else {
|
|
228
|
+
try {
|
|
229
|
+
return require("./oxlint.linux-arm64-gnu.node");
|
|
230
|
+
} catch (e) {
|
|
231
|
+
loadErrors.push(e);
|
|
232
|
+
}
|
|
233
|
+
try {
|
|
234
|
+
let binding = require("@oxlint/binding-linux-arm64-gnu"), bindingPackageVersion = require("@oxlint/binding-linux-arm64-gnu/package.json").version;
|
|
235
|
+
if (bindingPackageVersion !== "1.79.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.79.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
236
|
+
return binding;
|
|
237
|
+
} catch (e) {
|
|
238
|
+
loadErrors.push(e);
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
} else if (process.arch === "arm") {
|
|
242
|
+
if (isMusl()) {
|
|
243
|
+
try {
|
|
244
|
+
return require("./oxlint.linux-arm-musleabihf.node");
|
|
245
|
+
} catch (e) {
|
|
246
|
+
loadErrors.push(e);
|
|
247
|
+
}
|
|
248
|
+
try {
|
|
249
|
+
let binding = require("@oxlint/binding-linux-arm-musleabihf"), bindingPackageVersion = require("@oxlint/binding-linux-arm-musleabihf/package.json").version;
|
|
250
|
+
if (bindingPackageVersion !== "1.79.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.79.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
251
|
+
return binding;
|
|
252
|
+
} catch (e) {
|
|
253
|
+
loadErrors.push(e);
|
|
254
|
+
}
|
|
255
|
+
} else {
|
|
256
|
+
try {
|
|
257
|
+
return require("./oxlint.linux-arm-gnueabihf.node");
|
|
258
|
+
} catch (e) {
|
|
259
|
+
loadErrors.push(e);
|
|
260
|
+
}
|
|
261
|
+
try {
|
|
262
|
+
let binding = require("@oxlint/binding-linux-arm-gnueabihf"), bindingPackageVersion = require("@oxlint/binding-linux-arm-gnueabihf/package.json").version;
|
|
263
|
+
if (bindingPackageVersion !== "1.79.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.79.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
264
|
+
return binding;
|
|
265
|
+
} catch (e) {
|
|
266
|
+
loadErrors.push(e);
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
} else if (process.arch === "loong64") {
|
|
270
|
+
if (isMusl()) {
|
|
271
|
+
try {
|
|
272
|
+
return require("./oxlint.linux-loong64-musl.node");
|
|
273
|
+
} catch (e) {
|
|
274
|
+
loadErrors.push(e);
|
|
275
|
+
}
|
|
276
|
+
try {
|
|
277
|
+
let binding = require("@oxlint/binding-linux-loong64-musl"), bindingPackageVersion = require("@oxlint/binding-linux-loong64-musl/package.json").version;
|
|
278
|
+
if (bindingPackageVersion !== "1.79.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.79.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
279
|
+
return binding;
|
|
280
|
+
} catch (e) {
|
|
281
|
+
loadErrors.push(e);
|
|
282
|
+
}
|
|
283
|
+
} else {
|
|
284
|
+
try {
|
|
285
|
+
return require("./oxlint.linux-loong64-gnu.node");
|
|
286
|
+
} catch (e) {
|
|
287
|
+
loadErrors.push(e);
|
|
288
|
+
}
|
|
289
|
+
try {
|
|
290
|
+
let binding = require("@oxlint/binding-linux-loong64-gnu"), bindingPackageVersion = require("@oxlint/binding-linux-loong64-gnu/package.json").version;
|
|
291
|
+
if (bindingPackageVersion !== "1.79.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.79.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
292
|
+
return binding;
|
|
293
|
+
} catch (e) {
|
|
294
|
+
loadErrors.push(e);
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
} else if (process.arch === "riscv64") {
|
|
298
|
+
if (isMusl()) {
|
|
299
|
+
try {
|
|
300
|
+
return require("./oxlint.linux-riscv64-musl.node");
|
|
301
|
+
} catch (e) {
|
|
302
|
+
loadErrors.push(e);
|
|
303
|
+
}
|
|
304
|
+
try {
|
|
305
|
+
let binding = require("@oxlint/binding-linux-riscv64-musl"), bindingPackageVersion = require("@oxlint/binding-linux-riscv64-musl/package.json").version;
|
|
306
|
+
if (bindingPackageVersion !== "1.79.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.79.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
307
|
+
return binding;
|
|
308
|
+
} catch (e) {
|
|
309
|
+
loadErrors.push(e);
|
|
310
|
+
}
|
|
311
|
+
} else {
|
|
312
|
+
try {
|
|
313
|
+
return require("./oxlint.linux-riscv64-gnu.node");
|
|
314
|
+
} catch (e) {
|
|
315
|
+
loadErrors.push(e);
|
|
316
|
+
}
|
|
317
|
+
try {
|
|
318
|
+
let binding = require("@oxlint/binding-linux-riscv64-gnu"), bindingPackageVersion = require("@oxlint/binding-linux-riscv64-gnu/package.json").version;
|
|
319
|
+
if (bindingPackageVersion !== "1.79.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.79.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
320
|
+
return binding;
|
|
321
|
+
} catch (e) {
|
|
322
|
+
loadErrors.push(e);
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
} else if (process.arch === "ppc64") {
|
|
326
|
+
try {
|
|
327
|
+
return require("./oxlint.linux-ppc64-gnu.node");
|
|
328
|
+
} catch (e) {
|
|
329
|
+
loadErrors.push(e);
|
|
330
|
+
}
|
|
331
|
+
try {
|
|
332
|
+
let binding = require("@oxlint/binding-linux-ppc64-gnu"), bindingPackageVersion = require("@oxlint/binding-linux-ppc64-gnu/package.json").version;
|
|
333
|
+
if (bindingPackageVersion !== "1.79.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.79.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
334
|
+
return binding;
|
|
335
|
+
} catch (e) {
|
|
336
|
+
loadErrors.push(e);
|
|
337
|
+
}
|
|
338
|
+
} else if (process.arch === "s390x") {
|
|
339
|
+
try {
|
|
340
|
+
return require("./oxlint.linux-s390x-gnu.node");
|
|
341
|
+
} catch (e) {
|
|
342
|
+
loadErrors.push(e);
|
|
343
|
+
}
|
|
344
|
+
try {
|
|
345
|
+
let binding = require("@oxlint/binding-linux-s390x-gnu"), bindingPackageVersion = require("@oxlint/binding-linux-s390x-gnu/package.json").version;
|
|
346
|
+
if (bindingPackageVersion !== "1.79.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.79.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
347
|
+
return binding;
|
|
348
|
+
} catch (e) {
|
|
349
|
+
loadErrors.push(e);
|
|
350
|
+
}
|
|
351
|
+
} else loadErrors.push(/* @__PURE__ */ Error(`Unsupported architecture on Linux: ${process.arch}`));
|
|
352
|
+
} else if (process.platform === "openharmony") {
|
|
353
|
+
if (process.arch === "arm64") {
|
|
354
|
+
try {
|
|
355
|
+
return require("./oxlint.openharmony-arm64.node");
|
|
356
|
+
} catch (e) {
|
|
357
|
+
loadErrors.push(e);
|
|
358
|
+
}
|
|
359
|
+
try {
|
|
360
|
+
let binding = require("@oxlint/binding-openharmony-arm64"), bindingPackageVersion = require("@oxlint/binding-openharmony-arm64/package.json").version;
|
|
361
|
+
if (bindingPackageVersion !== "1.79.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.79.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
362
|
+
return binding;
|
|
363
|
+
} catch (e) {
|
|
364
|
+
loadErrors.push(e);
|
|
365
|
+
}
|
|
366
|
+
} else if (process.arch === "x64") {
|
|
367
|
+
try {
|
|
368
|
+
return require("./oxlint.openharmony-x64.node");
|
|
369
|
+
} catch (e) {
|
|
370
|
+
loadErrors.push(e);
|
|
371
|
+
}
|
|
372
|
+
try {
|
|
373
|
+
let binding = require("@oxlint/binding-openharmony-x64"), bindingPackageVersion = require("@oxlint/binding-openharmony-x64/package.json").version;
|
|
374
|
+
if (bindingPackageVersion !== "1.79.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.79.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
375
|
+
return binding;
|
|
376
|
+
} catch (e) {
|
|
377
|
+
loadErrors.push(e);
|
|
378
|
+
}
|
|
379
|
+
} else if (process.arch === "arm") {
|
|
380
|
+
try {
|
|
381
|
+
return require("./oxlint.openharmony-arm.node");
|
|
382
|
+
} catch (e) {
|
|
383
|
+
loadErrors.push(e);
|
|
384
|
+
}
|
|
385
|
+
try {
|
|
386
|
+
let binding = require("@oxlint/binding-openharmony-arm"), bindingPackageVersion = require("@oxlint/binding-openharmony-arm/package.json").version;
|
|
387
|
+
if (bindingPackageVersion !== "1.79.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.79.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
388
|
+
return binding;
|
|
389
|
+
} catch (e) {
|
|
390
|
+
loadErrors.push(e);
|
|
391
|
+
}
|
|
392
|
+
} else loadErrors.push(/* @__PURE__ */ Error(`Unsupported architecture on OpenHarmony: ${process.arch}`));
|
|
393
|
+
} else loadErrors.push(/* @__PURE__ */ Error(`Unsupported OS: ${process.platform}, architecture: ${process.arch}`));
|
|
383
394
|
}
|
|
384
395
|
function createLoadErrorChain(errors) {
|
|
385
396
|
return errors.reduce((previous, current) => {
|
|
@@ -440,7 +451,7 @@ if (forceWasi || (nativeBinding = requireNative()), !nativeBinding || forceWasi)
|
|
|
440
451
|
if (candidateError = __napiWasiResolveCandidate("@oxlint/binding-wasm32-wasi", !0, void 0), candidateFailed = candidateError !== null, !candidateFailed) {
|
|
441
452
|
if (process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
|
|
442
453
|
let bindingPackageVersion = require("@oxlint/binding-wasm32-wasi/package.json").version;
|
|
443
|
-
if (bindingPackageVersion !== "1.
|
|
454
|
+
if (bindingPackageVersion !== "1.79.0") throw Error(`WASI binding package version mismatch, expected 1.79.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
444
455
|
}
|
|
445
456
|
wasiBinding = require("@oxlint/binding-wasm32-wasi"), nativeBinding = wasiBinding, wasiBindingLoaded = !0;
|
|
446
457
|
}
|