oxfmt 0.43.0 → 0.44.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 +4 -4
- package/dist/{bindings-mh4tfrCL.js → bindings-D8fqxEoQ.js} +26 -26
- package/dist/cli.js +38 -5
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/package.json +27 -20
|
@@ -162,11 +162,11 @@
|
|
|
162
162
|
"markdownDescription": "Sort Tailwind CSS classes.\n\nUsing the same algorithm as [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss).\nOption names omit the `tailwind` prefix used in the original plugin (e.g., `config` instead of `tailwindConfig`).\nFor details, see each field's documentation.\n\nPass `true` or an object to enable with defaults, or omit/set `false` to disable.\n\n- Default: Disabled"
|
|
163
163
|
},
|
|
164
164
|
"tabWidth": {
|
|
165
|
-
"description": "Specify the number of spaces per indentation-level.\n\n- Default: `2`\n- Overrides `.editorconfig.indent_size`",
|
|
165
|
+
"description": "Specify the number of spaces per indentation-level.\n\n- Default: `2`\n- Overrides `.editorconfig.indent_size` (falls back to `.editorconfig.tab_width`)",
|
|
166
166
|
"type": "integer",
|
|
167
167
|
"format": "uint8",
|
|
168
168
|
"minimum": 0.0,
|
|
169
|
-
"markdownDescription": "Specify the number of spaces per indentation-level.\n\n- Default: `2`\n- Overrides `.editorconfig.indent_size`"
|
|
169
|
+
"markdownDescription": "Specify the number of spaces per indentation-level.\n\n- Default: `2`\n- Overrides `.editorconfig.indent_size` (falls back to `.editorconfig.tab_width`)"
|
|
170
170
|
},
|
|
171
171
|
"trailingComma": {
|
|
172
172
|
"description": "Print trailing commas wherever possible in multi-line comma-separated syntactic structures.\n\nA single-line array, for example, never gets trailing commas.\n\n- Default: `\"all\"`",
|
|
@@ -391,11 +391,11 @@
|
|
|
391
391
|
"markdownDescription": "Sort Tailwind CSS classes.\n\nUsing the same algorithm as [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss).\nOption names omit the `tailwind` prefix used in the original plugin (e.g., `config` instead of `tailwindConfig`).\nFor details, see each field's documentation.\n\nPass `true` or an object to enable with defaults, or omit/set `false` to disable.\n\n- Default: Disabled"
|
|
392
392
|
},
|
|
393
393
|
"tabWidth": {
|
|
394
|
-
"description": "Specify the number of spaces per indentation-level.\n\n- Default: `2`\n- Overrides `.editorconfig.indent_size`",
|
|
394
|
+
"description": "Specify the number of spaces per indentation-level.\n\n- Default: `2`\n- Overrides `.editorconfig.indent_size` (falls back to `.editorconfig.tab_width`)",
|
|
395
395
|
"type": "integer",
|
|
396
396
|
"format": "uint8",
|
|
397
397
|
"minimum": 0.0,
|
|
398
|
-
"markdownDescription": "Specify the number of spaces per indentation-level.\n\n- Default: `2`\n- Overrides `.editorconfig.indent_size`"
|
|
398
|
+
"markdownDescription": "Specify the number of spaces per indentation-level.\n\n- Default: `2`\n- Overrides `.editorconfig.indent_size` (falls back to `.editorconfig.tab_width`)"
|
|
399
399
|
},
|
|
400
400
|
"trailingComma": {
|
|
401
401
|
"description": "Print trailing commas wherever possible in multi-line comma-separated syntactic structures.\n\nA single-line array, for example, never gets trailing commas.\n\n- Default: `\"all\"`",
|
|
@@ -57,7 +57,7 @@ function requireNative() {
|
|
|
57
57
|
try {
|
|
58
58
|
const binding = require("@oxfmt/binding-android-arm64");
|
|
59
59
|
const bindingPackageVersion = require("@oxfmt/binding-android-arm64/package.json").version;
|
|
60
|
-
if (bindingPackageVersion !== "0.
|
|
60
|
+
if (bindingPackageVersion !== "0.44.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.44.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
61
61
|
return binding;
|
|
62
62
|
} catch (e) {
|
|
63
63
|
loadErrors.push(e);
|
|
@@ -71,7 +71,7 @@ function requireNative() {
|
|
|
71
71
|
try {
|
|
72
72
|
const binding = require("@oxfmt/binding-android-arm-eabi");
|
|
73
73
|
const bindingPackageVersion = require("@oxfmt/binding-android-arm-eabi/package.json").version;
|
|
74
|
-
if (bindingPackageVersion !== "0.
|
|
74
|
+
if (bindingPackageVersion !== "0.44.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.44.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
75
75
|
return binding;
|
|
76
76
|
} catch (e) {
|
|
77
77
|
loadErrors.push(e);
|
|
@@ -86,7 +86,7 @@ function requireNative() {
|
|
|
86
86
|
try {
|
|
87
87
|
const binding = require("@oxfmt/binding-win32-x64-gnu");
|
|
88
88
|
const bindingPackageVersion = require("@oxfmt/binding-win32-x64-gnu/package.json").version;
|
|
89
|
-
if (bindingPackageVersion !== "0.
|
|
89
|
+
if (bindingPackageVersion !== "0.44.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.44.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
90
90
|
return binding;
|
|
91
91
|
} catch (e) {
|
|
92
92
|
loadErrors.push(e);
|
|
@@ -100,7 +100,7 @@ function requireNative() {
|
|
|
100
100
|
try {
|
|
101
101
|
const binding = require("@oxfmt/binding-win32-x64-msvc");
|
|
102
102
|
const bindingPackageVersion = require("@oxfmt/binding-win32-x64-msvc/package.json").version;
|
|
103
|
-
if (bindingPackageVersion !== "0.
|
|
103
|
+
if (bindingPackageVersion !== "0.44.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.44.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
104
104
|
return binding;
|
|
105
105
|
} catch (e) {
|
|
106
106
|
loadErrors.push(e);
|
|
@@ -115,7 +115,7 @@ function requireNative() {
|
|
|
115
115
|
try {
|
|
116
116
|
const binding = require("@oxfmt/binding-win32-ia32-msvc");
|
|
117
117
|
const bindingPackageVersion = require("@oxfmt/binding-win32-ia32-msvc/package.json").version;
|
|
118
|
-
if (bindingPackageVersion !== "0.
|
|
118
|
+
if (bindingPackageVersion !== "0.44.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.44.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
119
119
|
return binding;
|
|
120
120
|
} catch (e) {
|
|
121
121
|
loadErrors.push(e);
|
|
@@ -129,7 +129,7 @@ function requireNative() {
|
|
|
129
129
|
try {
|
|
130
130
|
const binding = require("@oxfmt/binding-win32-arm64-msvc");
|
|
131
131
|
const bindingPackageVersion = require("@oxfmt/binding-win32-arm64-msvc/package.json").version;
|
|
132
|
-
if (bindingPackageVersion !== "0.
|
|
132
|
+
if (bindingPackageVersion !== "0.44.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.44.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
133
133
|
return binding;
|
|
134
134
|
} catch (e) {
|
|
135
135
|
loadErrors.push(e);
|
|
@@ -144,7 +144,7 @@ function requireNative() {
|
|
|
144
144
|
try {
|
|
145
145
|
const binding = require("@oxfmt/binding-darwin-universal");
|
|
146
146
|
const bindingPackageVersion = require("@oxfmt/binding-darwin-universal/package.json").version;
|
|
147
|
-
if (bindingPackageVersion !== "0.
|
|
147
|
+
if (bindingPackageVersion !== "0.44.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.44.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
148
148
|
return binding;
|
|
149
149
|
} catch (e) {
|
|
150
150
|
loadErrors.push(e);
|
|
@@ -158,7 +158,7 @@ function requireNative() {
|
|
|
158
158
|
try {
|
|
159
159
|
const binding = require("@oxfmt/binding-darwin-x64");
|
|
160
160
|
const bindingPackageVersion = require("@oxfmt/binding-darwin-x64/package.json").version;
|
|
161
|
-
if (bindingPackageVersion !== "0.
|
|
161
|
+
if (bindingPackageVersion !== "0.44.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.44.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
162
162
|
return binding;
|
|
163
163
|
} catch (e) {
|
|
164
164
|
loadErrors.push(e);
|
|
@@ -172,7 +172,7 @@ function requireNative() {
|
|
|
172
172
|
try {
|
|
173
173
|
const binding = require("@oxfmt/binding-darwin-arm64");
|
|
174
174
|
const bindingPackageVersion = require("@oxfmt/binding-darwin-arm64/package.json").version;
|
|
175
|
-
if (bindingPackageVersion !== "0.
|
|
175
|
+
if (bindingPackageVersion !== "0.44.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.44.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
176
176
|
return binding;
|
|
177
177
|
} catch (e) {
|
|
178
178
|
loadErrors.push(e);
|
|
@@ -187,7 +187,7 @@ function requireNative() {
|
|
|
187
187
|
try {
|
|
188
188
|
const binding = require("@oxfmt/binding-freebsd-x64");
|
|
189
189
|
const bindingPackageVersion = require("@oxfmt/binding-freebsd-x64/package.json").version;
|
|
190
|
-
if (bindingPackageVersion !== "0.
|
|
190
|
+
if (bindingPackageVersion !== "0.44.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.44.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
191
191
|
return binding;
|
|
192
192
|
} catch (e) {
|
|
193
193
|
loadErrors.push(e);
|
|
@@ -201,7 +201,7 @@ function requireNative() {
|
|
|
201
201
|
try {
|
|
202
202
|
const binding = require("@oxfmt/binding-freebsd-arm64");
|
|
203
203
|
const bindingPackageVersion = require("@oxfmt/binding-freebsd-arm64/package.json").version;
|
|
204
|
-
if (bindingPackageVersion !== "0.
|
|
204
|
+
if (bindingPackageVersion !== "0.44.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.44.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
205
205
|
return binding;
|
|
206
206
|
} catch (e) {
|
|
207
207
|
loadErrors.push(e);
|
|
@@ -216,7 +216,7 @@ function requireNative() {
|
|
|
216
216
|
try {
|
|
217
217
|
const binding = require("@oxfmt/binding-linux-x64-musl");
|
|
218
218
|
const bindingPackageVersion = require("@oxfmt/binding-linux-x64-musl/package.json").version;
|
|
219
|
-
if (bindingPackageVersion !== "0.
|
|
219
|
+
if (bindingPackageVersion !== "0.44.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.44.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
220
220
|
return binding;
|
|
221
221
|
} catch (e) {
|
|
222
222
|
loadErrors.push(e);
|
|
@@ -230,7 +230,7 @@ function requireNative() {
|
|
|
230
230
|
try {
|
|
231
231
|
const binding = require("@oxfmt/binding-linux-x64-gnu");
|
|
232
232
|
const bindingPackageVersion = require("@oxfmt/binding-linux-x64-gnu/package.json").version;
|
|
233
|
-
if (bindingPackageVersion !== "0.
|
|
233
|
+
if (bindingPackageVersion !== "0.44.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.44.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
234
234
|
return binding;
|
|
235
235
|
} catch (e) {
|
|
236
236
|
loadErrors.push(e);
|
|
@@ -245,7 +245,7 @@ function requireNative() {
|
|
|
245
245
|
try {
|
|
246
246
|
const binding = require("@oxfmt/binding-linux-arm64-musl");
|
|
247
247
|
const bindingPackageVersion = require("@oxfmt/binding-linux-arm64-musl/package.json").version;
|
|
248
|
-
if (bindingPackageVersion !== "0.
|
|
248
|
+
if (bindingPackageVersion !== "0.44.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.44.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
249
249
|
return binding;
|
|
250
250
|
} catch (e) {
|
|
251
251
|
loadErrors.push(e);
|
|
@@ -259,7 +259,7 @@ function requireNative() {
|
|
|
259
259
|
try {
|
|
260
260
|
const binding = require("@oxfmt/binding-linux-arm64-gnu");
|
|
261
261
|
const bindingPackageVersion = require("@oxfmt/binding-linux-arm64-gnu/package.json").version;
|
|
262
|
-
if (bindingPackageVersion !== "0.
|
|
262
|
+
if (bindingPackageVersion !== "0.44.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.44.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
263
263
|
return binding;
|
|
264
264
|
} catch (e) {
|
|
265
265
|
loadErrors.push(e);
|
|
@@ -274,7 +274,7 @@ function requireNative() {
|
|
|
274
274
|
try {
|
|
275
275
|
const binding = require("@oxfmt/binding-linux-arm-musleabihf");
|
|
276
276
|
const bindingPackageVersion = require("@oxfmt/binding-linux-arm-musleabihf/package.json").version;
|
|
277
|
-
if (bindingPackageVersion !== "0.
|
|
277
|
+
if (bindingPackageVersion !== "0.44.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.44.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
278
278
|
return binding;
|
|
279
279
|
} catch (e) {
|
|
280
280
|
loadErrors.push(e);
|
|
@@ -288,7 +288,7 @@ function requireNative() {
|
|
|
288
288
|
try {
|
|
289
289
|
const binding = require("@oxfmt/binding-linux-arm-gnueabihf");
|
|
290
290
|
const bindingPackageVersion = require("@oxfmt/binding-linux-arm-gnueabihf/package.json").version;
|
|
291
|
-
if (bindingPackageVersion !== "0.
|
|
291
|
+
if (bindingPackageVersion !== "0.44.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.44.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
292
292
|
return binding;
|
|
293
293
|
} catch (e) {
|
|
294
294
|
loadErrors.push(e);
|
|
@@ -303,7 +303,7 @@ function requireNative() {
|
|
|
303
303
|
try {
|
|
304
304
|
const binding = require("@oxfmt/binding-linux-loong64-musl");
|
|
305
305
|
const bindingPackageVersion = require("@oxfmt/binding-linux-loong64-musl/package.json").version;
|
|
306
|
-
if (bindingPackageVersion !== "0.
|
|
306
|
+
if (bindingPackageVersion !== "0.44.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.44.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
307
307
|
return binding;
|
|
308
308
|
} catch (e) {
|
|
309
309
|
loadErrors.push(e);
|
|
@@ -317,7 +317,7 @@ function requireNative() {
|
|
|
317
317
|
try {
|
|
318
318
|
const binding = require("@oxfmt/binding-linux-loong64-gnu");
|
|
319
319
|
const bindingPackageVersion = require("@oxfmt/binding-linux-loong64-gnu/package.json").version;
|
|
320
|
-
if (bindingPackageVersion !== "0.
|
|
320
|
+
if (bindingPackageVersion !== "0.44.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.44.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
321
321
|
return binding;
|
|
322
322
|
} catch (e) {
|
|
323
323
|
loadErrors.push(e);
|
|
@@ -332,7 +332,7 @@ function requireNative() {
|
|
|
332
332
|
try {
|
|
333
333
|
const binding = require("@oxfmt/binding-linux-riscv64-musl");
|
|
334
334
|
const bindingPackageVersion = require("@oxfmt/binding-linux-riscv64-musl/package.json").version;
|
|
335
|
-
if (bindingPackageVersion !== "0.
|
|
335
|
+
if (bindingPackageVersion !== "0.44.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.44.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
336
336
|
return binding;
|
|
337
337
|
} catch (e) {
|
|
338
338
|
loadErrors.push(e);
|
|
@@ -346,7 +346,7 @@ function requireNative() {
|
|
|
346
346
|
try {
|
|
347
347
|
const binding = require("@oxfmt/binding-linux-riscv64-gnu");
|
|
348
348
|
const bindingPackageVersion = require("@oxfmt/binding-linux-riscv64-gnu/package.json").version;
|
|
349
|
-
if (bindingPackageVersion !== "0.
|
|
349
|
+
if (bindingPackageVersion !== "0.44.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.44.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
350
350
|
return binding;
|
|
351
351
|
} catch (e) {
|
|
352
352
|
loadErrors.push(e);
|
|
@@ -361,7 +361,7 @@ function requireNative() {
|
|
|
361
361
|
try {
|
|
362
362
|
const binding = require("@oxfmt/binding-linux-ppc64-gnu");
|
|
363
363
|
const bindingPackageVersion = require("@oxfmt/binding-linux-ppc64-gnu/package.json").version;
|
|
364
|
-
if (bindingPackageVersion !== "0.
|
|
364
|
+
if (bindingPackageVersion !== "0.44.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.44.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
365
365
|
return binding;
|
|
366
366
|
} catch (e) {
|
|
367
367
|
loadErrors.push(e);
|
|
@@ -375,7 +375,7 @@ function requireNative() {
|
|
|
375
375
|
try {
|
|
376
376
|
const binding = require("@oxfmt/binding-linux-s390x-gnu");
|
|
377
377
|
const bindingPackageVersion = require("@oxfmt/binding-linux-s390x-gnu/package.json").version;
|
|
378
|
-
if (bindingPackageVersion !== "0.
|
|
378
|
+
if (bindingPackageVersion !== "0.44.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.44.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
379
379
|
return binding;
|
|
380
380
|
} catch (e) {
|
|
381
381
|
loadErrors.push(e);
|
|
@@ -390,7 +390,7 @@ function requireNative() {
|
|
|
390
390
|
try {
|
|
391
391
|
const binding = require("@oxfmt/binding-openharmony-arm64");
|
|
392
392
|
const bindingPackageVersion = require("@oxfmt/binding-openharmony-arm64/package.json").version;
|
|
393
|
-
if (bindingPackageVersion !== "0.
|
|
393
|
+
if (bindingPackageVersion !== "0.44.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.44.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
394
394
|
return binding;
|
|
395
395
|
} catch (e) {
|
|
396
396
|
loadErrors.push(e);
|
|
@@ -404,7 +404,7 @@ function requireNative() {
|
|
|
404
404
|
try {
|
|
405
405
|
const binding = require("@oxfmt/binding-openharmony-x64");
|
|
406
406
|
const bindingPackageVersion = require("@oxfmt/binding-openharmony-x64/package.json").version;
|
|
407
|
-
if (bindingPackageVersion !== "0.
|
|
407
|
+
if (bindingPackageVersion !== "0.44.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.44.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
408
408
|
return binding;
|
|
409
409
|
} catch (e) {
|
|
410
410
|
loadErrors.push(e);
|
|
@@ -418,7 +418,7 @@ function requireNative() {
|
|
|
418
418
|
try {
|
|
419
419
|
const binding = require("@oxfmt/binding-openharmony-arm");
|
|
420
420
|
const bindingPackageVersion = require("@oxfmt/binding-openharmony-arm/package.json").version;
|
|
421
|
-
if (bindingPackageVersion !== "0.
|
|
421
|
+
if (bindingPackageVersion !== "0.44.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.44.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
422
422
|
return binding;
|
|
423
423
|
} catch (e) {
|
|
424
424
|
loadErrors.push(e);
|
package/dist/cli.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { r as runCli } from "./bindings-
|
|
1
|
+
import { r as runCli } from "./bindings-D8fqxEoQ.js";
|
|
2
2
|
import { i as resolvePlugins } from "./apis-mHnrEtPz.js";
|
|
3
3
|
import Tinypool from "tinypool";
|
|
4
|
-
import { basename } from "node:path";
|
|
5
|
-
import { pathToFileURL } from "node:url";
|
|
4
|
+
import { basename, extname } from "node:path";
|
|
5
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
6
6
|
//#region src-js/cli/worker-proxy.ts
|
|
7
7
|
let pool = null;
|
|
8
8
|
async function initExternalFormatter(numThreads) {
|
|
@@ -53,7 +53,36 @@ async function sortTailwindClasses(options, classes) {
|
|
|
53
53
|
}, { name: "sortTailwindClasses" }).catch(() => null);
|
|
54
54
|
}
|
|
55
55
|
//#endregion
|
|
56
|
-
//#region src-js/cli/js_config.ts
|
|
56
|
+
//#region src-js/cli/js_config/node_version.ts
|
|
57
|
+
const NODE_TYPESCRIPT_SUPPORT_RANGE = "^20.19.0 || >=22.12.0";
|
|
58
|
+
const TS_MODULE_EXTENSIONS = new Set([
|
|
59
|
+
".ts",
|
|
60
|
+
".mts",
|
|
61
|
+
".cts"
|
|
62
|
+
]);
|
|
63
|
+
function getUnsupportedTypeScriptModuleLoadHint(err, specifier, nodeVersion = process.version) {
|
|
64
|
+
if (!isTypeScriptModuleSpecifier(specifier) || !isUnknownFileExtensionError(err)) return null;
|
|
65
|
+
return `TypeScript config files require Node.js ${NODE_TYPESCRIPT_SUPPORT_RANGE}.\nDetected Node.js ${nodeVersion}.\nPlease upgrade Node.js or use a JSON config file instead.`;
|
|
66
|
+
}
|
|
67
|
+
function isTypeScriptModuleSpecifier(specifier) {
|
|
68
|
+
const ext = extname(normalizeModuleSpecifierPath(specifier)).toLowerCase();
|
|
69
|
+
return TS_MODULE_EXTENSIONS.has(ext);
|
|
70
|
+
}
|
|
71
|
+
function normalizeModuleSpecifierPath(specifier) {
|
|
72
|
+
if (!specifier.startsWith("file:")) return specifier;
|
|
73
|
+
try {
|
|
74
|
+
return fileURLToPath(specifier);
|
|
75
|
+
} catch {
|
|
76
|
+
return specifier;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
function isUnknownFileExtensionError(err) {
|
|
80
|
+
if (err?.code === "ERR_UNKNOWN_FILE_EXTENSION") return true;
|
|
81
|
+
const message = err?.message;
|
|
82
|
+
return typeof message === "string" && /unknown(?: or unsupported)? file extension/i.test(message);
|
|
83
|
+
}
|
|
84
|
+
//#endregion
|
|
85
|
+
//#region src-js/cli/js_config/index.ts
|
|
57
86
|
const isObject = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
|
|
58
87
|
const VITE_CONFIG_NAME = "vite.config.ts";
|
|
59
88
|
const VITE_OXFMT_CONFIG_FIELD = "fmt";
|
|
@@ -72,7 +101,11 @@ const VITE_OXFMT_CONFIG_FIELD = "fmt";
|
|
|
72
101
|
async function loadJsConfig(path) {
|
|
73
102
|
const fileUrl = pathToFileURL(path);
|
|
74
103
|
fileUrl.searchParams.set("cache", Date.now().toString());
|
|
75
|
-
const { default: config } = await import(fileUrl.href)
|
|
104
|
+
const { default: config } = await import(fileUrl.href).catch((err) => {
|
|
105
|
+
const hint = getUnsupportedTypeScriptModuleLoadHint(err, path);
|
|
106
|
+
if (hint && err instanceof Error) err.message += `\n\n${hint}`;
|
|
107
|
+
throw err;
|
|
108
|
+
});
|
|
76
109
|
if (config === void 0) throw new Error("Configuration file has no default export.");
|
|
77
110
|
if (basename(path) === VITE_CONFIG_NAME) {
|
|
78
111
|
if (!isObject(config)) return null;
|
package/dist/index.d.ts
CHANGED
|
@@ -217,7 +217,7 @@ interface Oxfmtrc {
|
|
|
217
217
|
* Specify the number of spaces per indentation-level.
|
|
218
218
|
*
|
|
219
219
|
* - Default: `2`
|
|
220
|
-
* - Overrides `.editorconfig.indent_size`
|
|
220
|
+
* - Overrides `.editorconfig.indent_size` (falls back to `.editorconfig.tab_width`)
|
|
221
221
|
*/
|
|
222
222
|
tabWidth?: number;
|
|
223
223
|
/**
|
|
@@ -494,7 +494,7 @@ interface FormatConfig {
|
|
|
494
494
|
* Specify the number of spaces per indentation-level.
|
|
495
495
|
*
|
|
496
496
|
* - Default: `2`
|
|
497
|
-
* - Overrides `.editorconfig.indent_size`
|
|
497
|
+
* - Overrides `.editorconfig.indent_size` (falls back to `.editorconfig.tab_width`)
|
|
498
498
|
*/
|
|
499
499
|
tabWidth?: number;
|
|
500
500
|
/**
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as jsTextToDoc$1, t as format$1 } from "./bindings-
|
|
1
|
+
import { n as jsTextToDoc$1, t as format$1 } from "./bindings-D8fqxEoQ.js";
|
|
2
2
|
import { a as sortTailwindClasses, i as resolvePlugins, n as formatEmbeddedDoc, r as formatFile, t as formatEmbeddedCode } from "./apis-mHnrEtPz.js";
|
|
3
3
|
//#region src-js/index.ts
|
|
4
4
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oxfmt",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.44.0",
|
|
4
4
|
"description": "Formatter for the JavaScript Oxidation Compiler",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"formatter",
|
|
@@ -34,6 +34,13 @@
|
|
|
34
34
|
"type": "module",
|
|
35
35
|
"main": "dist/index.js",
|
|
36
36
|
"types": "dist/index.d.ts",
|
|
37
|
+
"exports": {
|
|
38
|
+
".": {
|
|
39
|
+
"types": "./dist/index.d.ts",
|
|
40
|
+
"default": "./dist/index.js"
|
|
41
|
+
},
|
|
42
|
+
"./package.json": "./package.json"
|
|
43
|
+
},
|
|
37
44
|
"dependencies": {
|
|
38
45
|
"tinypool": "2.1.0"
|
|
39
46
|
},
|
|
@@ -67,24 +74,24 @@
|
|
|
67
74
|
},
|
|
68
75
|
"preferUnplugged": true,
|
|
69
76
|
"optionalDependencies": {
|
|
70
|
-
"@oxfmt/binding-darwin-arm64": "0.
|
|
71
|
-
"@oxfmt/binding-android-arm64": "0.
|
|
72
|
-
"@oxfmt/binding-win32-arm64-msvc": "0.
|
|
73
|
-
"@oxfmt/binding-linux-arm64-gnu": "0.
|
|
74
|
-
"@oxfmt/binding-linux-arm64-musl": "0.
|
|
75
|
-
"@oxfmt/binding-openharmony-arm64": "0.
|
|
76
|
-
"@oxfmt/binding-android-arm-eabi": "0.
|
|
77
|
-
"@oxfmt/binding-linux-arm-gnueabihf": "0.
|
|
78
|
-
"@oxfmt/binding-linux-arm-musleabihf": "0.
|
|
79
|
-
"@oxfmt/binding-win32-ia32-msvc": "0.
|
|
80
|
-
"@oxfmt/binding-linux-ppc64-gnu": "0.
|
|
81
|
-
"@oxfmt/binding-linux-riscv64-gnu": "0.
|
|
82
|
-
"@oxfmt/binding-linux-riscv64-musl": "0.
|
|
83
|
-
"@oxfmt/binding-linux-s390x-gnu": "0.
|
|
84
|
-
"@oxfmt/binding-darwin-x64": "0.
|
|
85
|
-
"@oxfmt/binding-win32-x64-msvc": "0.
|
|
86
|
-
"@oxfmt/binding-freebsd-x64": "0.
|
|
87
|
-
"@oxfmt/binding-linux-x64-gnu": "0.
|
|
88
|
-
"@oxfmt/binding-linux-x64-musl": "0.
|
|
77
|
+
"@oxfmt/binding-darwin-arm64": "0.44.0",
|
|
78
|
+
"@oxfmt/binding-android-arm64": "0.44.0",
|
|
79
|
+
"@oxfmt/binding-win32-arm64-msvc": "0.44.0",
|
|
80
|
+
"@oxfmt/binding-linux-arm64-gnu": "0.44.0",
|
|
81
|
+
"@oxfmt/binding-linux-arm64-musl": "0.44.0",
|
|
82
|
+
"@oxfmt/binding-openharmony-arm64": "0.44.0",
|
|
83
|
+
"@oxfmt/binding-android-arm-eabi": "0.44.0",
|
|
84
|
+
"@oxfmt/binding-linux-arm-gnueabihf": "0.44.0",
|
|
85
|
+
"@oxfmt/binding-linux-arm-musleabihf": "0.44.0",
|
|
86
|
+
"@oxfmt/binding-win32-ia32-msvc": "0.44.0",
|
|
87
|
+
"@oxfmt/binding-linux-ppc64-gnu": "0.44.0",
|
|
88
|
+
"@oxfmt/binding-linux-riscv64-gnu": "0.44.0",
|
|
89
|
+
"@oxfmt/binding-linux-riscv64-musl": "0.44.0",
|
|
90
|
+
"@oxfmt/binding-linux-s390x-gnu": "0.44.0",
|
|
91
|
+
"@oxfmt/binding-darwin-x64": "0.44.0",
|
|
92
|
+
"@oxfmt/binding-win32-x64-msvc": "0.44.0",
|
|
93
|
+
"@oxfmt/binding-freebsd-x64": "0.44.0",
|
|
94
|
+
"@oxfmt/binding-linux-x64-gnu": "0.44.0",
|
|
95
|
+
"@oxfmt/binding-linux-x64-musl": "0.44.0"
|
|
89
96
|
}
|
|
90
97
|
}
|