oxfmt 0.34.0 → 0.35.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 +73 -73
- package/dist/{apis-Ddb0m55g.js → apis-KSwODFyo.js} +2 -2
- package/dist/{bindings-DTOgpISZ.js → bindings-Bg9JnrLc.js} +26 -26
- package/dist/cli-worker.js +1 -1
- package/dist/cli.js +13 -4
- package/dist/index.d.ts +17 -10
- package/dist/index.js +2 -2
- package/dist/{migrate-prettier-CPi8N90o.js → migrate-prettier-CMmmGHbr.js} +7 -7
- package/dist/{prettier-plugin-oxfmt-CI1pYfTP.js → prettier-plugin-oxfmt-B4H9aKXO.js} +2 -2
- package/package.json +20 -20
|
@@ -56,42 +56,6 @@
|
|
|
56
56
|
],
|
|
57
57
|
"markdownDescription": "Which end of line characters to apply.\n\nNOTE: `\"auto\"` is not supported.\n\n- Default: `\"lf\"`\n- Overrides `.editorconfig.end_of_line`"
|
|
58
58
|
},
|
|
59
|
-
"experimentalSortImports": {
|
|
60
|
-
"description": "Experimental: Sort import statements.\n\nUsing the similar algorithm as [eslint-plugin-perfectionist/sort-imports](https://perfectionist.dev/rules/sort-imports).\nFor details, see each field's documentation.\n\n- Default: Disabled",
|
|
61
|
-
"anyOf": [
|
|
62
|
-
{
|
|
63
|
-
"$ref": "#/definitions/SortImportsConfig"
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
"type": "null"
|
|
67
|
-
}
|
|
68
|
-
],
|
|
69
|
-
"markdownDescription": "Experimental: Sort import statements.\n\nUsing the similar algorithm as [eslint-plugin-perfectionist/sort-imports](https://perfectionist.dev/rules/sort-imports).\nFor details, see each field's documentation.\n\n- Default: Disabled"
|
|
70
|
-
},
|
|
71
|
-
"experimentalSortPackageJson": {
|
|
72
|
-
"description": "Experimental: Sort `package.json` keys.\n\nThe algorithm is NOT compatible with [prettier-plugin-sort-packagejson](https://github.com/matzkoh/prettier-plugin-packagejson).\nBut we believe it is clearer and easier to navigate.\nFor details, see each field's documentation.\n\n- Default: `true`",
|
|
73
|
-
"anyOf": [
|
|
74
|
-
{
|
|
75
|
-
"$ref": "#/definitions/SortPackageJsonUserConfig"
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
"type": "null"
|
|
79
|
-
}
|
|
80
|
-
],
|
|
81
|
-
"markdownDescription": "Experimental: Sort `package.json` keys.\n\nThe algorithm is NOT compatible with [prettier-plugin-sort-packagejson](https://github.com/matzkoh/prettier-plugin-packagejson).\nBut we believe it is clearer and easier to navigate.\nFor details, see each field's documentation.\n\n- Default: `true`"
|
|
82
|
-
},
|
|
83
|
-
"experimentalTailwindcss": {
|
|
84
|
-
"description": "Experimental: 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\n- Default: Disabled",
|
|
85
|
-
"anyOf": [
|
|
86
|
-
{
|
|
87
|
-
"$ref": "#/definitions/TailwindcssConfig"
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
"type": "null"
|
|
91
|
-
}
|
|
92
|
-
],
|
|
93
|
-
"markdownDescription": "Experimental: 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\n- Default: Disabled"
|
|
94
|
-
},
|
|
95
59
|
"htmlWhitespaceSensitivity": {
|
|
96
60
|
"description": "Specify the global whitespace sensitivity for HTML, Vue, Angular, and Handlebars.\n\n- Default: `\"css\"`",
|
|
97
61
|
"anyOf": [
|
|
@@ -212,6 +176,42 @@
|
|
|
212
176
|
],
|
|
213
177
|
"markdownDescription": "Use single quotes instead of double quotes.\n\nFor JSX, you can set the `jsxSingleQuote` option.\n\n- Default: `false`"
|
|
214
178
|
},
|
|
179
|
+
"sortImports": {
|
|
180
|
+
"description": "Sort import statements.\n\nUsing the similar algorithm as [eslint-plugin-perfectionist/sort-imports](https://perfectionist.dev/rules/sort-imports).\nFor details, see each field's documentation.\n\n- Default: Disabled",
|
|
181
|
+
"anyOf": [
|
|
182
|
+
{
|
|
183
|
+
"$ref": "#/definitions/SortImportsConfig"
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"type": "null"
|
|
187
|
+
}
|
|
188
|
+
],
|
|
189
|
+
"markdownDescription": "Sort import statements.\n\nUsing the similar algorithm as [eslint-plugin-perfectionist/sort-imports](https://perfectionist.dev/rules/sort-imports).\nFor details, see each field's documentation.\n\n- Default: Disabled"
|
|
190
|
+
},
|
|
191
|
+
"sortPackageJson": {
|
|
192
|
+
"description": "Sort `package.json` keys.\n\nThe algorithm is NOT compatible with [prettier-plugin-sort-packagejson](https://github.com/matzkoh/prettier-plugin-packagejson).\nBut we believe it is clearer and easier to navigate.\nFor details, see each field's documentation.\n\n- Default: `true`",
|
|
193
|
+
"anyOf": [
|
|
194
|
+
{
|
|
195
|
+
"$ref": "#/definitions/SortPackageJsonUserConfig"
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"type": "null"
|
|
199
|
+
}
|
|
200
|
+
],
|
|
201
|
+
"markdownDescription": "Sort `package.json` keys.\n\nThe algorithm is NOT compatible with [prettier-plugin-sort-packagejson](https://github.com/matzkoh/prettier-plugin-packagejson).\nBut we believe it is clearer and easier to navigate.\nFor details, see each field's documentation.\n\n- Default: `true`"
|
|
202
|
+
},
|
|
203
|
+
"sortTailwindcss": {
|
|
204
|
+
"description": "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\n- Default: Disabled",
|
|
205
|
+
"anyOf": [
|
|
206
|
+
{
|
|
207
|
+
"$ref": "#/definitions/SortTailwindcssConfig"
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"type": "null"
|
|
211
|
+
}
|
|
212
|
+
],
|
|
213
|
+
"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\n- Default: Disabled"
|
|
214
|
+
},
|
|
215
215
|
"tabWidth": {
|
|
216
216
|
"description": "Specify the number of spaces per indentation-level.\n\n- Default: `2`\n- Overrides `.editorconfig.indent_size`",
|
|
217
217
|
"type": [
|
|
@@ -370,42 +370,6 @@
|
|
|
370
370
|
],
|
|
371
371
|
"markdownDescription": "Which end of line characters to apply.\n\nNOTE: `\"auto\"` is not supported.\n\n- Default: `\"lf\"`\n- Overrides `.editorconfig.end_of_line`"
|
|
372
372
|
},
|
|
373
|
-
"experimentalSortImports": {
|
|
374
|
-
"description": "Experimental: Sort import statements.\n\nUsing the similar algorithm as [eslint-plugin-perfectionist/sort-imports](https://perfectionist.dev/rules/sort-imports).\nFor details, see each field's documentation.\n\n- Default: Disabled",
|
|
375
|
-
"anyOf": [
|
|
376
|
-
{
|
|
377
|
-
"$ref": "#/definitions/SortImportsConfig"
|
|
378
|
-
},
|
|
379
|
-
{
|
|
380
|
-
"type": "null"
|
|
381
|
-
}
|
|
382
|
-
],
|
|
383
|
-
"markdownDescription": "Experimental: Sort import statements.\n\nUsing the similar algorithm as [eslint-plugin-perfectionist/sort-imports](https://perfectionist.dev/rules/sort-imports).\nFor details, see each field's documentation.\n\n- Default: Disabled"
|
|
384
|
-
},
|
|
385
|
-
"experimentalSortPackageJson": {
|
|
386
|
-
"description": "Experimental: Sort `package.json` keys.\n\nThe algorithm is NOT compatible with [prettier-plugin-sort-packagejson](https://github.com/matzkoh/prettier-plugin-packagejson).\nBut we believe it is clearer and easier to navigate.\nFor details, see each field's documentation.\n\n- Default: `true`",
|
|
387
|
-
"anyOf": [
|
|
388
|
-
{
|
|
389
|
-
"$ref": "#/definitions/SortPackageJsonUserConfig"
|
|
390
|
-
},
|
|
391
|
-
{
|
|
392
|
-
"type": "null"
|
|
393
|
-
}
|
|
394
|
-
],
|
|
395
|
-
"markdownDescription": "Experimental: Sort `package.json` keys.\n\nThe algorithm is NOT compatible with [prettier-plugin-sort-packagejson](https://github.com/matzkoh/prettier-plugin-packagejson).\nBut we believe it is clearer and easier to navigate.\nFor details, see each field's documentation.\n\n- Default: `true`"
|
|
396
|
-
},
|
|
397
|
-
"experimentalTailwindcss": {
|
|
398
|
-
"description": "Experimental: 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\n- Default: Disabled",
|
|
399
|
-
"anyOf": [
|
|
400
|
-
{
|
|
401
|
-
"$ref": "#/definitions/TailwindcssConfig"
|
|
402
|
-
},
|
|
403
|
-
{
|
|
404
|
-
"type": "null"
|
|
405
|
-
}
|
|
406
|
-
],
|
|
407
|
-
"markdownDescription": "Experimental: 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\n- Default: Disabled"
|
|
408
|
-
},
|
|
409
373
|
"htmlWhitespaceSensitivity": {
|
|
410
374
|
"description": "Specify the global whitespace sensitivity for HTML, Vue, Angular, and Handlebars.\n\n- Default: `\"css\"`",
|
|
411
375
|
"anyOf": [
|
|
@@ -504,6 +468,42 @@
|
|
|
504
468
|
],
|
|
505
469
|
"markdownDescription": "Use single quotes instead of double quotes.\n\nFor JSX, you can set the `jsxSingleQuote` option.\n\n- Default: `false`"
|
|
506
470
|
},
|
|
471
|
+
"sortImports": {
|
|
472
|
+
"description": "Sort import statements.\n\nUsing the similar algorithm as [eslint-plugin-perfectionist/sort-imports](https://perfectionist.dev/rules/sort-imports).\nFor details, see each field's documentation.\n\n- Default: Disabled",
|
|
473
|
+
"anyOf": [
|
|
474
|
+
{
|
|
475
|
+
"$ref": "#/definitions/SortImportsConfig"
|
|
476
|
+
},
|
|
477
|
+
{
|
|
478
|
+
"type": "null"
|
|
479
|
+
}
|
|
480
|
+
],
|
|
481
|
+
"markdownDescription": "Sort import statements.\n\nUsing the similar algorithm as [eslint-plugin-perfectionist/sort-imports](https://perfectionist.dev/rules/sort-imports).\nFor details, see each field's documentation.\n\n- Default: Disabled"
|
|
482
|
+
},
|
|
483
|
+
"sortPackageJson": {
|
|
484
|
+
"description": "Sort `package.json` keys.\n\nThe algorithm is NOT compatible with [prettier-plugin-sort-packagejson](https://github.com/matzkoh/prettier-plugin-packagejson).\nBut we believe it is clearer and easier to navigate.\nFor details, see each field's documentation.\n\n- Default: `true`",
|
|
485
|
+
"anyOf": [
|
|
486
|
+
{
|
|
487
|
+
"$ref": "#/definitions/SortPackageJsonUserConfig"
|
|
488
|
+
},
|
|
489
|
+
{
|
|
490
|
+
"type": "null"
|
|
491
|
+
}
|
|
492
|
+
],
|
|
493
|
+
"markdownDescription": "Sort `package.json` keys.\n\nThe algorithm is NOT compatible with [prettier-plugin-sort-packagejson](https://github.com/matzkoh/prettier-plugin-packagejson).\nBut we believe it is clearer and easier to navigate.\nFor details, see each field's documentation.\n\n- Default: `true`"
|
|
494
|
+
},
|
|
495
|
+
"sortTailwindcss": {
|
|
496
|
+
"description": "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\n- Default: Disabled",
|
|
497
|
+
"anyOf": [
|
|
498
|
+
{
|
|
499
|
+
"$ref": "#/definitions/SortTailwindcssConfig"
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
"type": "null"
|
|
503
|
+
}
|
|
504
|
+
],
|
|
505
|
+
"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\n- Default: Disabled"
|
|
506
|
+
},
|
|
507
507
|
"tabWidth": {
|
|
508
508
|
"description": "Specify the number of spaces per indentation-level.\n\n- Default: `2`\n- Overrides `.editorconfig.indent_size`",
|
|
509
509
|
"type": [
|
|
@@ -771,7 +771,7 @@
|
|
|
771
771
|
}
|
|
772
772
|
]
|
|
773
773
|
},
|
|
774
|
-
"
|
|
774
|
+
"SortTailwindcssConfig": {
|
|
775
775
|
"type": "object",
|
|
776
776
|
"properties": {
|
|
777
777
|
"attributes": {
|
|
@@ -49,7 +49,7 @@ async function loadTailwindPlugin() {
|
|
|
49
49
|
* Load Tailwind CSS plugin lazily when `options._useTailwindPlugin` flag is set.
|
|
50
50
|
* The flag is added by Rust side only for relevant parsers.
|
|
51
51
|
*
|
|
52
|
-
* Option mapping (
|
|
52
|
+
* Option mapping (sortTailwindcss.xxx → tailwindXxx) is also done in Rust side.
|
|
53
53
|
*/
|
|
54
54
|
async function setupTailwindPlugin(options) {
|
|
55
55
|
if ("_useTailwindPlugin" in options === false) return;
|
|
@@ -75,7 +75,7 @@ async function sortTailwindClasses({ classes, options }) {
|
|
|
75
75
|
let oxfmtPluginCache;
|
|
76
76
|
async function loadOxfmtPlugin() {
|
|
77
77
|
if (oxfmtPluginCache) return oxfmtPluginCache;
|
|
78
|
-
oxfmtPluginCache = await import("./prettier-plugin-oxfmt-
|
|
78
|
+
oxfmtPluginCache = await import("./prettier-plugin-oxfmt-B4H9aKXO.js");
|
|
79
79
|
return oxfmtPluginCache;
|
|
80
80
|
}
|
|
81
81
|
/**
|
|
@@ -58,7 +58,7 @@ function requireNative() {
|
|
|
58
58
|
try {
|
|
59
59
|
const binding = require("@oxfmt/binding-android-arm64");
|
|
60
60
|
const bindingPackageVersion = require("@oxfmt/binding-android-arm64/package.json").version;
|
|
61
|
-
if (bindingPackageVersion !== "0.
|
|
61
|
+
if (bindingPackageVersion !== "0.35.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.35.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
62
62
|
return binding;
|
|
63
63
|
} catch (e) {
|
|
64
64
|
loadErrors.push(e);
|
|
@@ -72,7 +72,7 @@ function requireNative() {
|
|
|
72
72
|
try {
|
|
73
73
|
const binding = require("@oxfmt/binding-android-arm-eabi");
|
|
74
74
|
const bindingPackageVersion = require("@oxfmt/binding-android-arm-eabi/package.json").version;
|
|
75
|
-
if (bindingPackageVersion !== "0.
|
|
75
|
+
if (bindingPackageVersion !== "0.35.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.35.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
76
76
|
return binding;
|
|
77
77
|
} catch (e) {
|
|
78
78
|
loadErrors.push(e);
|
|
@@ -87,7 +87,7 @@ function requireNative() {
|
|
|
87
87
|
try {
|
|
88
88
|
const binding = require("@oxfmt/binding-win32-x64-gnu");
|
|
89
89
|
const bindingPackageVersion = require("@oxfmt/binding-win32-x64-gnu/package.json").version;
|
|
90
|
-
if (bindingPackageVersion !== "0.
|
|
90
|
+
if (bindingPackageVersion !== "0.35.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.35.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
91
91
|
return binding;
|
|
92
92
|
} catch (e) {
|
|
93
93
|
loadErrors.push(e);
|
|
@@ -101,7 +101,7 @@ function requireNative() {
|
|
|
101
101
|
try {
|
|
102
102
|
const binding = require("@oxfmt/binding-win32-x64-msvc");
|
|
103
103
|
const bindingPackageVersion = require("@oxfmt/binding-win32-x64-msvc/package.json").version;
|
|
104
|
-
if (bindingPackageVersion !== "0.
|
|
104
|
+
if (bindingPackageVersion !== "0.35.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.35.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
105
105
|
return binding;
|
|
106
106
|
} catch (e) {
|
|
107
107
|
loadErrors.push(e);
|
|
@@ -116,7 +116,7 @@ function requireNative() {
|
|
|
116
116
|
try {
|
|
117
117
|
const binding = require("@oxfmt/binding-win32-ia32-msvc");
|
|
118
118
|
const bindingPackageVersion = require("@oxfmt/binding-win32-ia32-msvc/package.json").version;
|
|
119
|
-
if (bindingPackageVersion !== "0.
|
|
119
|
+
if (bindingPackageVersion !== "0.35.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.35.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
120
120
|
return binding;
|
|
121
121
|
} catch (e) {
|
|
122
122
|
loadErrors.push(e);
|
|
@@ -130,7 +130,7 @@ function requireNative() {
|
|
|
130
130
|
try {
|
|
131
131
|
const binding = require("@oxfmt/binding-win32-arm64-msvc");
|
|
132
132
|
const bindingPackageVersion = require("@oxfmt/binding-win32-arm64-msvc/package.json").version;
|
|
133
|
-
if (bindingPackageVersion !== "0.
|
|
133
|
+
if (bindingPackageVersion !== "0.35.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.35.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
134
134
|
return binding;
|
|
135
135
|
} catch (e) {
|
|
136
136
|
loadErrors.push(e);
|
|
@@ -145,7 +145,7 @@ function requireNative() {
|
|
|
145
145
|
try {
|
|
146
146
|
const binding = require("@oxfmt/binding-darwin-universal");
|
|
147
147
|
const bindingPackageVersion = require("@oxfmt/binding-darwin-universal/package.json").version;
|
|
148
|
-
if (bindingPackageVersion !== "0.
|
|
148
|
+
if (bindingPackageVersion !== "0.35.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.35.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
149
149
|
return binding;
|
|
150
150
|
} catch (e) {
|
|
151
151
|
loadErrors.push(e);
|
|
@@ -159,7 +159,7 @@ function requireNative() {
|
|
|
159
159
|
try {
|
|
160
160
|
const binding = require("@oxfmt/binding-darwin-x64");
|
|
161
161
|
const bindingPackageVersion = require("@oxfmt/binding-darwin-x64/package.json").version;
|
|
162
|
-
if (bindingPackageVersion !== "0.
|
|
162
|
+
if (bindingPackageVersion !== "0.35.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.35.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
163
163
|
return binding;
|
|
164
164
|
} catch (e) {
|
|
165
165
|
loadErrors.push(e);
|
|
@@ -173,7 +173,7 @@ function requireNative() {
|
|
|
173
173
|
try {
|
|
174
174
|
const binding = require("@oxfmt/binding-darwin-arm64");
|
|
175
175
|
const bindingPackageVersion = require("@oxfmt/binding-darwin-arm64/package.json").version;
|
|
176
|
-
if (bindingPackageVersion !== "0.
|
|
176
|
+
if (bindingPackageVersion !== "0.35.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.35.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
177
177
|
return binding;
|
|
178
178
|
} catch (e) {
|
|
179
179
|
loadErrors.push(e);
|
|
@@ -188,7 +188,7 @@ function requireNative() {
|
|
|
188
188
|
try {
|
|
189
189
|
const binding = require("@oxfmt/binding-freebsd-x64");
|
|
190
190
|
const bindingPackageVersion = require("@oxfmt/binding-freebsd-x64/package.json").version;
|
|
191
|
-
if (bindingPackageVersion !== "0.
|
|
191
|
+
if (bindingPackageVersion !== "0.35.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.35.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
192
192
|
return binding;
|
|
193
193
|
} catch (e) {
|
|
194
194
|
loadErrors.push(e);
|
|
@@ -202,7 +202,7 @@ function requireNative() {
|
|
|
202
202
|
try {
|
|
203
203
|
const binding = require("@oxfmt/binding-freebsd-arm64");
|
|
204
204
|
const bindingPackageVersion = require("@oxfmt/binding-freebsd-arm64/package.json").version;
|
|
205
|
-
if (bindingPackageVersion !== "0.
|
|
205
|
+
if (bindingPackageVersion !== "0.35.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.35.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
206
206
|
return binding;
|
|
207
207
|
} catch (e) {
|
|
208
208
|
loadErrors.push(e);
|
|
@@ -217,7 +217,7 @@ function requireNative() {
|
|
|
217
217
|
try {
|
|
218
218
|
const binding = require("@oxfmt/binding-linux-x64-musl");
|
|
219
219
|
const bindingPackageVersion = require("@oxfmt/binding-linux-x64-musl/package.json").version;
|
|
220
|
-
if (bindingPackageVersion !== "0.
|
|
220
|
+
if (bindingPackageVersion !== "0.35.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.35.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
221
221
|
return binding;
|
|
222
222
|
} catch (e) {
|
|
223
223
|
loadErrors.push(e);
|
|
@@ -231,7 +231,7 @@ function requireNative() {
|
|
|
231
231
|
try {
|
|
232
232
|
const binding = require("@oxfmt/binding-linux-x64-gnu");
|
|
233
233
|
const bindingPackageVersion = require("@oxfmt/binding-linux-x64-gnu/package.json").version;
|
|
234
|
-
if (bindingPackageVersion !== "0.
|
|
234
|
+
if (bindingPackageVersion !== "0.35.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.35.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
235
235
|
return binding;
|
|
236
236
|
} catch (e) {
|
|
237
237
|
loadErrors.push(e);
|
|
@@ -246,7 +246,7 @@ function requireNative() {
|
|
|
246
246
|
try {
|
|
247
247
|
const binding = require("@oxfmt/binding-linux-arm64-musl");
|
|
248
248
|
const bindingPackageVersion = require("@oxfmt/binding-linux-arm64-musl/package.json").version;
|
|
249
|
-
if (bindingPackageVersion !== "0.
|
|
249
|
+
if (bindingPackageVersion !== "0.35.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.35.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
250
250
|
return binding;
|
|
251
251
|
} catch (e) {
|
|
252
252
|
loadErrors.push(e);
|
|
@@ -260,7 +260,7 @@ function requireNative() {
|
|
|
260
260
|
try {
|
|
261
261
|
const binding = require("@oxfmt/binding-linux-arm64-gnu");
|
|
262
262
|
const bindingPackageVersion = require("@oxfmt/binding-linux-arm64-gnu/package.json").version;
|
|
263
|
-
if (bindingPackageVersion !== "0.
|
|
263
|
+
if (bindingPackageVersion !== "0.35.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.35.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
264
264
|
return binding;
|
|
265
265
|
} catch (e) {
|
|
266
266
|
loadErrors.push(e);
|
|
@@ -275,7 +275,7 @@ function requireNative() {
|
|
|
275
275
|
try {
|
|
276
276
|
const binding = require("@oxfmt/binding-linux-arm-musleabihf");
|
|
277
277
|
const bindingPackageVersion = require("@oxfmt/binding-linux-arm-musleabihf/package.json").version;
|
|
278
|
-
if (bindingPackageVersion !== "0.
|
|
278
|
+
if (bindingPackageVersion !== "0.35.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.35.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
279
279
|
return binding;
|
|
280
280
|
} catch (e) {
|
|
281
281
|
loadErrors.push(e);
|
|
@@ -289,7 +289,7 @@ function requireNative() {
|
|
|
289
289
|
try {
|
|
290
290
|
const binding = require("@oxfmt/binding-linux-arm-gnueabihf");
|
|
291
291
|
const bindingPackageVersion = require("@oxfmt/binding-linux-arm-gnueabihf/package.json").version;
|
|
292
|
-
if (bindingPackageVersion !== "0.
|
|
292
|
+
if (bindingPackageVersion !== "0.35.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.35.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
293
293
|
return binding;
|
|
294
294
|
} catch (e) {
|
|
295
295
|
loadErrors.push(e);
|
|
@@ -304,7 +304,7 @@ function requireNative() {
|
|
|
304
304
|
try {
|
|
305
305
|
const binding = require("@oxfmt/binding-linux-loong64-musl");
|
|
306
306
|
const bindingPackageVersion = require("@oxfmt/binding-linux-loong64-musl/package.json").version;
|
|
307
|
-
if (bindingPackageVersion !== "0.
|
|
307
|
+
if (bindingPackageVersion !== "0.35.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.35.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
308
308
|
return binding;
|
|
309
309
|
} catch (e) {
|
|
310
310
|
loadErrors.push(e);
|
|
@@ -318,7 +318,7 @@ function requireNative() {
|
|
|
318
318
|
try {
|
|
319
319
|
const binding = require("@oxfmt/binding-linux-loong64-gnu");
|
|
320
320
|
const bindingPackageVersion = require("@oxfmt/binding-linux-loong64-gnu/package.json").version;
|
|
321
|
-
if (bindingPackageVersion !== "0.
|
|
321
|
+
if (bindingPackageVersion !== "0.35.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.35.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
322
322
|
return binding;
|
|
323
323
|
} catch (e) {
|
|
324
324
|
loadErrors.push(e);
|
|
@@ -333,7 +333,7 @@ function requireNative() {
|
|
|
333
333
|
try {
|
|
334
334
|
const binding = require("@oxfmt/binding-linux-riscv64-musl");
|
|
335
335
|
const bindingPackageVersion = require("@oxfmt/binding-linux-riscv64-musl/package.json").version;
|
|
336
|
-
if (bindingPackageVersion !== "0.
|
|
336
|
+
if (bindingPackageVersion !== "0.35.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.35.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
337
337
|
return binding;
|
|
338
338
|
} catch (e) {
|
|
339
339
|
loadErrors.push(e);
|
|
@@ -347,7 +347,7 @@ function requireNative() {
|
|
|
347
347
|
try {
|
|
348
348
|
const binding = require("@oxfmt/binding-linux-riscv64-gnu");
|
|
349
349
|
const bindingPackageVersion = require("@oxfmt/binding-linux-riscv64-gnu/package.json").version;
|
|
350
|
-
if (bindingPackageVersion !== "0.
|
|
350
|
+
if (bindingPackageVersion !== "0.35.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.35.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
351
351
|
return binding;
|
|
352
352
|
} catch (e) {
|
|
353
353
|
loadErrors.push(e);
|
|
@@ -362,7 +362,7 @@ function requireNative() {
|
|
|
362
362
|
try {
|
|
363
363
|
const binding = require("@oxfmt/binding-linux-ppc64-gnu");
|
|
364
364
|
const bindingPackageVersion = require("@oxfmt/binding-linux-ppc64-gnu/package.json").version;
|
|
365
|
-
if (bindingPackageVersion !== "0.
|
|
365
|
+
if (bindingPackageVersion !== "0.35.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.35.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
366
366
|
return binding;
|
|
367
367
|
} catch (e) {
|
|
368
368
|
loadErrors.push(e);
|
|
@@ -376,7 +376,7 @@ function requireNative() {
|
|
|
376
376
|
try {
|
|
377
377
|
const binding = require("@oxfmt/binding-linux-s390x-gnu");
|
|
378
378
|
const bindingPackageVersion = require("@oxfmt/binding-linux-s390x-gnu/package.json").version;
|
|
379
|
-
if (bindingPackageVersion !== "0.
|
|
379
|
+
if (bindingPackageVersion !== "0.35.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.35.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
380
380
|
return binding;
|
|
381
381
|
} catch (e) {
|
|
382
382
|
loadErrors.push(e);
|
|
@@ -391,7 +391,7 @@ function requireNative() {
|
|
|
391
391
|
try {
|
|
392
392
|
const binding = require("@oxfmt/binding-openharmony-arm64");
|
|
393
393
|
const bindingPackageVersion = require("@oxfmt/binding-openharmony-arm64/package.json").version;
|
|
394
|
-
if (bindingPackageVersion !== "0.
|
|
394
|
+
if (bindingPackageVersion !== "0.35.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.35.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
395
395
|
return binding;
|
|
396
396
|
} catch (e) {
|
|
397
397
|
loadErrors.push(e);
|
|
@@ -405,7 +405,7 @@ function requireNative() {
|
|
|
405
405
|
try {
|
|
406
406
|
const binding = require("@oxfmt/binding-openharmony-x64");
|
|
407
407
|
const bindingPackageVersion = require("@oxfmt/binding-openharmony-x64/package.json").version;
|
|
408
|
-
if (bindingPackageVersion !== "0.
|
|
408
|
+
if (bindingPackageVersion !== "0.35.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.35.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
409
409
|
return binding;
|
|
410
410
|
} catch (e) {
|
|
411
411
|
loadErrors.push(e);
|
|
@@ -419,7 +419,7 @@ function requireNative() {
|
|
|
419
419
|
try {
|
|
420
420
|
const binding = require("@oxfmt/binding-openharmony-arm");
|
|
421
421
|
const bindingPackageVersion = require("@oxfmt/binding-openharmony-arm/package.json").version;
|
|
422
|
-
if (bindingPackageVersion !== "0.
|
|
422
|
+
if (bindingPackageVersion !== "0.35.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.35.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
423
423
|
return binding;
|
|
424
424
|
} catch (e) {
|
|
425
425
|
loadErrors.push(e);
|
package/dist/cli-worker.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { i as sortTailwindClasses, n as formatFile, t as formatEmbeddedCode } from "./apis-
|
|
1
|
+
import { i as sortTailwindClasses, n as formatFile, t as formatEmbeddedCode } from "./apis-KSwODFyo.js";
|
|
2
2
|
|
|
3
3
|
export { formatEmbeddedCode, formatFile, sortTailwindClasses };
|
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as runCli } from "./bindings-
|
|
2
|
-
import { r as resolvePlugins } from "./apis-
|
|
1
|
+
import { r as runCli } from "./bindings-Bg9JnrLc.js";
|
|
2
|
+
import { r as resolvePlugins } from "./apis-KSwODFyo.js";
|
|
3
3
|
import Tinypool from "tinypool";
|
|
4
4
|
|
|
5
5
|
//#region src-js/cli/worker-proxy.ts
|
|
@@ -28,7 +28,16 @@ async function formatFile(options, code) {
|
|
|
28
28
|
return pool.run({
|
|
29
29
|
options,
|
|
30
30
|
code
|
|
31
|
-
}, { name: "formatFile" })
|
|
31
|
+
}, { name: "formatFile" }).catch((err) => {
|
|
32
|
+
if (err instanceof Error) throw err;
|
|
33
|
+
if (err !== null && typeof err === "object") {
|
|
34
|
+
const obj = err;
|
|
35
|
+
const newErr = new Error(obj.message);
|
|
36
|
+
newErr.name = obj.name;
|
|
37
|
+
throw newErr;
|
|
38
|
+
}
|
|
39
|
+
throw new Error(String(err));
|
|
40
|
+
});
|
|
32
41
|
}
|
|
33
42
|
async function sortTailwindClasses(options, classes) {
|
|
34
43
|
return pool.run({
|
|
@@ -48,7 +57,7 @@ async function sortTailwindClasses(options, classes) {
|
|
|
48
57
|
return;
|
|
49
58
|
}
|
|
50
59
|
if (mode === "migrate:prettier") {
|
|
51
|
-
await import("./migrate-prettier-
|
|
60
|
+
await import("./migrate-prettier-CMmmGHbr.js").then((m) => m.runMigratePrettier());
|
|
52
61
|
return;
|
|
53
62
|
}
|
|
54
63
|
if (mode === "migrate:biome") {
|
package/dist/index.d.ts
CHANGED
|
@@ -46,14 +46,13 @@ declare function jsTextToDoc(fileName: string, sourceText: string, oxfmtPluginOp
|
|
|
46
46
|
type FormatOptions = Pick<Options, "useTabs" | "tabWidth" | "singleQuote" | "jsxSingleQuote" | "quoteProps" | "trailingComma" | "semi" | "arrowParens" | "bracketSpacing" | "bracketSameLine" | "objectWrap" | "singleAttributePerLine" | "embeddedLanguageFormatting" | "proseWrap" | "htmlWhitespaceSensitivity" | "vueIndentScriptAndStyle"> & {
|
|
47
47
|
/** Which end of line characters to apply. (Default: `"lf"`) */endOfLine?: "lf" | "crlf" | "cr"; /** The line length that the printer will wrap on. (Default: `100`) */
|
|
48
48
|
printWidth?: number; /** Whether to insert a final newline at the end of the file. (Default: `true`) */
|
|
49
|
-
insertFinalNewline?: boolean; /**
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
experimentalTailwindcss?: TailwindcssOptions;
|
|
49
|
+
insertFinalNewline?: boolean; /** Sort import statements. Disabled by default. */
|
|
50
|
+
sortImports?: SortImportsOptions; /** @deprecated Use `sortImports` instead. */
|
|
51
|
+
experimentalSortImports?: SortImportsOptions; /** Sort `package.json` keys. (Default: `true`) */
|
|
52
|
+
sortPackageJson?: boolean | SortPackageJsonOptions; /** @deprecated Use `sortPackageJson` instead. */
|
|
53
|
+
experimentalSortPackageJson?: boolean | SortPackageJsonOptions; /** Enable Tailwind CSS class sorting. (Default: disabled) */
|
|
54
|
+
sortTailwindcss?: SortTailwindcssOptions; /** @deprecated Use `sortTailwindcss` instead. */
|
|
55
|
+
experimentalTailwindcss?: SortTailwindcssOptions;
|
|
57
56
|
} & Record<string, unknown>;
|
|
58
57
|
/**
|
|
59
58
|
* Configuration options for sort imports.
|
|
@@ -82,11 +81,17 @@ type SortImportsOptions = {
|
|
|
82
81
|
modifiers?: string[];
|
|
83
82
|
}[];
|
|
84
83
|
};
|
|
84
|
+
/**
|
|
85
|
+
* Configuration options for sort package.json.
|
|
86
|
+
*/
|
|
87
|
+
type SortPackageJsonOptions = {
|
|
88
|
+
/** Sort the `scripts` field alphabetically. (Default: `false`) */sortScripts?: boolean;
|
|
89
|
+
};
|
|
85
90
|
/**
|
|
86
91
|
* Configuration options for Tailwind CSS class sorting.
|
|
87
92
|
* See https://github.com/tailwindlabs/prettier-plugin-tailwindcss#options
|
|
88
93
|
*/
|
|
89
|
-
type
|
|
94
|
+
type SortTailwindcssOptions = {
|
|
90
95
|
/** Path to Tailwind config file (v3). e.g., `"./tailwind.config.js"` */config?: string; /** Path to Tailwind stylesheet (v4). e.g., `"./src/app.css"` */
|
|
91
96
|
stylesheet?: string;
|
|
92
97
|
/**
|
|
@@ -102,5 +107,7 @@ type TailwindcssOptions = {
|
|
|
102
107
|
preserveWhitespace?: boolean; /** Preserve duplicate classes. (Default: `false`) */
|
|
103
108
|
preserveDuplicates?: boolean;
|
|
104
109
|
};
|
|
110
|
+
/** @deprecated Use `SortTailwindcssOptions` instead. */
|
|
111
|
+
type TailwindcssOptions = SortTailwindcssOptions;
|
|
105
112
|
//#endregion
|
|
106
|
-
export { FormatOptions, SortImportsOptions, TailwindcssOptions, format, jsTextToDoc };
|
|
113
|
+
export { FormatOptions, SortImportsOptions, SortPackageJsonOptions, SortTailwindcssOptions, TailwindcssOptions, format, jsTextToDoc };
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as jsTextToDoc$1, t as format$1 } from "./bindings-
|
|
2
|
-
import { i as sortTailwindClasses, n as formatFile, r as resolvePlugins, t as formatEmbeddedCode } from "./apis-
|
|
1
|
+
import { n as jsTextToDoc$1, t as format$1 } from "./bindings-Bg9JnrLc.js";
|
|
2
|
+
import { i as sortTailwindClasses, n as formatFile, r as resolvePlugins, t as formatEmbeddedCode } from "./apis-KSwODFyo.js";
|
|
3
3
|
|
|
4
4
|
//#region src-js/index.ts
|
|
5
5
|
/**
|
|
@@ -57,9 +57,9 @@ async function runMigratePrettier() {
|
|
|
57
57
|
oxfmtrc.printWidth = 80;
|
|
58
58
|
}
|
|
59
59
|
if (hasSortPackageJsonPlugin) {
|
|
60
|
-
oxfmtrc.
|
|
61
|
-
console.error(` - Migrated "prettier-plugin-packagejson" to "
|
|
62
|
-
} else oxfmtrc.
|
|
60
|
+
oxfmtrc.sortPackageJson = {};
|
|
61
|
+
console.error(` - Migrated "prettier-plugin-packagejson" to "sortPackageJson"`);
|
|
62
|
+
} else oxfmtrc.sortPackageJson = false;
|
|
63
63
|
if (oxfmtrc.embeddedLanguageFormatting !== "off") console.error(` - "embeddedLanguageFormatting" in JS/TS files is not fully supported yet`);
|
|
64
64
|
const ignores = await resolvePrettierIgnore(cwd);
|
|
65
65
|
if (ignores.length > 0) console.log("Migrated ignore patterns from `.prettierignore`");
|
|
@@ -95,7 +95,7 @@ const TAILWIND_OPTION_MAPPING = {
|
|
|
95
95
|
preserveDuplicates: "tailwindPreserveDuplicates"
|
|
96
96
|
};
|
|
97
97
|
/**
|
|
98
|
-
* Migrate prettier-plugin-tailwindcss options to Oxfmt's
|
|
98
|
+
* Migrate prettier-plugin-tailwindcss options to Oxfmt's sortTailwindcss format.
|
|
99
99
|
*
|
|
100
100
|
* Prettier format:
|
|
101
101
|
* ```json
|
|
@@ -109,7 +109,7 @@ const TAILWIND_OPTION_MAPPING = {
|
|
|
109
109
|
* Oxfmt format:
|
|
110
110
|
* ```json
|
|
111
111
|
* {
|
|
112
|
-
* "
|
|
112
|
+
* "sortTailwindcss": {
|
|
113
113
|
* "config": "./tailwind.config.js",
|
|
114
114
|
* "functions": ["clsx", "cn"]
|
|
115
115
|
* }
|
|
@@ -130,8 +130,8 @@ function migrateTailwindOptions(prettierConfig, oxfmtrc) {
|
|
|
130
130
|
tailwindOptions[oxfmtKey] = value;
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
|
-
oxfmtrc.
|
|
134
|
-
console.log("Migrated prettier-plugin-tailwindcss options to
|
|
133
|
+
oxfmtrc.sortTailwindcss = tailwindOptions;
|
|
134
|
+
console.log("Migrated prettier-plugin-tailwindcss options to sortTailwindcss");
|
|
135
135
|
}
|
|
136
136
|
|
|
137
137
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oxfmt",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.35.0",
|
|
4
4
|
"description": "Formatter for the JavaScript Oxidation Compiler",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"formatter",
|
|
@@ -66,24 +66,24 @@
|
|
|
66
66
|
"node": "^20.19.0 || >=22.12.0"
|
|
67
67
|
},
|
|
68
68
|
"optionalDependencies": {
|
|
69
|
-
"@oxfmt/binding-darwin-arm64": "0.
|
|
70
|
-
"@oxfmt/binding-android-arm64": "0.
|
|
71
|
-
"@oxfmt/binding-win32-arm64-msvc": "0.
|
|
72
|
-
"@oxfmt/binding-linux-arm64-gnu": "0.
|
|
73
|
-
"@oxfmt/binding-linux-arm64-musl": "0.
|
|
74
|
-
"@oxfmt/binding-openharmony-arm64": "0.
|
|
75
|
-
"@oxfmt/binding-android-arm-eabi": "0.
|
|
76
|
-
"@oxfmt/binding-linux-arm-gnueabihf": "0.
|
|
77
|
-
"@oxfmt/binding-linux-arm-musleabihf": "0.
|
|
78
|
-
"@oxfmt/binding-win32-ia32-msvc": "0.
|
|
79
|
-
"@oxfmt/binding-linux-ppc64-gnu": "0.
|
|
80
|
-
"@oxfmt/binding-linux-riscv64-gnu": "0.
|
|
81
|
-
"@oxfmt/binding-linux-riscv64-musl": "0.
|
|
82
|
-
"@oxfmt/binding-linux-s390x-gnu": "0.
|
|
83
|
-
"@oxfmt/binding-darwin-x64": "0.
|
|
84
|
-
"@oxfmt/binding-win32-x64-msvc": "0.
|
|
85
|
-
"@oxfmt/binding-freebsd-x64": "0.
|
|
86
|
-
"@oxfmt/binding-linux-x64-gnu": "0.
|
|
87
|
-
"@oxfmt/binding-linux-x64-musl": "0.
|
|
69
|
+
"@oxfmt/binding-darwin-arm64": "0.35.0",
|
|
70
|
+
"@oxfmt/binding-android-arm64": "0.35.0",
|
|
71
|
+
"@oxfmt/binding-win32-arm64-msvc": "0.35.0",
|
|
72
|
+
"@oxfmt/binding-linux-arm64-gnu": "0.35.0",
|
|
73
|
+
"@oxfmt/binding-linux-arm64-musl": "0.35.0",
|
|
74
|
+
"@oxfmt/binding-openharmony-arm64": "0.35.0",
|
|
75
|
+
"@oxfmt/binding-android-arm-eabi": "0.35.0",
|
|
76
|
+
"@oxfmt/binding-linux-arm-gnueabihf": "0.35.0",
|
|
77
|
+
"@oxfmt/binding-linux-arm-musleabihf": "0.35.0",
|
|
78
|
+
"@oxfmt/binding-win32-ia32-msvc": "0.35.0",
|
|
79
|
+
"@oxfmt/binding-linux-ppc64-gnu": "0.35.0",
|
|
80
|
+
"@oxfmt/binding-linux-riscv64-gnu": "0.35.0",
|
|
81
|
+
"@oxfmt/binding-linux-riscv64-musl": "0.35.0",
|
|
82
|
+
"@oxfmt/binding-linux-s390x-gnu": "0.35.0",
|
|
83
|
+
"@oxfmt/binding-darwin-x64": "0.35.0",
|
|
84
|
+
"@oxfmt/binding-win32-x64-msvc": "0.35.0",
|
|
85
|
+
"@oxfmt/binding-freebsd-x64": "0.35.0",
|
|
86
|
+
"@oxfmt/binding-linux-x64-gnu": "0.35.0",
|
|
87
|
+
"@oxfmt/binding-linux-x64-musl": "0.35.0"
|
|
88
88
|
}
|
|
89
89
|
}
|