oxfmt 0.21.0 → 0.23.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 +75 -2
- package/dist/{bindings-CHrVnbuI.js → bindings-D1pGt4ma.js} +29 -28
- package/dist/cli-worker.d.ts +22 -2
- package/dist/cli-worker.js +2 -2
- package/dist/cli.js +12 -5
- package/dist/dist-BwrMNepk.js +143551 -0
- package/dist/index-Cy_w6Ejz.d.ts +133 -0
- package/dist/index.d.ts +2 -110
- package/dist/index.js +6 -2
- package/dist/{init-CJps11re.js → init-BQYL9OnU.js} +1 -1
- package/dist/{migrate-prettier-DstlbbnS.js → migrate-prettier-CcpDyeNG.js} +47 -4
- package/dist/{prettier-BdNnao6Z.js → prettier-BwD_fsw0.js} +18 -18
- package/dist/prettier-BzdOJjeO.js +125 -0
- package/dist/prettier-CZNG3Ahs.js +3 -0
- package/package.json +9 -9
- package/dist/prettier-C73ySGNm.js +0 -50
- /package/dist/{acorn--TByBHhx.js → acorn-Dg33ba6P.js} +0 -0
- /package/dist/{angular-BLzr5qhs.js → angular-uNZxEOkz.js} +0 -0
- /package/dist/{babel-DhJC4fWe.js → babel-DRBVrtWu.js} +0 -0
- /package/dist/{estree-CVa_AA8B.js → estree-Dbhq_ls-.js} +0 -0
- /package/dist/{flow-CI6YHpLC.js → flow-CgDiNJJ7.js} +0 -0
- /package/dist/{glimmer-JkMh_-MX.js → glimmer-DM-kBOhf.js} +0 -0
- /package/dist/{graphql-C9_i3-Cc.js → graphql-b892kzpi.js} +0 -0
- /package/dist/{html-JgYha5FV.js → html-DpUYmEEC.js} +0 -0
- /package/dist/{markdown-BuwM4NAn.js → markdown-DTqaZ9x0.js} +0 -0
- /package/dist/{meriyah-BRoj9SnS.js → meriyah-B2C-4qZy.js} +0 -0
- /package/dist/{postcss-DoFjbuyt.js → postcss-BBCUMS7u.js} +0 -0
- /package/dist/{shared-WqBdMVAn.js → shared-CGfq9wr5.js} +0 -0
- /package/dist/{typescript-CeGed7GO.js → typescript-XwnBEa56.js} +0 -0
- /package/dist/{yaml-D-v2gjzo.js → yaml-D80PhhP9.js} +0 -0
|
@@ -130,6 +130,67 @@
|
|
|
130
130
|
],
|
|
131
131
|
"type": "string"
|
|
132
132
|
},
|
|
133
|
+
"TailwindcssConfig": {
|
|
134
|
+
"description": "Configuration for Tailwind CSS class sorting.\nBased on options from `prettier-plugin-tailwindcss`.\n\nNote: All `tailwind` prefixes have been removed from option names.\nFor example, use `config` instead of `tailwindConfig`.\n\nSee <https://github.com/tailwindlabs/prettier-plugin-tailwindcss#options>",
|
|
135
|
+
"markdownDescription": "Configuration for Tailwind CSS class sorting.\nBased on options from `prettier-plugin-tailwindcss`.\n\nNote: All `tailwind` prefixes have been removed from option names.\nFor example, use `config` instead of `tailwindConfig`.\n\nSee <https://github.com/tailwindlabs/prettier-plugin-tailwindcss#options>",
|
|
136
|
+
"properties": {
|
|
137
|
+
"attributes": {
|
|
138
|
+
"description": "List of attributes that contain Tailwind CSS classes.\n\nExample: `[\"myClassProp\", \":class\"]`\n\nDefault: `[\"class\", \"className\"]`",
|
|
139
|
+
"items": {
|
|
140
|
+
"type": "string"
|
|
141
|
+
},
|
|
142
|
+
"markdownDescription": "List of attributes that contain Tailwind CSS classes.\n\nExample: `[\"myClassProp\", \":class\"]`\n\nDefault: `[\"class\", \"className\"]`",
|
|
143
|
+
"type": [
|
|
144
|
+
"array",
|
|
145
|
+
"null"
|
|
146
|
+
]
|
|
147
|
+
},
|
|
148
|
+
"config": {
|
|
149
|
+
"description": "Path to your Tailwind CSS configuration file (v3).\n\nNote: Paths are resolved relative to the Oxfmt configuration file.\n\nDefault: `\"./tailwind.config.js\"`",
|
|
150
|
+
"markdownDescription": "Path to your Tailwind CSS configuration file (v3).\n\nNote: Paths are resolved relative to the Oxfmt configuration file.\n\nDefault: `\"./tailwind.config.js\"`",
|
|
151
|
+
"type": [
|
|
152
|
+
"string",
|
|
153
|
+
"null"
|
|
154
|
+
]
|
|
155
|
+
},
|
|
156
|
+
"functions": {
|
|
157
|
+
"description": "List of custom function names that contain Tailwind CSS classes.\n\nExample: `[\"clsx\", \"cn\", \"cva\", \"tw\"]`\n\nDefault: `[]`",
|
|
158
|
+
"items": {
|
|
159
|
+
"type": "string"
|
|
160
|
+
},
|
|
161
|
+
"markdownDescription": "List of custom function names that contain Tailwind CSS classes.\n\nExample: `[\"clsx\", \"cn\", \"cva\", \"tw\"]`\n\nDefault: `[]`",
|
|
162
|
+
"type": [
|
|
163
|
+
"array",
|
|
164
|
+
"null"
|
|
165
|
+
]
|
|
166
|
+
},
|
|
167
|
+
"preserveDuplicates": {
|
|
168
|
+
"description": "Preserve duplicate classes.\n\nDefault: `false`",
|
|
169
|
+
"markdownDescription": "Preserve duplicate classes.\n\nDefault: `false`",
|
|
170
|
+
"type": [
|
|
171
|
+
"boolean",
|
|
172
|
+
"null"
|
|
173
|
+
]
|
|
174
|
+
},
|
|
175
|
+
"preserveWhitespace": {
|
|
176
|
+
"description": "Preserve whitespace around classes.\n\nDefault: `false`",
|
|
177
|
+
"markdownDescription": "Preserve whitespace around classes.\n\nDefault: `false`",
|
|
178
|
+
"type": [
|
|
179
|
+
"boolean",
|
|
180
|
+
"null"
|
|
181
|
+
]
|
|
182
|
+
},
|
|
183
|
+
"stylesheet": {
|
|
184
|
+
"description": "Path to your Tailwind CSS stylesheet (v4).\n\nNote: Paths are resolved relative to the Oxfmt configuration file.\n\nExample: `\"./src/app.css\"`",
|
|
185
|
+
"markdownDescription": "Path to your Tailwind CSS stylesheet (v4).\n\nNote: Paths are resolved relative to the Oxfmt configuration file.\n\nExample: `\"./src/app.css\"`",
|
|
186
|
+
"type": [
|
|
187
|
+
"string",
|
|
188
|
+
"null"
|
|
189
|
+
]
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
"type": "object"
|
|
193
|
+
},
|
|
133
194
|
"TrailingCommaConfig": {
|
|
134
195
|
"enum": [
|
|
135
196
|
"all",
|
|
@@ -179,8 +240,8 @@
|
|
|
179
240
|
"type": "null"
|
|
180
241
|
}
|
|
181
242
|
],
|
|
182
|
-
"description": "Control whether to format embedded parts in the file. (Default: `\"
|
|
183
|
-
"markdownDescription": "Control whether to format embedded parts in the file. (Default: `\"
|
|
243
|
+
"description": "Control whether to format embedded parts in the file.\ne.g. JS-in-Vue, CSS-in-JS, etc. (Default: `\"auto\"`)",
|
|
244
|
+
"markdownDescription": "Control whether to format embedded parts in the file.\ne.g. JS-in-Vue, CSS-in-JS, etc. (Default: `\"auto\"`)"
|
|
184
245
|
},
|
|
185
246
|
"endOfLine": {
|
|
186
247
|
"anyOf": [
|
|
@@ -214,6 +275,18 @@
|
|
|
214
275
|
"null"
|
|
215
276
|
]
|
|
216
277
|
},
|
|
278
|
+
"experimentalTailwindcss": {
|
|
279
|
+
"anyOf": [
|
|
280
|
+
{
|
|
281
|
+
"$ref": "#/definitions/TailwindcssConfig"
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
"type": "null"
|
|
285
|
+
}
|
|
286
|
+
],
|
|
287
|
+
"description": "Experimental: Enable Tailwind CSS class sorting in JSX class/className attributes.\nWhen enabled, class strings will be collected and passed to a callback for sorting.\nPass `true` or an object with options from `prettier-plugin-tailwindcss`.\n(Default: disabled)",
|
|
288
|
+
"markdownDescription": "Experimental: Enable Tailwind CSS class sorting in JSX class/className attributes.\nWhen enabled, class strings will be collected and passed to a callback for sorting.\nPass `true` or an object with options from `prettier-plugin-tailwindcss`.\n(Default: disabled)"
|
|
289
|
+
},
|
|
217
290
|
"ignorePatterns": {
|
|
218
291
|
"description": "Ignore files matching these glob patterns. Current working directory is used as the root.",
|
|
219
292
|
"items": {
|
|
@@ -58,7 +58,7 @@ function requireNative() {
|
|
|
58
58
|
try {
|
|
59
59
|
const binding = require("@oxfmt/android-arm64");
|
|
60
60
|
const bindingPackageVersion = require("@oxfmt/android-arm64/package.json").version;
|
|
61
|
-
if (bindingPackageVersion !== "0.
|
|
61
|
+
if (bindingPackageVersion !== "0.23.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.23.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/android-arm-eabi");
|
|
74
74
|
const bindingPackageVersion = require("@oxfmt/android-arm-eabi/package.json").version;
|
|
75
|
-
if (bindingPackageVersion !== "0.
|
|
75
|
+
if (bindingPackageVersion !== "0.23.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.23.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/win32-x64-gnu");
|
|
89
89
|
const bindingPackageVersion = require("@oxfmt/win32-x64-gnu/package.json").version;
|
|
90
|
-
if (bindingPackageVersion !== "0.
|
|
90
|
+
if (bindingPackageVersion !== "0.23.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.23.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/win32-x64");
|
|
103
103
|
const bindingPackageVersion = require("@oxfmt/win32-x64/package.json").version;
|
|
104
|
-
if (bindingPackageVersion !== "0.
|
|
104
|
+
if (bindingPackageVersion !== "0.23.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.23.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/win32-ia32");
|
|
118
118
|
const bindingPackageVersion = require("@oxfmt/win32-ia32/package.json").version;
|
|
119
|
-
if (bindingPackageVersion !== "0.
|
|
119
|
+
if (bindingPackageVersion !== "0.23.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.23.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/win32-arm64");
|
|
132
132
|
const bindingPackageVersion = require("@oxfmt/win32-arm64/package.json").version;
|
|
133
|
-
if (bindingPackageVersion !== "0.
|
|
133
|
+
if (bindingPackageVersion !== "0.23.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.23.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/darwin-universal");
|
|
147
147
|
const bindingPackageVersion = require("@oxfmt/darwin-universal/package.json").version;
|
|
148
|
-
if (bindingPackageVersion !== "0.
|
|
148
|
+
if (bindingPackageVersion !== "0.23.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.23.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/darwin-x64");
|
|
161
161
|
const bindingPackageVersion = require("@oxfmt/darwin-x64/package.json").version;
|
|
162
|
-
if (bindingPackageVersion !== "0.
|
|
162
|
+
if (bindingPackageVersion !== "0.23.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.23.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/darwin-arm64");
|
|
175
175
|
const bindingPackageVersion = require("@oxfmt/darwin-arm64/package.json").version;
|
|
176
|
-
if (bindingPackageVersion !== "0.
|
|
176
|
+
if (bindingPackageVersion !== "0.23.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.23.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/freebsd-x64");
|
|
190
190
|
const bindingPackageVersion = require("@oxfmt/freebsd-x64/package.json").version;
|
|
191
|
-
if (bindingPackageVersion !== "0.
|
|
191
|
+
if (bindingPackageVersion !== "0.23.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.23.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/freebsd-arm64");
|
|
204
204
|
const bindingPackageVersion = require("@oxfmt/freebsd-arm64/package.json").version;
|
|
205
|
-
if (bindingPackageVersion !== "0.
|
|
205
|
+
if (bindingPackageVersion !== "0.23.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.23.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/linux-x64-musl");
|
|
219
219
|
const bindingPackageVersion = require("@oxfmt/linux-x64-musl/package.json").version;
|
|
220
|
-
if (bindingPackageVersion !== "0.
|
|
220
|
+
if (bindingPackageVersion !== "0.23.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.23.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/linux-x64-gnu");
|
|
233
233
|
const bindingPackageVersion = require("@oxfmt/linux-x64-gnu/package.json").version;
|
|
234
|
-
if (bindingPackageVersion !== "0.
|
|
234
|
+
if (bindingPackageVersion !== "0.23.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.23.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/linux-arm64-musl");
|
|
248
248
|
const bindingPackageVersion = require("@oxfmt/linux-arm64-musl/package.json").version;
|
|
249
|
-
if (bindingPackageVersion !== "0.
|
|
249
|
+
if (bindingPackageVersion !== "0.23.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.23.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/linux-arm64-gnu");
|
|
262
262
|
const bindingPackageVersion = require("@oxfmt/linux-arm64-gnu/package.json").version;
|
|
263
|
-
if (bindingPackageVersion !== "0.
|
|
263
|
+
if (bindingPackageVersion !== "0.23.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.23.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/linux-arm-musleabihf");
|
|
277
277
|
const bindingPackageVersion = require("@oxfmt/linux-arm-musleabihf/package.json").version;
|
|
278
|
-
if (bindingPackageVersion !== "0.
|
|
278
|
+
if (bindingPackageVersion !== "0.23.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.23.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/linux-arm-gnueabihf");
|
|
291
291
|
const bindingPackageVersion = require("@oxfmt/linux-arm-gnueabihf/package.json").version;
|
|
292
|
-
if (bindingPackageVersion !== "0.
|
|
292
|
+
if (bindingPackageVersion !== "0.23.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.23.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/linux-loong64-musl");
|
|
306
306
|
const bindingPackageVersion = require("@oxfmt/linux-loong64-musl/package.json").version;
|
|
307
|
-
if (bindingPackageVersion !== "0.
|
|
307
|
+
if (bindingPackageVersion !== "0.23.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.23.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/linux-loong64-gnu");
|
|
320
320
|
const bindingPackageVersion = require("@oxfmt/linux-loong64-gnu/package.json").version;
|
|
321
|
-
if (bindingPackageVersion !== "0.
|
|
321
|
+
if (bindingPackageVersion !== "0.23.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.23.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/linux-riscv64-musl");
|
|
335
335
|
const bindingPackageVersion = require("@oxfmt/linux-riscv64-musl/package.json").version;
|
|
336
|
-
if (bindingPackageVersion !== "0.
|
|
336
|
+
if (bindingPackageVersion !== "0.23.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.23.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/linux-riscv64-gnu");
|
|
349
349
|
const bindingPackageVersion = require("@oxfmt/linux-riscv64-gnu/package.json").version;
|
|
350
|
-
if (bindingPackageVersion !== "0.
|
|
350
|
+
if (bindingPackageVersion !== "0.23.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.23.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/linux-ppc64-gnu");
|
|
364
364
|
const bindingPackageVersion = require("@oxfmt/linux-ppc64-gnu/package.json").version;
|
|
365
|
-
if (bindingPackageVersion !== "0.
|
|
365
|
+
if (bindingPackageVersion !== "0.23.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.23.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/linux-s390x-gnu");
|
|
378
378
|
const bindingPackageVersion = require("@oxfmt/linux-s390x-gnu/package.json").version;
|
|
379
|
-
if (bindingPackageVersion !== "0.
|
|
379
|
+
if (bindingPackageVersion !== "0.23.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.23.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/openharmony-arm64");
|
|
393
393
|
const bindingPackageVersion = require("@oxfmt/openharmony-arm64/package.json").version;
|
|
394
|
-
if (bindingPackageVersion !== "0.
|
|
394
|
+
if (bindingPackageVersion !== "0.23.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.23.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/openharmony-x64");
|
|
407
407
|
const bindingPackageVersion = require("@oxfmt/openharmony-x64/package.json").version;
|
|
408
|
-
if (bindingPackageVersion !== "0.
|
|
408
|
+
if (bindingPackageVersion !== "0.23.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.23.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/openharmony-arm");
|
|
421
421
|
const bindingPackageVersion = require("@oxfmt/openharmony-arm/package.json").version;
|
|
422
|
-
if (bindingPackageVersion !== "0.
|
|
422
|
+
if (bindingPackageVersion !== "0.23.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.23.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);
|
|
@@ -437,12 +437,13 @@ if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
|
|
|
437
437
|
} catch (err) {
|
|
438
438
|
if (process.env.NAPI_RS_FORCE_WASI) wasiBindingError = err;
|
|
439
439
|
}
|
|
440
|
-
if (!nativeBinding) try {
|
|
440
|
+
if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) try {
|
|
441
441
|
wasiBinding = require("@oxfmt/wasm32-wasi");
|
|
442
442
|
nativeBinding = wasiBinding;
|
|
443
443
|
} catch (err) {
|
|
444
444
|
if (process.env.NAPI_RS_FORCE_WASI) {
|
|
445
|
-
wasiBindingError
|
|
445
|
+
if (!wasiBindingError) wasiBindingError = err;
|
|
446
|
+
else wasiBindingError.cause = err;
|
|
446
447
|
loadErrors.push(err);
|
|
447
448
|
}
|
|
448
449
|
}
|
package/dist/cli-worker.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { r as TailwindcssOptions } from "./index-Cy_w6Ejz.js";
|
|
1
2
|
import { Options } from "prettier";
|
|
2
3
|
|
|
3
4
|
//#region src-js/libs/prettier.d.ts
|
|
@@ -23,7 +24,9 @@ type FormatFileParam = {
|
|
|
23
24
|
code: string;
|
|
24
25
|
parserName: string;
|
|
25
26
|
fileName: string;
|
|
26
|
-
options: Options
|
|
27
|
+
options: Options & {
|
|
28
|
+
experimentalTailwindcss?: TailwindcssOptions;
|
|
29
|
+
};
|
|
27
30
|
};
|
|
28
31
|
/**
|
|
29
32
|
* Format non-js file
|
|
@@ -36,5 +39,22 @@ declare function formatFile({
|
|
|
36
39
|
fileName,
|
|
37
40
|
options
|
|
38
41
|
}: FormatFileParam): Promise<string>;
|
|
42
|
+
interface SortTailwindClassesArgs {
|
|
43
|
+
filepath: string;
|
|
44
|
+
classes: string[];
|
|
45
|
+
options?: {
|
|
46
|
+
experimentalTailwindcss?: TailwindcssOptions;
|
|
47
|
+
} & Record<string, unknown>;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Process Tailwind CSS classes found in JSX attributes.
|
|
51
|
+
* @param args - Object containing filepath, classes, and options
|
|
52
|
+
* @returns Array of sorted class strings (same order/length as input)
|
|
53
|
+
*/
|
|
54
|
+
declare function sortTailwindClasses({
|
|
55
|
+
filepath,
|
|
56
|
+
classes,
|
|
57
|
+
options
|
|
58
|
+
}: SortTailwindClassesArgs): Promise<string[]>;
|
|
39
59
|
//#endregion
|
|
40
|
-
export { formatEmbeddedCode, formatFile };
|
|
60
|
+
export { formatEmbeddedCode, formatFile, sortTailwindClasses };
|
package/dist/cli-worker.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as sortTailwindClasses, n as formatEmbeddedCode, r as formatFile } from "./prettier-BzdOJjeO.js";
|
|
2
2
|
|
|
3
|
-
export { formatEmbeddedCode, formatFile };
|
|
3
|
+
export { formatEmbeddedCode, formatFile, sortTailwindClasses };
|
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as runCli } from "./bindings-
|
|
2
|
-
import {
|
|
1
|
+
import { n as runCli } from "./bindings-D1pGt4ma.js";
|
|
2
|
+
import { i as resolvePlugins } from "./prettier-BzdOJjeO.js";
|
|
3
3
|
import Tinypool from "tinypool";
|
|
4
4
|
|
|
5
5
|
//#region src-js/cli/worker-proxy.ts
|
|
@@ -27,17 +27,24 @@ async function formatFile(options, parserName, fileName, code) {
|
|
|
27
27
|
parserName
|
|
28
28
|
}, { name: "formatFile" });
|
|
29
29
|
}
|
|
30
|
+
async function sortTailwindClasses(filepath, options, classes) {
|
|
31
|
+
return pool.run({
|
|
32
|
+
filepath,
|
|
33
|
+
options,
|
|
34
|
+
classes
|
|
35
|
+
}, { name: "sortTailwindClasses" });
|
|
36
|
+
}
|
|
30
37
|
|
|
31
38
|
//#endregion
|
|
32
39
|
//#region src-js/cli.ts
|
|
33
40
|
(async () => {
|
|
34
|
-
const [mode, exitCode] = await runCli(process.argv.slice(2), initExternalFormatter, formatEmbeddedCode, formatFile);
|
|
41
|
+
const [mode, exitCode] = await runCli(process.argv.slice(2), initExternalFormatter, formatEmbeddedCode, formatFile, sortTailwindClasses);
|
|
35
42
|
if (mode === "init") {
|
|
36
|
-
await import("./init-
|
|
43
|
+
await import("./init-BQYL9OnU.js").then((m) => m.runInit());
|
|
37
44
|
return;
|
|
38
45
|
}
|
|
39
46
|
if (mode === "migrate:prettier") {
|
|
40
|
-
await import("./migrate-prettier-
|
|
47
|
+
await import("./migrate-prettier-CcpDyeNG.js").then((m) => m.runMigratePrettier());
|
|
41
48
|
return;
|
|
42
49
|
}
|
|
43
50
|
process.exitCode = exitCode;
|