oxfmt 0.35.0 → 0.37.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/README.md +2 -2
- package/dist/{acorn-DSYDYt2u.js → acorn-BnWlLI9w.js} +1 -2
- package/dist/{angular-DdA9f8ZK.js → angular-BjdVY6ry.js} +3 -5
- package/dist/{apis-KSwODFyo.js → apis-BoXLniqX.js} +42 -14
- package/dist/babel-cHKEVC-N.js +2 -0
- package/dist/{bindings-Bg9JnrLc.js → bindings-Cpav0PNl.js} +27 -29
- package/dist/{chunk-DSjvVL_1-K7gBHu1i.js → chunk-DSjvVL_1-BYdvZw3N.js} +1 -3
- package/dist/chunk-DrSxFLj_.js +14 -0
- package/dist/cli-worker.d.ts +609 -15
- package/dist/cli-worker.js +2 -3
- package/dist/cli.js +20 -17
- package/dist/{dist-DQgkZSFc.js → dist-BxX-OKHo.js} +14 -18
- package/dist/{estree-DBPlpXot.js → estree-BdH1ynKb.js} +1 -2
- package/dist/{flow-DZRswbuH.js → flow-JTvJzd2b.js} +1 -2
- package/dist/{glimmer-B28TNYIB.js → glimmer-Dj-rhc3H.js} +1 -2
- package/dist/{graphql-3p9xuuKy.js → graphql-C66DjsEv.js} +1 -2
- package/dist/{html-D2VbMQAT.js → html-cr_GTtzg.js} +1 -2
- package/dist/index.d.ts +425 -76
- package/dist/index.js +14 -10
- package/dist/{init-BlnymtNS.js → init-BbKOMZ57.js} +2 -4
- package/dist/{jiti-Bb1dT6Cw-CP1_dUF7.js → jiti-Bb1dT6Cw-BzC3jhZX.js} +2 -4
- package/dist/{markdown-DdJpriJP.js → markdown-4I9EsAQD.js} +1 -2
- package/dist/{meriyah-CQnZTN4N.js → meriyah-Dyll-d_f.js} +1 -2
- package/dist/{migrate-biome-B4fq26fI.js → migrate-biome-BMqs7-eg.js} +2 -4
- package/dist/{migrate-prettier-CMmmGHbr.js → migrate-prettier-BfVrZTrL.js} +3 -5
- package/dist/{postcss-D79LfgjO.js → postcss-Cy4xGDrs.js} +2 -3
- package/dist/{prettier-DIVejRqd.js → prettier-DYJRSbN0.js} +19 -22
- package/dist/prettier-plugin-oxfmt-DGn95w-c.js +59 -0
- package/dist/{resolve-pWjAK-4f-YzJRPmwZ.js → resolve-pWjAK-4f-C1Z6M6r2.js} +2 -4
- package/dist/{shared-BhroZgjV.js → shared-BTEY2VsW.js} +1 -3
- package/dist/{sorter-BZkvDMjt-CiG199np.js → sorter-BZkvDMjt-n6dGttqp.js} +7 -9
- package/dist/sorter-D7zO39b5.js +3 -0
- package/dist/{typescript-D5lCjM2U.js → typescript-8enly1_u.js} +1 -2
- package/dist/{utils-D8dQkKEd-bSmL59ud.js → utils-D8dQkKEd-BtAa7w-M.js} +1 -3
- package/dist/{v3-D-mr2VVh-DAVD4LOh.js → v3-D-mr2VVh-FqDpKDIq.js} +4 -6
- package/dist/{v4-C-HWEQJm-DOWhMvfI.js → v4-C-HWEQJm-DL_vfdDs.js} +4 -6
- package/dist/{yaml-jtj0ZWQC.js → yaml-B6CM-Uf_.js} +1 -2
- package/package.json +21 -20
- package/dist/babel-CmMxKXKi.js +0 -3
- package/dist/chunk-DpReBE2K.js +0 -20
- package/dist/index-BNhsnuYk.d.ts +0 -577
- package/dist/prettier-plugin-oxfmt-B4H9aKXO.js +0 -47
- package/dist/sorter-CjGwXe5x.js +0 -5
package/README.md
CHANGED
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
[ci-badge]: https://github.com/oxc-project/oxc/actions/workflows/ci.yml/badge.svg?event=push&branch=main
|
|
31
31
|
[ci-url]: https://github.com/oxc-project/oxc/actions/workflows/ci.yml?query=event%3Apush+branch%3Amain
|
|
32
32
|
[npm-badge]: https://img.shields.io/npm/v/oxfmt/latest?color=brightgreen
|
|
33
|
-
[npm-url]: https://
|
|
33
|
+
[npm-url]: https://npmx.dev/package/oxfmt/v/latest
|
|
34
34
|
[code-size-badge]: https://img.shields.io/github/languages/code-size/oxc-project/oxc
|
|
35
35
|
[code-size-url]: https://github.com/oxc-project/oxc
|
|
36
36
|
[code-coverage-badge]: https://codecov.io/github/oxc-project/oxc/branch/main/graph/badge.svg
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
[sponsors-badge]: https://img.shields.io/github/sponsors/Boshen
|
|
39
39
|
[sponsors-url]: https://github.com/sponsors/Boshen
|
|
40
40
|
[playground-badge]: https://img.shields.io/badge/Playground-blue?color=9BE4E0
|
|
41
|
-
[playground-url]: https://
|
|
41
|
+
[playground-url]: https://playground.oxc.rs/
|
|
42
42
|
|
|
43
43
|
</div>
|
|
44
44
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { t as __exportAll } from "./chunk-
|
|
2
|
-
import { i as sn, r as Ei } from "./dist-
|
|
3
|
-
|
|
1
|
+
import { t as __exportAll } from "./chunk-DrSxFLj_.js";
|
|
2
|
+
import { i as sn, r as Ei } from "./dist-BxX-OKHo.js";
|
|
4
3
|
//#region ../../node_modules/.pnpm/prettier@3.8.1/node_modules/prettier/plugins/postcss.mjs
|
|
5
4
|
var postcss_exports = /* @__PURE__ */ __exportAll({
|
|
6
5
|
default: () => _l,
|
|
@@ -6780,6 +6779,5 @@ var Zs = {
|
|
|
6780
6779
|
parse: xl
|
|
6781
6780
|
};
|
|
6782
6781
|
var Hy = { postcss: Ei$1 };
|
|
6783
|
-
|
|
6784
6782
|
//#endregion
|
|
6785
|
-
export { en as a, Ei as default, _l as i, Si as n, postcss_exports as o, sn as parsers, Ti as r, Hy as t };
|
|
6783
|
+
export { en as a, Ei as default, _l as i, Si as n, postcss_exports as o, sn as parsers, Ti as r, Hy as t };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
let prettierCache;
|
|
3
3
|
async function loadPrettier() {
|
|
4
4
|
if (prettierCache) return prettierCache;
|
|
5
|
-
prettierCache = await import("./prettier-
|
|
5
|
+
prettierCache = await import("./prettier-DYJRSbN0.js").then((n) => n.n);
|
|
6
6
|
return prettierCache;
|
|
7
7
|
}
|
|
8
8
|
/**
|
|
@@ -17,11 +17,23 @@ async function resolvePlugins() {
|
|
|
17
17
|
return [];
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
|
-
* Format
|
|
20
|
+
* Format non-js file
|
|
21
|
+
*
|
|
22
|
+
* @returns Formatted code
|
|
23
|
+
*/
|
|
24
|
+
async function formatFile({ code, options }) {
|
|
25
|
+
const prettier = await loadPrettier();
|
|
26
|
+
await setupTailwindPlugin(options);
|
|
27
|
+
await setupOxfmtPlugin(options);
|
|
28
|
+
return prettier.format(code, options);
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Format xxx-in-js code snippets into formatted string.
|
|
32
|
+
*
|
|
33
|
+
* This will be gradually replaced by `formatEmbeddedDoc` which returns `Doc`.
|
|
34
|
+
* For now, html|css|md-in-js are using this.
|
|
21
35
|
*
|
|
22
36
|
* @returns Formatted code snippet
|
|
23
|
-
* TODO: In the future, this should return `Doc` instead of string,
|
|
24
|
-
* otherwise, we cannot calculate `printWidth` correctly.
|
|
25
37
|
*/
|
|
26
38
|
async function formatEmbeddedCode({ code, options }) {
|
|
27
39
|
const prettier = await loadPrettier();
|
|
@@ -29,20 +41,37 @@ async function formatEmbeddedCode({ code, options }) {
|
|
|
29
41
|
return prettier.format(code, options);
|
|
30
42
|
}
|
|
31
43
|
/**
|
|
32
|
-
* Format
|
|
44
|
+
* Format xxx-in-js code snippets into Prettier `Doc` JSON strings.
|
|
33
45
|
*
|
|
34
|
-
*
|
|
46
|
+
* This makes `oxc_formatter` correctly handle `printWidth` even for embedded code.
|
|
47
|
+
* - For gql-in-js, `texts` contains multiple parts split by `${}` in a template literal
|
|
48
|
+
* - For others, `texts` always contains a single string with `${}` parts replaced by placeholders
|
|
49
|
+
* However, this function does not need to be aware of that,
|
|
50
|
+
* as it simply formats each text part independently and returns an array of formatted parts.
|
|
51
|
+
*
|
|
52
|
+
* @returns Doc JSON strings (one per input text)
|
|
35
53
|
*/
|
|
36
|
-
async function
|
|
54
|
+
async function formatEmbeddedDoc({ texts, options }) {
|
|
37
55
|
const prettier = await loadPrettier();
|
|
38
56
|
await setupTailwindPlugin(options);
|
|
39
|
-
|
|
40
|
-
|
|
57
|
+
return Promise.all(texts.map(async (text) => {
|
|
58
|
+
const doc = await prettier.__debug.printToDoc(text, options);
|
|
59
|
+
const symbolToNumber = /* @__PURE__ */ new Map();
|
|
60
|
+
let nextId = 1;
|
|
61
|
+
return JSON.stringify(doc, (_key, value) => {
|
|
62
|
+
if (typeof value === "symbol") {
|
|
63
|
+
if (!symbolToNumber.has(value)) symbolToNumber.set(value, nextId++);
|
|
64
|
+
return symbolToNumber.get(value);
|
|
65
|
+
}
|
|
66
|
+
if (value === -Infinity) return "__NEGATIVE_INFINITY__";
|
|
67
|
+
return value;
|
|
68
|
+
});
|
|
69
|
+
}));
|
|
41
70
|
}
|
|
42
71
|
let tailwindPluginCache;
|
|
43
72
|
async function loadTailwindPlugin() {
|
|
44
73
|
if (tailwindPluginCache) return tailwindPluginCache;
|
|
45
|
-
tailwindPluginCache = await import("./dist-
|
|
74
|
+
tailwindPluginCache = await import("./dist-BxX-OKHo.js");
|
|
46
75
|
return tailwindPluginCache;
|
|
47
76
|
}
|
|
48
77
|
/**
|
|
@@ -63,7 +92,7 @@ async function setupTailwindPlugin(options) {
|
|
|
63
92
|
* @returns Array of sorted class strings (same order/length as input)
|
|
64
93
|
*/
|
|
65
94
|
async function sortTailwindClasses({ classes, options }) {
|
|
66
|
-
const { createSorter } = await import("./sorter-
|
|
95
|
+
const { createSorter } = await import("./sorter-D7zO39b5.js");
|
|
67
96
|
return (await createSorter({
|
|
68
97
|
filepath: options.filepath,
|
|
69
98
|
stylesheetPath: options.tailwindStylesheet,
|
|
@@ -75,7 +104,7 @@ async function sortTailwindClasses({ classes, options }) {
|
|
|
75
104
|
let oxfmtPluginCache;
|
|
76
105
|
async function loadOxfmtPlugin() {
|
|
77
106
|
if (oxfmtPluginCache) return oxfmtPluginCache;
|
|
78
|
-
oxfmtPluginCache = await import("./prettier-plugin-oxfmt-
|
|
107
|
+
oxfmtPluginCache = await import("./prettier-plugin-oxfmt-DGn95w-c.js");
|
|
79
108
|
return oxfmtPluginCache;
|
|
80
109
|
}
|
|
81
110
|
/**
|
|
@@ -88,6 +117,5 @@ async function setupOxfmtPlugin(options) {
|
|
|
88
117
|
options.plugins ??= [];
|
|
89
118
|
options.plugins.push(oxcPlugin);
|
|
90
119
|
}
|
|
91
|
-
|
|
92
120
|
//#endregion
|
|
93
|
-
export { sortTailwindClasses as i,
|
|
121
|
+
export { sortTailwindClasses as a, resolvePlugins as i, formatEmbeddedDoc as n, formatFile as r, formatEmbeddedCode as t };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
|
-
|
|
3
2
|
//#region src-js/bindings.js
|
|
4
3
|
const require = createRequire(import.meta.url);
|
|
5
4
|
new URL(".", import.meta.url).pathname;
|
|
@@ -58,7 +57,7 @@ function requireNative() {
|
|
|
58
57
|
try {
|
|
59
58
|
const binding = require("@oxfmt/binding-android-arm64");
|
|
60
59
|
const bindingPackageVersion = require("@oxfmt/binding-android-arm64/package.json").version;
|
|
61
|
-
if (bindingPackageVersion !== "0.
|
|
60
|
+
if (bindingPackageVersion !== "0.37.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.37.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
62
61
|
return binding;
|
|
63
62
|
} catch (e) {
|
|
64
63
|
loadErrors.push(e);
|
|
@@ -72,7 +71,7 @@ function requireNative() {
|
|
|
72
71
|
try {
|
|
73
72
|
const binding = require("@oxfmt/binding-android-arm-eabi");
|
|
74
73
|
const bindingPackageVersion = require("@oxfmt/binding-android-arm-eabi/package.json").version;
|
|
75
|
-
if (bindingPackageVersion !== "0.
|
|
74
|
+
if (bindingPackageVersion !== "0.37.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.37.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
76
75
|
return binding;
|
|
77
76
|
} catch (e) {
|
|
78
77
|
loadErrors.push(e);
|
|
@@ -87,7 +86,7 @@ function requireNative() {
|
|
|
87
86
|
try {
|
|
88
87
|
const binding = require("@oxfmt/binding-win32-x64-gnu");
|
|
89
88
|
const bindingPackageVersion = require("@oxfmt/binding-win32-x64-gnu/package.json").version;
|
|
90
|
-
if (bindingPackageVersion !== "0.
|
|
89
|
+
if (bindingPackageVersion !== "0.37.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.37.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
91
90
|
return binding;
|
|
92
91
|
} catch (e) {
|
|
93
92
|
loadErrors.push(e);
|
|
@@ -101,7 +100,7 @@ function requireNative() {
|
|
|
101
100
|
try {
|
|
102
101
|
const binding = require("@oxfmt/binding-win32-x64-msvc");
|
|
103
102
|
const bindingPackageVersion = require("@oxfmt/binding-win32-x64-msvc/package.json").version;
|
|
104
|
-
if (bindingPackageVersion !== "0.
|
|
103
|
+
if (bindingPackageVersion !== "0.37.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.37.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
105
104
|
return binding;
|
|
106
105
|
} catch (e) {
|
|
107
106
|
loadErrors.push(e);
|
|
@@ -116,7 +115,7 @@ function requireNative() {
|
|
|
116
115
|
try {
|
|
117
116
|
const binding = require("@oxfmt/binding-win32-ia32-msvc");
|
|
118
117
|
const bindingPackageVersion = require("@oxfmt/binding-win32-ia32-msvc/package.json").version;
|
|
119
|
-
if (bindingPackageVersion !== "0.
|
|
118
|
+
if (bindingPackageVersion !== "0.37.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.37.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
120
119
|
return binding;
|
|
121
120
|
} catch (e) {
|
|
122
121
|
loadErrors.push(e);
|
|
@@ -130,7 +129,7 @@ function requireNative() {
|
|
|
130
129
|
try {
|
|
131
130
|
const binding = require("@oxfmt/binding-win32-arm64-msvc");
|
|
132
131
|
const bindingPackageVersion = require("@oxfmt/binding-win32-arm64-msvc/package.json").version;
|
|
133
|
-
if (bindingPackageVersion !== "0.
|
|
132
|
+
if (bindingPackageVersion !== "0.37.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.37.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
134
133
|
return binding;
|
|
135
134
|
} catch (e) {
|
|
136
135
|
loadErrors.push(e);
|
|
@@ -145,7 +144,7 @@ function requireNative() {
|
|
|
145
144
|
try {
|
|
146
145
|
const binding = require("@oxfmt/binding-darwin-universal");
|
|
147
146
|
const bindingPackageVersion = require("@oxfmt/binding-darwin-universal/package.json").version;
|
|
148
|
-
if (bindingPackageVersion !== "0.
|
|
147
|
+
if (bindingPackageVersion !== "0.37.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.37.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
149
148
|
return binding;
|
|
150
149
|
} catch (e) {
|
|
151
150
|
loadErrors.push(e);
|
|
@@ -159,7 +158,7 @@ function requireNative() {
|
|
|
159
158
|
try {
|
|
160
159
|
const binding = require("@oxfmt/binding-darwin-x64");
|
|
161
160
|
const bindingPackageVersion = require("@oxfmt/binding-darwin-x64/package.json").version;
|
|
162
|
-
if (bindingPackageVersion !== "0.
|
|
161
|
+
if (bindingPackageVersion !== "0.37.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.37.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
163
162
|
return binding;
|
|
164
163
|
} catch (e) {
|
|
165
164
|
loadErrors.push(e);
|
|
@@ -173,7 +172,7 @@ function requireNative() {
|
|
|
173
172
|
try {
|
|
174
173
|
const binding = require("@oxfmt/binding-darwin-arm64");
|
|
175
174
|
const bindingPackageVersion = require("@oxfmt/binding-darwin-arm64/package.json").version;
|
|
176
|
-
if (bindingPackageVersion !== "0.
|
|
175
|
+
if (bindingPackageVersion !== "0.37.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.37.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
177
176
|
return binding;
|
|
178
177
|
} catch (e) {
|
|
179
178
|
loadErrors.push(e);
|
|
@@ -188,7 +187,7 @@ function requireNative() {
|
|
|
188
187
|
try {
|
|
189
188
|
const binding = require("@oxfmt/binding-freebsd-x64");
|
|
190
189
|
const bindingPackageVersion = require("@oxfmt/binding-freebsd-x64/package.json").version;
|
|
191
|
-
if (bindingPackageVersion !== "0.
|
|
190
|
+
if (bindingPackageVersion !== "0.37.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.37.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
192
191
|
return binding;
|
|
193
192
|
} catch (e) {
|
|
194
193
|
loadErrors.push(e);
|
|
@@ -202,7 +201,7 @@ function requireNative() {
|
|
|
202
201
|
try {
|
|
203
202
|
const binding = require("@oxfmt/binding-freebsd-arm64");
|
|
204
203
|
const bindingPackageVersion = require("@oxfmt/binding-freebsd-arm64/package.json").version;
|
|
205
|
-
if (bindingPackageVersion !== "0.
|
|
204
|
+
if (bindingPackageVersion !== "0.37.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.37.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
206
205
|
return binding;
|
|
207
206
|
} catch (e) {
|
|
208
207
|
loadErrors.push(e);
|
|
@@ -217,7 +216,7 @@ function requireNative() {
|
|
|
217
216
|
try {
|
|
218
217
|
const binding = require("@oxfmt/binding-linux-x64-musl");
|
|
219
218
|
const bindingPackageVersion = require("@oxfmt/binding-linux-x64-musl/package.json").version;
|
|
220
|
-
if (bindingPackageVersion !== "0.
|
|
219
|
+
if (bindingPackageVersion !== "0.37.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.37.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
221
220
|
return binding;
|
|
222
221
|
} catch (e) {
|
|
223
222
|
loadErrors.push(e);
|
|
@@ -231,7 +230,7 @@ function requireNative() {
|
|
|
231
230
|
try {
|
|
232
231
|
const binding = require("@oxfmt/binding-linux-x64-gnu");
|
|
233
232
|
const bindingPackageVersion = require("@oxfmt/binding-linux-x64-gnu/package.json").version;
|
|
234
|
-
if (bindingPackageVersion !== "0.
|
|
233
|
+
if (bindingPackageVersion !== "0.37.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.37.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
235
234
|
return binding;
|
|
236
235
|
} catch (e) {
|
|
237
236
|
loadErrors.push(e);
|
|
@@ -246,7 +245,7 @@ function requireNative() {
|
|
|
246
245
|
try {
|
|
247
246
|
const binding = require("@oxfmt/binding-linux-arm64-musl");
|
|
248
247
|
const bindingPackageVersion = require("@oxfmt/binding-linux-arm64-musl/package.json").version;
|
|
249
|
-
if (bindingPackageVersion !== "0.
|
|
248
|
+
if (bindingPackageVersion !== "0.37.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.37.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
250
249
|
return binding;
|
|
251
250
|
} catch (e) {
|
|
252
251
|
loadErrors.push(e);
|
|
@@ -260,7 +259,7 @@ function requireNative() {
|
|
|
260
259
|
try {
|
|
261
260
|
const binding = require("@oxfmt/binding-linux-arm64-gnu");
|
|
262
261
|
const bindingPackageVersion = require("@oxfmt/binding-linux-arm64-gnu/package.json").version;
|
|
263
|
-
if (bindingPackageVersion !== "0.
|
|
262
|
+
if (bindingPackageVersion !== "0.37.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.37.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
264
263
|
return binding;
|
|
265
264
|
} catch (e) {
|
|
266
265
|
loadErrors.push(e);
|
|
@@ -275,7 +274,7 @@ function requireNative() {
|
|
|
275
274
|
try {
|
|
276
275
|
const binding = require("@oxfmt/binding-linux-arm-musleabihf");
|
|
277
276
|
const bindingPackageVersion = require("@oxfmt/binding-linux-arm-musleabihf/package.json").version;
|
|
278
|
-
if (bindingPackageVersion !== "0.
|
|
277
|
+
if (bindingPackageVersion !== "0.37.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.37.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
279
278
|
return binding;
|
|
280
279
|
} catch (e) {
|
|
281
280
|
loadErrors.push(e);
|
|
@@ -289,7 +288,7 @@ function requireNative() {
|
|
|
289
288
|
try {
|
|
290
289
|
const binding = require("@oxfmt/binding-linux-arm-gnueabihf");
|
|
291
290
|
const bindingPackageVersion = require("@oxfmt/binding-linux-arm-gnueabihf/package.json").version;
|
|
292
|
-
if (bindingPackageVersion !== "0.
|
|
291
|
+
if (bindingPackageVersion !== "0.37.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.37.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
293
292
|
return binding;
|
|
294
293
|
} catch (e) {
|
|
295
294
|
loadErrors.push(e);
|
|
@@ -304,7 +303,7 @@ function requireNative() {
|
|
|
304
303
|
try {
|
|
305
304
|
const binding = require("@oxfmt/binding-linux-loong64-musl");
|
|
306
305
|
const bindingPackageVersion = require("@oxfmt/binding-linux-loong64-musl/package.json").version;
|
|
307
|
-
if (bindingPackageVersion !== "0.
|
|
306
|
+
if (bindingPackageVersion !== "0.37.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.37.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
308
307
|
return binding;
|
|
309
308
|
} catch (e) {
|
|
310
309
|
loadErrors.push(e);
|
|
@@ -318,7 +317,7 @@ function requireNative() {
|
|
|
318
317
|
try {
|
|
319
318
|
const binding = require("@oxfmt/binding-linux-loong64-gnu");
|
|
320
319
|
const bindingPackageVersion = require("@oxfmt/binding-linux-loong64-gnu/package.json").version;
|
|
321
|
-
if (bindingPackageVersion !== "0.
|
|
320
|
+
if (bindingPackageVersion !== "0.37.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.37.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
322
321
|
return binding;
|
|
323
322
|
} catch (e) {
|
|
324
323
|
loadErrors.push(e);
|
|
@@ -333,7 +332,7 @@ function requireNative() {
|
|
|
333
332
|
try {
|
|
334
333
|
const binding = require("@oxfmt/binding-linux-riscv64-musl");
|
|
335
334
|
const bindingPackageVersion = require("@oxfmt/binding-linux-riscv64-musl/package.json").version;
|
|
336
|
-
if (bindingPackageVersion !== "0.
|
|
335
|
+
if (bindingPackageVersion !== "0.37.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.37.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
337
336
|
return binding;
|
|
338
337
|
} catch (e) {
|
|
339
338
|
loadErrors.push(e);
|
|
@@ -347,7 +346,7 @@ function requireNative() {
|
|
|
347
346
|
try {
|
|
348
347
|
const binding = require("@oxfmt/binding-linux-riscv64-gnu");
|
|
349
348
|
const bindingPackageVersion = require("@oxfmt/binding-linux-riscv64-gnu/package.json").version;
|
|
350
|
-
if (bindingPackageVersion !== "0.
|
|
349
|
+
if (bindingPackageVersion !== "0.37.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.37.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
351
350
|
return binding;
|
|
352
351
|
} catch (e) {
|
|
353
352
|
loadErrors.push(e);
|
|
@@ -362,7 +361,7 @@ function requireNative() {
|
|
|
362
361
|
try {
|
|
363
362
|
const binding = require("@oxfmt/binding-linux-ppc64-gnu");
|
|
364
363
|
const bindingPackageVersion = require("@oxfmt/binding-linux-ppc64-gnu/package.json").version;
|
|
365
|
-
if (bindingPackageVersion !== "0.
|
|
364
|
+
if (bindingPackageVersion !== "0.37.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.37.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
366
365
|
return binding;
|
|
367
366
|
} catch (e) {
|
|
368
367
|
loadErrors.push(e);
|
|
@@ -376,7 +375,7 @@ function requireNative() {
|
|
|
376
375
|
try {
|
|
377
376
|
const binding = require("@oxfmt/binding-linux-s390x-gnu");
|
|
378
377
|
const bindingPackageVersion = require("@oxfmt/binding-linux-s390x-gnu/package.json").version;
|
|
379
|
-
if (bindingPackageVersion !== "0.
|
|
378
|
+
if (bindingPackageVersion !== "0.37.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.37.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
380
379
|
return binding;
|
|
381
380
|
} catch (e) {
|
|
382
381
|
loadErrors.push(e);
|
|
@@ -391,7 +390,7 @@ function requireNative() {
|
|
|
391
390
|
try {
|
|
392
391
|
const binding = require("@oxfmt/binding-openharmony-arm64");
|
|
393
392
|
const bindingPackageVersion = require("@oxfmt/binding-openharmony-arm64/package.json").version;
|
|
394
|
-
if (bindingPackageVersion !== "0.
|
|
393
|
+
if (bindingPackageVersion !== "0.37.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.37.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
395
394
|
return binding;
|
|
396
395
|
} catch (e) {
|
|
397
396
|
loadErrors.push(e);
|
|
@@ -405,7 +404,7 @@ function requireNative() {
|
|
|
405
404
|
try {
|
|
406
405
|
const binding = require("@oxfmt/binding-openharmony-x64");
|
|
407
406
|
const bindingPackageVersion = require("@oxfmt/binding-openharmony-x64/package.json").version;
|
|
408
|
-
if (bindingPackageVersion !== "0.
|
|
407
|
+
if (bindingPackageVersion !== "0.37.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.37.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
409
408
|
return binding;
|
|
410
409
|
} catch (e) {
|
|
411
410
|
loadErrors.push(e);
|
|
@@ -419,7 +418,7 @@ function requireNative() {
|
|
|
419
418
|
try {
|
|
420
419
|
const binding = require("@oxfmt/binding-openharmony-arm");
|
|
421
420
|
const bindingPackageVersion = require("@oxfmt/binding-openharmony-arm/package.json").version;
|
|
422
|
-
if (bindingPackageVersion !== "0.
|
|
421
|
+
if (bindingPackageVersion !== "0.37.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.37.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
423
422
|
return binding;
|
|
424
423
|
} catch (e) {
|
|
425
424
|
loadErrors.push(e);
|
|
@@ -461,6 +460,5 @@ if (!nativeBinding) {
|
|
|
461
460
|
throw new Error(`Failed to load native binding`);
|
|
462
461
|
}
|
|
463
462
|
const { Severity, format, jsTextToDoc, runCli } = nativeBinding;
|
|
464
|
-
|
|
465
463
|
//#endregion
|
|
466
|
-
export { jsTextToDoc as n, runCli as r, format as t };
|
|
464
|
+
export { jsTextToDoc as n, runCli as r, format as t };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
|
-
|
|
3
2
|
//#region ../../node_modules/.pnpm/prettier-plugin-tailwindcss@0.0.0-insiders.3997fbd_prettier@3.8.1/node_modules/prettier-plugin-tailwindcss/dist/chunk-DSjvVL_1.mjs
|
|
4
3
|
var __create = Object.create;
|
|
5
4
|
var __defProp = Object.defineProperty;
|
|
@@ -33,6 +32,5 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
33
32
|
enumerable: true
|
|
34
33
|
}) : target, mod));
|
|
35
34
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
36
|
-
|
|
37
35
|
//#endregion
|
|
38
|
-
export { __toESM as a, __require as i, __esmMin as n, __exportAll as r, __commonJSMin as t };
|
|
36
|
+
export { __toESM as a, __require as i, __esmMin as n, __exportAll as r, __commonJSMin as t };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import "node:module";
|
|
2
|
+
//#region \0rolldown/runtime.js
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __exportAll = (all, no_symbols) => {
|
|
5
|
+
let target = {};
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
11
|
+
return target;
|
|
12
|
+
};
|
|
13
|
+
//#endregion
|
|
14
|
+
export { __exportAll as t };
|