oxfmt 0.31.0 → 0.32.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.
@@ -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-UWJuI9JH.js");
78
+ oxfmtPluginCache = await import("./prettier-plugin-oxfmt-CTfSH0ez.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.31.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.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
61
+ if (bindingPackageVersion !== "0.32.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.32.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.31.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.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
75
+ if (bindingPackageVersion !== "0.32.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.32.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.31.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.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
90
+ if (bindingPackageVersion !== "0.32.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.32.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.31.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.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
104
+ if (bindingPackageVersion !== "0.32.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.32.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.31.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.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
119
+ if (bindingPackageVersion !== "0.32.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.32.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.31.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.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
133
+ if (bindingPackageVersion !== "0.32.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.32.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.31.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.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
148
+ if (bindingPackageVersion !== "0.32.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.32.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.31.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.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
162
+ if (bindingPackageVersion !== "0.32.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.32.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.31.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.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
176
+ if (bindingPackageVersion !== "0.32.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.32.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.31.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.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
191
+ if (bindingPackageVersion !== "0.32.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.32.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.31.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.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
205
+ if (bindingPackageVersion !== "0.32.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.32.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.31.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.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
220
+ if (bindingPackageVersion !== "0.32.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.32.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.31.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.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
234
+ if (bindingPackageVersion !== "0.32.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.32.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.31.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.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
249
+ if (bindingPackageVersion !== "0.32.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.32.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.31.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.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
263
+ if (bindingPackageVersion !== "0.32.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.32.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.31.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.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
278
+ if (bindingPackageVersion !== "0.32.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.32.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.31.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.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
292
+ if (bindingPackageVersion !== "0.32.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.32.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.31.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.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
307
+ if (bindingPackageVersion !== "0.32.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.32.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.31.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.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
321
+ if (bindingPackageVersion !== "0.32.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.32.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.31.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.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
336
+ if (bindingPackageVersion !== "0.32.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.32.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.31.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.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
350
+ if (bindingPackageVersion !== "0.32.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.32.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.31.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.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
365
+ if (bindingPackageVersion !== "0.32.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.32.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.31.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.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
379
+ if (bindingPackageVersion !== "0.32.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.32.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.31.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.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
394
+ if (bindingPackageVersion !== "0.32.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.32.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.31.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.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
408
+ if (bindingPackageVersion !== "0.32.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.32.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.31.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.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
422
+ if (bindingPackageVersion !== "0.32.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.32.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);
@@ -460,7 +460,7 @@ if (!nativeBinding) {
460
460
  }) });
461
461
  throw new Error(`Failed to load native binding`);
462
462
  }
463
- const { Severity, format, runCli } = nativeBinding;
463
+ const { Severity, format, jsTextToDoc, runCli } = nativeBinding;
464
464
 
465
465
  //#endregion
466
- export { runCli as n, format as t };
466
+ export { jsTextToDoc as n, runCli as r, format as t };
@@ -1,3 +1,3 @@
1
- import { i as sortTailwindClasses, n as formatFile, t as formatEmbeddedCode } from "./apis-CABy38Rv.js";
1
+ import { i as sortTailwindClasses, n as formatFile, t as formatEmbeddedCode } from "./apis-6GJvrGdK.js";
2
2
 
3
3
  export { formatEmbeddedCode, formatFile, sortTailwindClasses };
package/dist/cli.js CHANGED
@@ -1,5 +1,5 @@
1
- import { n as runCli } from "./bindings-CLlZ-RUP.js";
2
- import { r as resolvePlugins } from "./apis-CABy38Rv.js";
1
+ import { r as runCli } from "./bindings-DuRSBSH9.js";
2
+ import { r as resolvePlugins } from "./apis-6GJvrGdK.js";
3
3
  import Tinypool from "tinypool";
4
4
 
5
5
  //#region src-js/cli/worker-proxy.ts
package/dist/index.d.ts CHANGED
@@ -24,12 +24,22 @@ interface FormatResult {
24
24
  /** Parse and format errors. */
25
25
  errors: Array<OxcError>;
26
26
  }
27
+ interface TextToDocResult {
28
+ /** The formatted code. */
29
+ doc: string;
30
+ /** Parse and format errors. */
31
+ errors: Array<OxcError>;
32
+ }
27
33
  //#endregion
28
34
  //#region src-js/index.d.ts
29
35
  /**
30
36
  * Format the given source text according to the specified options.
31
37
  */
32
38
  declare function format(fileName: string, sourceText: string, options?: FormatOptions): Promise<FormatResult>;
39
+ /**
40
+ * Format a JS/TS snippet for Prettier `textToDoc()` plugin flow.
41
+ */
42
+ declare function jsTextToDoc(fileName: string, sourceText: string, oxfmtPluginOptionsJson: string, parentContext: string): Promise<TextToDocResult>;
33
43
  /**
34
44
  * Configuration options for the `format()` API.
35
45
  */
@@ -88,4 +98,4 @@ type TailwindcssOptions = {
88
98
  preserveDuplicates?: boolean;
89
99
  };
90
100
  //#endregion
91
- export { FormatOptions, SortImportsOptions, TailwindcssOptions, format };
101
+ export { FormatOptions, SortImportsOptions, TailwindcssOptions, format, jsTextToDoc };
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { t as format$1 } from "./bindings-CLlZ-RUP.js";
2
- import { i as sortTailwindClasses, n as formatFile, r as resolvePlugins, t as formatEmbeddedCode } from "./apis-CABy38Rv.js";
1
+ import { n as jsTextToDoc$1, t as format$1 } from "./bindings-DuRSBSH9.js";
2
+ import { i as sortTailwindClasses, n as formatFile, r as resolvePlugins, t as formatEmbeddedCode } from "./apis-6GJvrGdK.js";
3
3
 
4
4
  //#region src-js/index.ts
5
5
  /**
@@ -19,6 +19,18 @@ async function format(fileName, sourceText, options) {
19
19
  classes
20
20
  }));
21
21
  }
22
+ /**
23
+ * Format a JS/TS snippet for Prettier `textToDoc()` plugin flow.
24
+ */
25
+ async function jsTextToDoc(fileName, sourceText, oxfmtPluginOptionsJson, parentContext) {
26
+ return jsTextToDoc$1(fileName, sourceText, oxfmtPluginOptionsJson, parentContext, resolvePlugins, (options, code) => formatEmbeddedCode({
27
+ options,
28
+ code
29
+ }), (_options, _code) => Promise.reject(), (options, classes) => sortTailwindClasses({
30
+ options,
31
+ classes
32
+ }));
33
+ }
22
34
 
23
35
  //#endregion
24
- export { format };
36
+ export { format, jsTextToDoc };
@@ -1,6 +1,6 @@
1
- import "./bindings-CLlZ-RUP.js";
2
- import "./apis-CABy38Rv.js";
3
- import { format } from "./index.js";
1
+ import "./bindings-DuRSBSH9.js";
2
+ import "./apis-6GJvrGdK.js";
3
+ import { jsTextToDoc } from "./index.js";
4
4
  import { r as builders } from "./prettier-iX8V55ba.js";
5
5
 
6
6
  //#region src-js/libs/prettier-plugin-oxfmt/text-to-doc.ts
@@ -8,13 +8,9 @@ const { hardline, join } = builders;
8
8
  const LINE_BREAK_RE = /\r?\n/;
9
9
  const textToDoc = async (embeddedSourceText, textToDocOptions) => {
10
10
  const { parser, parentParser, filepath, _oxfmtPluginOptionsJson } = textToDocOptions;
11
- let { code, errors } = await format(parser === "typescript" ? filepath.endsWith(".tsx") ? "dummy.tsx" : "dummy.ts" : "dummy.jsx", embeddedSourceText, JSON.parse(_oxfmtPluginOptionsJson));
11
+ const { doc: formattedText, errors } = await jsTextToDoc(parser === "typescript" ? filepath.endsWith(".tsx") ? "dummy.tsx" : "dummy.ts" : "dummy.jsx", embeddedSourceText, _oxfmtPluginOptionsJson, [parentParser].join(":"));
12
12
  if (0 < errors.length) throw new Error(errors[0].message);
13
- if (parentParser === "markdown" || parentParser === "mdx") {
14
- if (code.startsWith("<") && code.endsWith(">;")) code = code.slice(0, -1);
15
- if (code.startsWith(";<") && code.endsWith(">")) code = code.slice(1);
16
- }
17
- return join(hardline, code.split(LINE_BREAK_RE));
13
+ return join(hardline, formattedText.split(LINE_BREAK_RE));
18
14
  };
19
15
 
20
16
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oxfmt",
3
- "version": "0.31.0",
3
+ "version": "0.32.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.31.0",
70
- "@oxfmt/binding-android-arm64": "0.31.0",
71
- "@oxfmt/binding-win32-arm64-msvc": "0.31.0",
72
- "@oxfmt/binding-linux-arm64-gnu": "0.31.0",
73
- "@oxfmt/binding-linux-arm64-musl": "0.31.0",
74
- "@oxfmt/binding-openharmony-arm64": "0.31.0",
75
- "@oxfmt/binding-android-arm-eabi": "0.31.0",
76
- "@oxfmt/binding-linux-arm-gnueabihf": "0.31.0",
77
- "@oxfmt/binding-linux-arm-musleabihf": "0.31.0",
78
- "@oxfmt/binding-win32-ia32-msvc": "0.31.0",
79
- "@oxfmt/binding-linux-ppc64-gnu": "0.31.0",
80
- "@oxfmt/binding-linux-riscv64-gnu": "0.31.0",
81
- "@oxfmt/binding-linux-riscv64-musl": "0.31.0",
82
- "@oxfmt/binding-linux-s390x-gnu": "0.31.0",
83
- "@oxfmt/binding-darwin-x64": "0.31.0",
84
- "@oxfmt/binding-win32-x64-msvc": "0.31.0",
85
- "@oxfmt/binding-freebsd-x64": "0.31.0",
86
- "@oxfmt/binding-linux-x64-gnu": "0.31.0",
87
- "@oxfmt/binding-linux-x64-musl": "0.31.0"
69
+ "@oxfmt/binding-darwin-arm64": "0.32.0",
70
+ "@oxfmt/binding-android-arm64": "0.32.0",
71
+ "@oxfmt/binding-win32-arm64-msvc": "0.32.0",
72
+ "@oxfmt/binding-linux-arm64-gnu": "0.32.0",
73
+ "@oxfmt/binding-linux-arm64-musl": "0.32.0",
74
+ "@oxfmt/binding-openharmony-arm64": "0.32.0",
75
+ "@oxfmt/binding-android-arm-eabi": "0.32.0",
76
+ "@oxfmt/binding-linux-arm-gnueabihf": "0.32.0",
77
+ "@oxfmt/binding-linux-arm-musleabihf": "0.32.0",
78
+ "@oxfmt/binding-win32-ia32-msvc": "0.32.0",
79
+ "@oxfmt/binding-linux-ppc64-gnu": "0.32.0",
80
+ "@oxfmt/binding-linux-riscv64-gnu": "0.32.0",
81
+ "@oxfmt/binding-linux-riscv64-musl": "0.32.0",
82
+ "@oxfmt/binding-linux-s390x-gnu": "0.32.0",
83
+ "@oxfmt/binding-darwin-x64": "0.32.0",
84
+ "@oxfmt/binding-win32-x64-msvc": "0.32.0",
85
+ "@oxfmt/binding-freebsd-x64": "0.32.0",
86
+ "@oxfmt/binding-linux-x64-gnu": "0.32.0",
87
+ "@oxfmt/binding-linux-x64-musl": "0.32.0"
88
88
  }
89
89
  }