oxfmt 0.42.0 → 0.43.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 +48 -18
- package/dist/{apis-B6IsFaEf.js → apis-mHnrEtPz.js} +42 -40
- package/dist/{babel-CL6HLzZ0.js → babel-Fkr5EfJ9.js} +2 -2
- package/dist/{bindings-D6U4DxG3.js → bindings-mh4tfrCL.js} +26 -26
- package/dist/cli-worker.d.ts +6 -7
- package/dist/cli-worker.js +1 -1
- package/dist/cli.js +3 -3
- package/dist/{dist-BxJy1HJ_.js → dist-D4weCFEt.js} +5 -5
- package/dist/{graphql-C66DjsEv.js → graphql-BTqRh-7l.js} +1 -0
- package/dist/index.d.ts +20 -9
- package/dist/index.js +2 -2
- package/dist/{jiti-Bb1dT6Cw-BzC3jhZX.js → jiti-Bb1dT6Cw-CnTrJOrf.js} +3 -6
- package/dist/{migrate-prettier-DCQhmQ6e.js → migrate-prettier-CpiJRvlG.js} +1 -1
- package/dist/{prettier-DmvT5K0i.js → prettier-Dwwk1Fyx.js} +5 -5
- package/dist/{prettier-plugin-oxfmt-DkmSndQ0.js → prettier-plugin-oxfmt-CLoiASgP.js} +0 -2
- package/dist/{resolve-pWjAK-4f-C1Z6M6r2.js → resolve-pWjAK-4f-ColMfOaZ.js} +1 -2
- package/dist/{sorter-BZkvDMjt-tVbe6MxP.js → sorter-BZkvDMjt-BJdi7rG8.js} +4 -4
- package/dist/sorter-DNWmw8Iu.js +3 -0
- package/dist/{typescript-8enly1_u.js → typescript-G7g7T3yt.js} +3 -1
- package/dist/{v3-D-mr2VVh-FqDpKDIq.js → v3-D-mr2VVh-CisVsFM0.js} +1 -1
- package/dist/{v4-C-HWEQJm-6MZhb6TA.js → v4-C-HWEQJm-CbHL6UrB.js} +2 -2
- package/dist/{yaml-B6CM-Uf_.js → yaml-BID5Twob.js} +2 -2
- package/package.json +20 -20
- package/dist/sorter-DFoFc7QW.js +0 -3
|
@@ -64,13 +64,13 @@
|
|
|
64
64
|
"markdownDescription": "Whether to insert a final newline at the end of the file.\n\n- Default: `true`\n- Overrides `.editorconfig.insert_final_newline`"
|
|
65
65
|
},
|
|
66
66
|
"jsdoc": {
|
|
67
|
-
"description": "Enable JSDoc comment formatting.\n\nWhen enabled, JSDoc comments are normalized and reformatted:\ntag aliases are canonicalized, descriptions are capitalized,\nlong lines are wrapped, and short comments are collapsed to single-line.\n\nPass an object
|
|
67
|
+
"description": "Enable JSDoc comment formatting.\n\nWhen enabled, JSDoc comments are normalized and reformatted:\ntag aliases are canonicalized, descriptions are capitalized,\nlong lines are wrapped, and short comments are collapsed to single-line.\n\nPass `true` or an object to enable with defaults, or omit/set `false` to disable.\n\n- Default: Disabled",
|
|
68
68
|
"allOf": [
|
|
69
69
|
{
|
|
70
|
-
"$ref": "#/definitions/
|
|
70
|
+
"$ref": "#/definitions/JsdocUserConfig"
|
|
71
71
|
}
|
|
72
72
|
],
|
|
73
|
-
"markdownDescription": "Enable JSDoc comment formatting.\n\nWhen enabled, JSDoc comments are normalized and reformatted:\ntag aliases are canonicalized, descriptions are capitalized,\nlong lines are wrapped, and short comments are collapsed to single-line.\n\nPass an object
|
|
73
|
+
"markdownDescription": "Enable JSDoc comment formatting.\n\nWhen enabled, JSDoc comments are normalized and reformatted:\ntag aliases are canonicalized, descriptions are capitalized,\nlong lines are wrapped, and short comments are collapsed to single-line.\n\nPass `true` or an object to enable with defaults, or omit/set `false` to disable.\n\n- Default: Disabled"
|
|
74
74
|
},
|
|
75
75
|
"jsxSingleQuote": {
|
|
76
76
|
"description": "Use single quotes instead of double quotes in JSX.\n\n- Default: `false`",
|
|
@@ -135,13 +135,13 @@
|
|
|
135
135
|
"markdownDescription": "Use single quotes instead of double quotes.\n\nFor JSX, you can set the `jsxSingleQuote` option.\n\n- Default: `false`"
|
|
136
136
|
},
|
|
137
137
|
"sortImports": {
|
|
138
|
-
"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",
|
|
138
|
+
"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\nPass `true` or an object to enable with defaults, or omit/set `false` to disable.\n\n- Default: Disabled",
|
|
139
139
|
"allOf": [
|
|
140
140
|
{
|
|
141
|
-
"$ref": "#/definitions/
|
|
141
|
+
"$ref": "#/definitions/SortImportsUserConfig"
|
|
142
142
|
}
|
|
143
143
|
],
|
|
144
|
-
"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"
|
|
144
|
+
"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\nPass `true` or an object to enable with defaults, or omit/set `false` to disable.\n\n- Default: Disabled"
|
|
145
145
|
},
|
|
146
146
|
"sortPackageJson": {
|
|
147
147
|
"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`",
|
|
@@ -153,13 +153,13 @@
|
|
|
153
153
|
"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`"
|
|
154
154
|
},
|
|
155
155
|
"sortTailwindcss": {
|
|
156
|
-
"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",
|
|
156
|
+
"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\nPass `true` or an object to enable with defaults, or omit/set `false` to disable.\n\n- Default: Disabled",
|
|
157
157
|
"allOf": [
|
|
158
158
|
{
|
|
159
|
-
"$ref": "#/definitions/
|
|
159
|
+
"$ref": "#/definitions/SortTailwindcssUserConfig"
|
|
160
160
|
}
|
|
161
161
|
],
|
|
162
|
-
"markdownDescription": "Sort Tailwind CSS classes.\n\nUsing the same algorithm as [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss).\nOption names omit the `tailwind` prefix used in the original plugin (e.g., `config` instead of `tailwindConfig`).\nFor details, see each field's documentation.\n\n- Default: Disabled"
|
|
162
|
+
"markdownDescription": "Sort Tailwind CSS classes.\n\nUsing the same algorithm as [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss).\nOption names omit the `tailwind` prefix used in the original plugin (e.g., `config` instead of `tailwindConfig`).\nFor details, see each field's documentation.\n\nPass `true` or an object to enable with defaults, or omit/set `false` to disable.\n\n- Default: Disabled"
|
|
163
163
|
},
|
|
164
164
|
"tabWidth": {
|
|
165
165
|
"description": "Specify the number of spaces per indentation-level.\n\n- Default: `2`\n- Overrides `.editorconfig.indent_size`",
|
|
@@ -301,13 +301,13 @@
|
|
|
301
301
|
"markdownDescription": "Whether to insert a final newline at the end of the file.\n\n- Default: `true`\n- Overrides `.editorconfig.insert_final_newline`"
|
|
302
302
|
},
|
|
303
303
|
"jsdoc": {
|
|
304
|
-
"description": "Enable JSDoc comment formatting.\n\nWhen enabled, JSDoc comments are normalized and reformatted:\ntag aliases are canonicalized, descriptions are capitalized,\nlong lines are wrapped, and short comments are collapsed to single-line.\n\nPass an object
|
|
304
|
+
"description": "Enable JSDoc comment formatting.\n\nWhen enabled, JSDoc comments are normalized and reformatted:\ntag aliases are canonicalized, descriptions are capitalized,\nlong lines are wrapped, and short comments are collapsed to single-line.\n\nPass `true` or an object to enable with defaults, or omit/set `false` to disable.\n\n- Default: Disabled",
|
|
305
305
|
"allOf": [
|
|
306
306
|
{
|
|
307
|
-
"$ref": "#/definitions/
|
|
307
|
+
"$ref": "#/definitions/JsdocUserConfig"
|
|
308
308
|
}
|
|
309
309
|
],
|
|
310
|
-
"markdownDescription": "Enable JSDoc comment formatting.\n\nWhen enabled, JSDoc comments are normalized and reformatted:\ntag aliases are canonicalized, descriptions are capitalized,\nlong lines are wrapped, and short comments are collapsed to single-line.\n\nPass an object
|
|
310
|
+
"markdownDescription": "Enable JSDoc comment formatting.\n\nWhen enabled, JSDoc comments are normalized and reformatted:\ntag aliases are canonicalized, descriptions are capitalized,\nlong lines are wrapped, and short comments are collapsed to single-line.\n\nPass `true` or an object to enable with defaults, or omit/set `false` to disable.\n\n- Default: Disabled"
|
|
311
311
|
},
|
|
312
312
|
"jsxSingleQuote": {
|
|
313
313
|
"description": "Use single quotes instead of double quotes in JSX.\n\n- Default: `false`",
|
|
@@ -364,13 +364,13 @@
|
|
|
364
364
|
"markdownDescription": "Use single quotes instead of double quotes.\n\nFor JSX, you can set the `jsxSingleQuote` option.\n\n- Default: `false`"
|
|
365
365
|
},
|
|
366
366
|
"sortImports": {
|
|
367
|
-
"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",
|
|
367
|
+
"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\nPass `true` or an object to enable with defaults, or omit/set `false` to disable.\n\n- Default: Disabled",
|
|
368
368
|
"allOf": [
|
|
369
369
|
{
|
|
370
|
-
"$ref": "#/definitions/
|
|
370
|
+
"$ref": "#/definitions/SortImportsUserConfig"
|
|
371
371
|
}
|
|
372
372
|
],
|
|
373
|
-
"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"
|
|
373
|
+
"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\nPass `true` or an object to enable with defaults, or omit/set `false` to disable.\n\n- Default: Disabled"
|
|
374
374
|
},
|
|
375
375
|
"sortPackageJson": {
|
|
376
376
|
"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`",
|
|
@@ -382,13 +382,13 @@
|
|
|
382
382
|
"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`"
|
|
383
383
|
},
|
|
384
384
|
"sortTailwindcss": {
|
|
385
|
-
"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",
|
|
385
|
+
"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\nPass `true` or an object to enable with defaults, or omit/set `false` to disable.\n\n- Default: Disabled",
|
|
386
386
|
"allOf": [
|
|
387
387
|
{
|
|
388
|
-
"$ref": "#/definitions/
|
|
388
|
+
"$ref": "#/definitions/SortTailwindcssUserConfig"
|
|
389
389
|
}
|
|
390
390
|
],
|
|
391
|
-
"markdownDescription": "Sort Tailwind CSS classes.\n\nUsing the same algorithm as [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss).\nOption names omit the `tailwind` prefix used in the original plugin (e.g., `config` instead of `tailwindConfig`).\nFor details, see each field's documentation.\n\n- Default: Disabled"
|
|
391
|
+
"markdownDescription": "Sort Tailwind CSS classes.\n\nUsing the same algorithm as [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss).\nOption names omit the `tailwind` prefix used in the original plugin (e.g., `config` instead of `tailwindConfig`).\nFor details, see each field's documentation.\n\nPass `true` or an object to enable with defaults, or omit/set `false` to disable.\n\n- Default: Disabled"
|
|
392
392
|
},
|
|
393
393
|
"tabWidth": {
|
|
394
394
|
"description": "Specify the number of spaces per indentation-level.\n\n- Default: `2`\n- Overrides `.editorconfig.indent_size`",
|
|
@@ -486,6 +486,16 @@
|
|
|
486
486
|
}
|
|
487
487
|
}
|
|
488
488
|
},
|
|
489
|
+
"JsdocUserConfig": {
|
|
490
|
+
"anyOf": [
|
|
491
|
+
{
|
|
492
|
+
"type": "boolean"
|
|
493
|
+
},
|
|
494
|
+
{
|
|
495
|
+
"$ref": "#/definitions/JsdocConfig"
|
|
496
|
+
}
|
|
497
|
+
]
|
|
498
|
+
},
|
|
489
499
|
"NewlinesBetweenMarker": {
|
|
490
500
|
"description": "A marker object for overriding `newlinesBetween` at a specific group boundary.",
|
|
491
501
|
"type": "object",
|
|
@@ -645,6 +655,16 @@
|
|
|
645
655
|
}
|
|
646
656
|
}
|
|
647
657
|
},
|
|
658
|
+
"SortImportsUserConfig": {
|
|
659
|
+
"anyOf": [
|
|
660
|
+
{
|
|
661
|
+
"type": "boolean"
|
|
662
|
+
},
|
|
663
|
+
{
|
|
664
|
+
"$ref": "#/definitions/SortImportsConfig"
|
|
665
|
+
}
|
|
666
|
+
]
|
|
667
|
+
},
|
|
648
668
|
"SortOrderConfig": {
|
|
649
669
|
"type": "string",
|
|
650
670
|
"enum": [
|
|
@@ -713,6 +733,16 @@
|
|
|
713
733
|
}
|
|
714
734
|
}
|
|
715
735
|
},
|
|
736
|
+
"SortTailwindcssUserConfig": {
|
|
737
|
+
"anyOf": [
|
|
738
|
+
{
|
|
739
|
+
"type": "boolean"
|
|
740
|
+
},
|
|
741
|
+
{
|
|
742
|
+
"$ref": "#/definitions/SortTailwindcssConfig"
|
|
743
|
+
}
|
|
744
|
+
]
|
|
745
|
+
},
|
|
716
746
|
"TrailingCommaConfig": {
|
|
717
747
|
"type": "string",
|
|
718
748
|
"enum": [
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
//#region src-js/libs/apis.ts
|
|
2
|
-
|
|
2
|
+
const CACHES = {
|
|
3
|
+
prettier: null,
|
|
4
|
+
tailwindPlugin: null,
|
|
5
|
+
tailwindSorter: null,
|
|
6
|
+
oxfmtPlugin: null
|
|
7
|
+
};
|
|
3
8
|
async function loadPrettier() {
|
|
4
|
-
if (
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
if (!CACHES.prettier) {
|
|
10
|
+
CACHES.prettier = await import("./prettier-Dwwk1Fyx.js");
|
|
11
|
+
const { formatOptionsHiddenDefaults } = CACHES.prettier.__internal;
|
|
12
|
+
formatOptionsHiddenDefaults.parentParser = null;
|
|
13
|
+
formatOptionsHiddenDefaults.__onHtmlRoot = null;
|
|
14
|
+
formatOptionsHiddenDefaults.__inJsTemplate = null;
|
|
15
|
+
}
|
|
16
|
+
return CACHES.prettier;
|
|
10
17
|
}
|
|
11
18
|
/**
|
|
12
19
|
* TODO: Plugins support
|
|
@@ -25,44 +32,44 @@ async function resolvePlugins() {
|
|
|
25
32
|
* @returns Formatted code
|
|
26
33
|
*/
|
|
27
34
|
async function formatFile({ code, options }) {
|
|
28
|
-
const prettier = await loadPrettier();
|
|
29
|
-
await setupTailwindPlugin(options);
|
|
30
|
-
await setupOxfmtPlugin(options);
|
|
35
|
+
const prettier = CACHES.prettier ?? await loadPrettier();
|
|
36
|
+
if ("_useTailwindPlugin" in options) await setupTailwindPlugin(options);
|
|
37
|
+
if ("_oxfmtPluginOptionsJson" in options) await setupOxfmtPlugin(options);
|
|
31
38
|
return prettier.format(code, options);
|
|
32
39
|
}
|
|
33
40
|
/**
|
|
34
|
-
* Format
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* For now, html|css|md-in-js are using this.
|
|
41
|
+
* Format non-js code snippets into formatted string.
|
|
42
|
+
* Mainly used for formatting code fences within JSDoc,
|
|
43
|
+
* and is also used as a temporary fallback for html-in-js.
|
|
38
44
|
*
|
|
39
45
|
* @returns Formatted code snippet
|
|
40
46
|
*/
|
|
41
47
|
async function formatEmbeddedCode({ code, options }) {
|
|
42
|
-
const prettier = await loadPrettier();
|
|
43
|
-
await setupTailwindPlugin(options);
|
|
48
|
+
const prettier = CACHES.prettier ?? await loadPrettier();
|
|
49
|
+
if ("_useTailwindPlugin" in options) await setupTailwindPlugin(options);
|
|
44
50
|
return prettier.format(code, options);
|
|
45
51
|
}
|
|
46
52
|
/**
|
|
47
|
-
* Format
|
|
53
|
+
* Format non-js code snippets into Prettier `Doc` JSON strings.
|
|
48
54
|
*
|
|
49
|
-
* This makes
|
|
55
|
+
* This makes our printer correctly handle `printWidth` even for embedded code.
|
|
50
56
|
* - For gql-in-js, `texts` contains multiple parts split by `${}` in a template literal
|
|
51
57
|
* - For others, `texts` always contains a single string with `${}` parts replaced by placeholders
|
|
52
58
|
* However, this function does not need to be aware of that,
|
|
53
59
|
* as it simply formats each text part independently and returns an array of formatted parts.
|
|
54
60
|
*
|
|
55
|
-
* @returns Doc JSON strings
|
|
61
|
+
* @returns Doc JSON strings
|
|
56
62
|
*/
|
|
57
63
|
async function formatEmbeddedDoc({ texts, options }) {
|
|
58
|
-
const prettier = await loadPrettier();
|
|
59
|
-
await setupTailwindPlugin(options);
|
|
64
|
+
const prettier = CACHES.prettier ?? await loadPrettier();
|
|
65
|
+
if ("_useTailwindPlugin" in options) await setupTailwindPlugin(options);
|
|
60
66
|
return Promise.all(texts.map(async (text) => {
|
|
61
67
|
const metadata = {};
|
|
62
|
-
if (options.parser === "html") {
|
|
68
|
+
if (options.parser === "html" || options.parser === "angular") {
|
|
63
69
|
options.parentParser = "OXFMT";
|
|
64
70
|
options.__onHtmlRoot = (root) => metadata.htmlHasMultipleRootElements = (root.children?.length ?? 0) > 1;
|
|
65
71
|
}
|
|
72
|
+
if (options.parser === "markdown") options.__inJsTemplate = true;
|
|
66
73
|
const doc = await prettier.__debug.printToDoc(text, options);
|
|
67
74
|
const symbolToNumber = /* @__PURE__ */ new Map();
|
|
68
75
|
let nextId = 1;
|
|
@@ -76,31 +83,30 @@ async function formatEmbeddedDoc({ texts, options }) {
|
|
|
76
83
|
});
|
|
77
84
|
}));
|
|
78
85
|
}
|
|
79
|
-
let tailwindPluginCache;
|
|
80
86
|
async function loadTailwindPlugin() {
|
|
81
|
-
if (
|
|
82
|
-
|
|
83
|
-
return tailwindPluginCache;
|
|
87
|
+
if (!CACHES.tailwindPlugin) CACHES.tailwindPlugin = await import("./dist-D4weCFEt.js");
|
|
88
|
+
return CACHES.tailwindPlugin;
|
|
84
89
|
}
|
|
85
90
|
/**
|
|
86
|
-
* Load Tailwind CSS plugin
|
|
87
|
-
* The flag is added by Rust side only for relevant parsers.
|
|
88
|
-
*
|
|
91
|
+
* Load Tailwind CSS plugin.
|
|
89
92
|
* Option mapping (sortTailwindcss.xxx → tailwindXxx) is also done in Rust side.
|
|
90
93
|
*/
|
|
91
94
|
async function setupTailwindPlugin(options) {
|
|
92
|
-
|
|
93
|
-
const tailwindPlugin = await loadTailwindPlugin();
|
|
95
|
+
const tailwindPlugin = CACHES.tailwindPlugin ?? await loadTailwindPlugin();
|
|
94
96
|
options.plugins ??= [];
|
|
95
97
|
options.plugins.push(tailwindPlugin);
|
|
96
98
|
}
|
|
99
|
+
async function loadTailwindSorter() {
|
|
100
|
+
if (!CACHES.tailwindSorter) CACHES.tailwindSorter = await import("./sorter-DNWmw8Iu.js");
|
|
101
|
+
return CACHES.tailwindSorter;
|
|
102
|
+
}
|
|
97
103
|
/**
|
|
98
104
|
* Process Tailwind CSS classes found in JS/TS files in batch.
|
|
99
105
|
* @param args - Object containing classes and options (filepath is in options.filepath)
|
|
100
106
|
* @returns Array of sorted class strings (same order/length as input)
|
|
101
107
|
*/
|
|
102
108
|
async function sortTailwindClasses({ classes, options }) {
|
|
103
|
-
const { createSorter } = await
|
|
109
|
+
const { createSorter } = CACHES.tailwindSorter ?? await loadTailwindSorter();
|
|
104
110
|
return (await createSorter({
|
|
105
111
|
filepath: options.filepath,
|
|
106
112
|
stylesheetPath: options.tailwindStylesheet,
|
|
@@ -109,19 +115,15 @@ async function sortTailwindClasses({ classes, options }) {
|
|
|
109
115
|
preserveDuplicates: options.tailwindPreserveDuplicates
|
|
110
116
|
})).sortClassAttributes(classes);
|
|
111
117
|
}
|
|
112
|
-
let oxfmtPluginCache;
|
|
113
118
|
async function loadOxfmtPlugin() {
|
|
114
|
-
if (
|
|
115
|
-
|
|
116
|
-
return oxfmtPluginCache;
|
|
119
|
+
if (!CACHES.oxfmtPlugin) CACHES.oxfmtPlugin = await import("./prettier-plugin-oxfmt-CLoiASgP.js");
|
|
120
|
+
return CACHES.oxfmtPlugin;
|
|
117
121
|
}
|
|
118
122
|
/**
|
|
119
|
-
* Load oxfmt plugin for js-in-xxx parsers
|
|
120
|
-
* The flag is added by Rust side only for relevant parsers.
|
|
123
|
+
* Load oxfmt plugin for js-in-xxx parsers.
|
|
121
124
|
*/
|
|
122
125
|
async function setupOxfmtPlugin(options) {
|
|
123
|
-
|
|
124
|
-
const oxcPlugin = await loadOxfmtPlugin();
|
|
126
|
+
const oxcPlugin = CACHES.oxfmtPlugin ?? await loadOxfmtPlugin();
|
|
125
127
|
options.plugins ??= [];
|
|
126
128
|
options.plugins.push(oxcPlugin);
|
|
127
129
|
}
|
|
@@ -304,11 +304,11 @@ function F(a, t) {
|
|
|
304
304
|
if (Array.isArray(a)) return (s) => F(s, a[0]);
|
|
305
305
|
let e = {};
|
|
306
306
|
for (let s of Object.keys(a)) {
|
|
307
|
-
let i = a[s], r = typeof i == "string" ? { message: () => i } : typeof i == "function" ? { message: i } : i, { message: n } = r, o = Ws(r, ei)
|
|
307
|
+
let i = a[s], r = typeof i == "string" ? { message: () => i } : typeof i == "function" ? { message: i } : i, { message: n } = r, o = Ws(r, ei);
|
|
308
308
|
e[s] = ti(Object.assign({
|
|
309
309
|
code: "BABEL_PARSER_SYNTAX_ERROR",
|
|
310
310
|
reasonCode: s,
|
|
311
|
-
toMessage:
|
|
311
|
+
toMessage: typeof n == "string" ? () => n : n
|
|
312
312
|
}, t ? { syntaxPlugin: t } : {}, o));
|
|
313
313
|
}
|
|
314
314
|
return e;
|
|
@@ -57,7 +57,7 @@ function requireNative() {
|
|
|
57
57
|
try {
|
|
58
58
|
const binding = require("@oxfmt/binding-android-arm64");
|
|
59
59
|
const bindingPackageVersion = require("@oxfmt/binding-android-arm64/package.json").version;
|
|
60
|
-
if (bindingPackageVersion !== "0.
|
|
60
|
+
if (bindingPackageVersion !== "0.43.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.43.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
61
61
|
return binding;
|
|
62
62
|
} catch (e) {
|
|
63
63
|
loadErrors.push(e);
|
|
@@ -71,7 +71,7 @@ function requireNative() {
|
|
|
71
71
|
try {
|
|
72
72
|
const binding = require("@oxfmt/binding-android-arm-eabi");
|
|
73
73
|
const bindingPackageVersion = require("@oxfmt/binding-android-arm-eabi/package.json").version;
|
|
74
|
-
if (bindingPackageVersion !== "0.
|
|
74
|
+
if (bindingPackageVersion !== "0.43.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.43.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
75
75
|
return binding;
|
|
76
76
|
} catch (e) {
|
|
77
77
|
loadErrors.push(e);
|
|
@@ -86,7 +86,7 @@ function requireNative() {
|
|
|
86
86
|
try {
|
|
87
87
|
const binding = require("@oxfmt/binding-win32-x64-gnu");
|
|
88
88
|
const bindingPackageVersion = require("@oxfmt/binding-win32-x64-gnu/package.json").version;
|
|
89
|
-
if (bindingPackageVersion !== "0.
|
|
89
|
+
if (bindingPackageVersion !== "0.43.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.43.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
90
90
|
return binding;
|
|
91
91
|
} catch (e) {
|
|
92
92
|
loadErrors.push(e);
|
|
@@ -100,7 +100,7 @@ function requireNative() {
|
|
|
100
100
|
try {
|
|
101
101
|
const binding = require("@oxfmt/binding-win32-x64-msvc");
|
|
102
102
|
const bindingPackageVersion = require("@oxfmt/binding-win32-x64-msvc/package.json").version;
|
|
103
|
-
if (bindingPackageVersion !== "0.
|
|
103
|
+
if (bindingPackageVersion !== "0.43.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.43.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
104
104
|
return binding;
|
|
105
105
|
} catch (e) {
|
|
106
106
|
loadErrors.push(e);
|
|
@@ -115,7 +115,7 @@ function requireNative() {
|
|
|
115
115
|
try {
|
|
116
116
|
const binding = require("@oxfmt/binding-win32-ia32-msvc");
|
|
117
117
|
const bindingPackageVersion = require("@oxfmt/binding-win32-ia32-msvc/package.json").version;
|
|
118
|
-
if (bindingPackageVersion !== "0.
|
|
118
|
+
if (bindingPackageVersion !== "0.43.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.43.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
119
119
|
return binding;
|
|
120
120
|
} catch (e) {
|
|
121
121
|
loadErrors.push(e);
|
|
@@ -129,7 +129,7 @@ function requireNative() {
|
|
|
129
129
|
try {
|
|
130
130
|
const binding = require("@oxfmt/binding-win32-arm64-msvc");
|
|
131
131
|
const bindingPackageVersion = require("@oxfmt/binding-win32-arm64-msvc/package.json").version;
|
|
132
|
-
if (bindingPackageVersion !== "0.
|
|
132
|
+
if (bindingPackageVersion !== "0.43.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.43.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
133
133
|
return binding;
|
|
134
134
|
} catch (e) {
|
|
135
135
|
loadErrors.push(e);
|
|
@@ -144,7 +144,7 @@ function requireNative() {
|
|
|
144
144
|
try {
|
|
145
145
|
const binding = require("@oxfmt/binding-darwin-universal");
|
|
146
146
|
const bindingPackageVersion = require("@oxfmt/binding-darwin-universal/package.json").version;
|
|
147
|
-
if (bindingPackageVersion !== "0.
|
|
147
|
+
if (bindingPackageVersion !== "0.43.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.43.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
148
148
|
return binding;
|
|
149
149
|
} catch (e) {
|
|
150
150
|
loadErrors.push(e);
|
|
@@ -158,7 +158,7 @@ function requireNative() {
|
|
|
158
158
|
try {
|
|
159
159
|
const binding = require("@oxfmt/binding-darwin-x64");
|
|
160
160
|
const bindingPackageVersion = require("@oxfmt/binding-darwin-x64/package.json").version;
|
|
161
|
-
if (bindingPackageVersion !== "0.
|
|
161
|
+
if (bindingPackageVersion !== "0.43.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.43.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
162
162
|
return binding;
|
|
163
163
|
} catch (e) {
|
|
164
164
|
loadErrors.push(e);
|
|
@@ -172,7 +172,7 @@ function requireNative() {
|
|
|
172
172
|
try {
|
|
173
173
|
const binding = require("@oxfmt/binding-darwin-arm64");
|
|
174
174
|
const bindingPackageVersion = require("@oxfmt/binding-darwin-arm64/package.json").version;
|
|
175
|
-
if (bindingPackageVersion !== "0.
|
|
175
|
+
if (bindingPackageVersion !== "0.43.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.43.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
176
176
|
return binding;
|
|
177
177
|
} catch (e) {
|
|
178
178
|
loadErrors.push(e);
|
|
@@ -187,7 +187,7 @@ function requireNative() {
|
|
|
187
187
|
try {
|
|
188
188
|
const binding = require("@oxfmt/binding-freebsd-x64");
|
|
189
189
|
const bindingPackageVersion = require("@oxfmt/binding-freebsd-x64/package.json").version;
|
|
190
|
-
if (bindingPackageVersion !== "0.
|
|
190
|
+
if (bindingPackageVersion !== "0.43.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.43.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
191
191
|
return binding;
|
|
192
192
|
} catch (e) {
|
|
193
193
|
loadErrors.push(e);
|
|
@@ -201,7 +201,7 @@ function requireNative() {
|
|
|
201
201
|
try {
|
|
202
202
|
const binding = require("@oxfmt/binding-freebsd-arm64");
|
|
203
203
|
const bindingPackageVersion = require("@oxfmt/binding-freebsd-arm64/package.json").version;
|
|
204
|
-
if (bindingPackageVersion !== "0.
|
|
204
|
+
if (bindingPackageVersion !== "0.43.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.43.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
205
205
|
return binding;
|
|
206
206
|
} catch (e) {
|
|
207
207
|
loadErrors.push(e);
|
|
@@ -216,7 +216,7 @@ function requireNative() {
|
|
|
216
216
|
try {
|
|
217
217
|
const binding = require("@oxfmt/binding-linux-x64-musl");
|
|
218
218
|
const bindingPackageVersion = require("@oxfmt/binding-linux-x64-musl/package.json").version;
|
|
219
|
-
if (bindingPackageVersion !== "0.
|
|
219
|
+
if (bindingPackageVersion !== "0.43.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.43.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
220
220
|
return binding;
|
|
221
221
|
} catch (e) {
|
|
222
222
|
loadErrors.push(e);
|
|
@@ -230,7 +230,7 @@ function requireNative() {
|
|
|
230
230
|
try {
|
|
231
231
|
const binding = require("@oxfmt/binding-linux-x64-gnu");
|
|
232
232
|
const bindingPackageVersion = require("@oxfmt/binding-linux-x64-gnu/package.json").version;
|
|
233
|
-
if (bindingPackageVersion !== "0.
|
|
233
|
+
if (bindingPackageVersion !== "0.43.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.43.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
234
234
|
return binding;
|
|
235
235
|
} catch (e) {
|
|
236
236
|
loadErrors.push(e);
|
|
@@ -245,7 +245,7 @@ function requireNative() {
|
|
|
245
245
|
try {
|
|
246
246
|
const binding = require("@oxfmt/binding-linux-arm64-musl");
|
|
247
247
|
const bindingPackageVersion = require("@oxfmt/binding-linux-arm64-musl/package.json").version;
|
|
248
|
-
if (bindingPackageVersion !== "0.
|
|
248
|
+
if (bindingPackageVersion !== "0.43.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.43.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
249
249
|
return binding;
|
|
250
250
|
} catch (e) {
|
|
251
251
|
loadErrors.push(e);
|
|
@@ -259,7 +259,7 @@ function requireNative() {
|
|
|
259
259
|
try {
|
|
260
260
|
const binding = require("@oxfmt/binding-linux-arm64-gnu");
|
|
261
261
|
const bindingPackageVersion = require("@oxfmt/binding-linux-arm64-gnu/package.json").version;
|
|
262
|
-
if (bindingPackageVersion !== "0.
|
|
262
|
+
if (bindingPackageVersion !== "0.43.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.43.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
263
263
|
return binding;
|
|
264
264
|
} catch (e) {
|
|
265
265
|
loadErrors.push(e);
|
|
@@ -274,7 +274,7 @@ function requireNative() {
|
|
|
274
274
|
try {
|
|
275
275
|
const binding = require("@oxfmt/binding-linux-arm-musleabihf");
|
|
276
276
|
const bindingPackageVersion = require("@oxfmt/binding-linux-arm-musleabihf/package.json").version;
|
|
277
|
-
if (bindingPackageVersion !== "0.
|
|
277
|
+
if (bindingPackageVersion !== "0.43.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.43.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
278
278
|
return binding;
|
|
279
279
|
} catch (e) {
|
|
280
280
|
loadErrors.push(e);
|
|
@@ -288,7 +288,7 @@ function requireNative() {
|
|
|
288
288
|
try {
|
|
289
289
|
const binding = require("@oxfmt/binding-linux-arm-gnueabihf");
|
|
290
290
|
const bindingPackageVersion = require("@oxfmt/binding-linux-arm-gnueabihf/package.json").version;
|
|
291
|
-
if (bindingPackageVersion !== "0.
|
|
291
|
+
if (bindingPackageVersion !== "0.43.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.43.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
292
292
|
return binding;
|
|
293
293
|
} catch (e) {
|
|
294
294
|
loadErrors.push(e);
|
|
@@ -303,7 +303,7 @@ function requireNative() {
|
|
|
303
303
|
try {
|
|
304
304
|
const binding = require("@oxfmt/binding-linux-loong64-musl");
|
|
305
305
|
const bindingPackageVersion = require("@oxfmt/binding-linux-loong64-musl/package.json").version;
|
|
306
|
-
if (bindingPackageVersion !== "0.
|
|
306
|
+
if (bindingPackageVersion !== "0.43.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.43.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
307
307
|
return binding;
|
|
308
308
|
} catch (e) {
|
|
309
309
|
loadErrors.push(e);
|
|
@@ -317,7 +317,7 @@ function requireNative() {
|
|
|
317
317
|
try {
|
|
318
318
|
const binding = require("@oxfmt/binding-linux-loong64-gnu");
|
|
319
319
|
const bindingPackageVersion = require("@oxfmt/binding-linux-loong64-gnu/package.json").version;
|
|
320
|
-
if (bindingPackageVersion !== "0.
|
|
320
|
+
if (bindingPackageVersion !== "0.43.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.43.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
321
321
|
return binding;
|
|
322
322
|
} catch (e) {
|
|
323
323
|
loadErrors.push(e);
|
|
@@ -332,7 +332,7 @@ function requireNative() {
|
|
|
332
332
|
try {
|
|
333
333
|
const binding = require("@oxfmt/binding-linux-riscv64-musl");
|
|
334
334
|
const bindingPackageVersion = require("@oxfmt/binding-linux-riscv64-musl/package.json").version;
|
|
335
|
-
if (bindingPackageVersion !== "0.
|
|
335
|
+
if (bindingPackageVersion !== "0.43.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.43.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
336
336
|
return binding;
|
|
337
337
|
} catch (e) {
|
|
338
338
|
loadErrors.push(e);
|
|
@@ -346,7 +346,7 @@ function requireNative() {
|
|
|
346
346
|
try {
|
|
347
347
|
const binding = require("@oxfmt/binding-linux-riscv64-gnu");
|
|
348
348
|
const bindingPackageVersion = require("@oxfmt/binding-linux-riscv64-gnu/package.json").version;
|
|
349
|
-
if (bindingPackageVersion !== "0.
|
|
349
|
+
if (bindingPackageVersion !== "0.43.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.43.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
350
350
|
return binding;
|
|
351
351
|
} catch (e) {
|
|
352
352
|
loadErrors.push(e);
|
|
@@ -361,7 +361,7 @@ function requireNative() {
|
|
|
361
361
|
try {
|
|
362
362
|
const binding = require("@oxfmt/binding-linux-ppc64-gnu");
|
|
363
363
|
const bindingPackageVersion = require("@oxfmt/binding-linux-ppc64-gnu/package.json").version;
|
|
364
|
-
if (bindingPackageVersion !== "0.
|
|
364
|
+
if (bindingPackageVersion !== "0.43.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.43.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
365
365
|
return binding;
|
|
366
366
|
} catch (e) {
|
|
367
367
|
loadErrors.push(e);
|
|
@@ -375,7 +375,7 @@ function requireNative() {
|
|
|
375
375
|
try {
|
|
376
376
|
const binding = require("@oxfmt/binding-linux-s390x-gnu");
|
|
377
377
|
const bindingPackageVersion = require("@oxfmt/binding-linux-s390x-gnu/package.json").version;
|
|
378
|
-
if (bindingPackageVersion !== "0.
|
|
378
|
+
if (bindingPackageVersion !== "0.43.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.43.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
379
379
|
return binding;
|
|
380
380
|
} catch (e) {
|
|
381
381
|
loadErrors.push(e);
|
|
@@ -390,7 +390,7 @@ function requireNative() {
|
|
|
390
390
|
try {
|
|
391
391
|
const binding = require("@oxfmt/binding-openharmony-arm64");
|
|
392
392
|
const bindingPackageVersion = require("@oxfmt/binding-openharmony-arm64/package.json").version;
|
|
393
|
-
if (bindingPackageVersion !== "0.
|
|
393
|
+
if (bindingPackageVersion !== "0.43.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.43.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
394
394
|
return binding;
|
|
395
395
|
} catch (e) {
|
|
396
396
|
loadErrors.push(e);
|
|
@@ -404,7 +404,7 @@ function requireNative() {
|
|
|
404
404
|
try {
|
|
405
405
|
const binding = require("@oxfmt/binding-openharmony-x64");
|
|
406
406
|
const bindingPackageVersion = require("@oxfmt/binding-openharmony-x64/package.json").version;
|
|
407
|
-
if (bindingPackageVersion !== "0.
|
|
407
|
+
if (bindingPackageVersion !== "0.43.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.43.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
408
408
|
return binding;
|
|
409
409
|
} catch (e) {
|
|
410
410
|
loadErrors.push(e);
|
|
@@ -418,7 +418,7 @@ function requireNative() {
|
|
|
418
418
|
try {
|
|
419
419
|
const binding = require("@oxfmt/binding-openharmony-arm");
|
|
420
420
|
const bindingPackageVersion = require("@oxfmt/binding-openharmony-arm/package.json").version;
|
|
421
|
-
if (bindingPackageVersion !== "0.
|
|
421
|
+
if (bindingPackageVersion !== "0.43.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.43.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
422
422
|
return binding;
|
|
423
423
|
} catch (e) {
|
|
424
424
|
loadErrors.push(e);
|
package/dist/cli-worker.d.ts
CHANGED
|
@@ -593,10 +593,9 @@ type FormatEmbeddedCodeParam = {
|
|
|
593
593
|
options: Options$1;
|
|
594
594
|
};
|
|
595
595
|
/**
|
|
596
|
-
* Format
|
|
597
|
-
*
|
|
598
|
-
*
|
|
599
|
-
* For now, html|css|md-in-js are using this.
|
|
596
|
+
* Format non-js code snippets into formatted string.
|
|
597
|
+
* Mainly used for formatting code fences within JSDoc,
|
|
598
|
+
* and is also used as a temporary fallback for html-in-js.
|
|
600
599
|
*
|
|
601
600
|
* @returns Formatted code snippet
|
|
602
601
|
*/
|
|
@@ -609,15 +608,15 @@ type FormatEmbeddedDocParam = {
|
|
|
609
608
|
options: Options$1;
|
|
610
609
|
};
|
|
611
610
|
/**
|
|
612
|
-
* Format
|
|
611
|
+
* Format non-js code snippets into Prettier `Doc` JSON strings.
|
|
613
612
|
*
|
|
614
|
-
* This makes
|
|
613
|
+
* This makes our printer correctly handle `printWidth` even for embedded code.
|
|
615
614
|
* - For gql-in-js, `texts` contains multiple parts split by `${}` in a template literal
|
|
616
615
|
* - For others, `texts` always contains a single string with `${}` parts replaced by placeholders
|
|
617
616
|
* However, this function does not need to be aware of that,
|
|
618
617
|
* as it simply formats each text part independently and returns an array of formatted parts.
|
|
619
618
|
*
|
|
620
|
-
* @returns Doc JSON strings
|
|
619
|
+
* @returns Doc JSON strings
|
|
621
620
|
*/
|
|
622
621
|
declare function formatEmbeddedDoc({
|
|
623
622
|
texts,
|
package/dist/cli-worker.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as sortTailwindClasses, n as formatEmbeddedDoc, r as formatFile, t as formatEmbeddedCode } from "./apis-
|
|
1
|
+
import { a as sortTailwindClasses, n as formatEmbeddedDoc, r as formatFile, t as formatEmbeddedCode } from "./apis-mHnrEtPz.js";
|
|
2
2
|
export { formatEmbeddedCode, formatEmbeddedDoc, formatFile, sortTailwindClasses };
|
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as runCli } from "./bindings-
|
|
2
|
-
import { i as resolvePlugins } from "./apis-
|
|
1
|
+
import { r as runCli } from "./bindings-mh4tfrCL.js";
|
|
2
|
+
import { i as resolvePlugins } from "./apis-mHnrEtPz.js";
|
|
3
3
|
import Tinypool from "tinypool";
|
|
4
4
|
import { basename } from "node:path";
|
|
5
5
|
import { pathToFileURL } from "node:url";
|
|
@@ -97,7 +97,7 @@ async function loadJsConfig(path) {
|
|
|
97
97
|
return;
|
|
98
98
|
}
|
|
99
99
|
if (mode === "migrate:prettier") {
|
|
100
|
-
await import("./migrate-prettier-
|
|
100
|
+
await import("./migrate-prettier-CpiJRvlG.js").then((m) => m.runMigratePrettier());
|
|
101
101
|
return;
|
|
102
102
|
}
|
|
103
103
|
if (mode === "migrate:biome") {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { a as __toESM, t as __commonJSMin } from "./chunk-DSjvVL_1-BYdvZw3N.js";
|
|
2
|
-
import { n as loadIfExists, r as maybeResolve, t as expiringMap } from "./resolve-pWjAK-4f-
|
|
2
|
+
import { n as loadIfExists, r as maybeResolve, t as expiringMap } from "./resolve-pWjAK-4f-ColMfOaZ.js";
|
|
3
3
|
import { i as visit, n as cacheForDirs, r as spliceChangesIntoString } from "./utils-D8dQkKEd-BtAa7w-M.js";
|
|
4
|
-
import { a as sortClasses, i as sortClassList, n as error, o as warn, r as getTailwindConfig$1 } from "./sorter-BZkvDMjt-
|
|
4
|
+
import { a as sortClasses, i as sortClassList, n as error, o as warn, r as getTailwindConfig$1 } from "./sorter-BZkvDMjt-BJdi7rG8.js";
|
|
5
5
|
import { parsers as sn } from "./angular-BS7_jn7o.js";
|
|
6
|
-
import { parsers as ra, t as babel_exports } from "./babel-
|
|
6
|
+
import { parsers as ra, t as babel_exports } from "./babel-Fkr5EfJ9.js";
|
|
7
7
|
import { parsers as en, t as postcss_exports } from "./postcss-k2aCwkzC.js";
|
|
8
|
-
import index_exports from "./prettier-
|
|
8
|
+
import index_exports from "./prettier-Dwwk1Fyx.js";
|
|
9
9
|
import * as path from "node:path";
|
|
10
10
|
import { isAbsolute } from "path";
|
|
11
11
|
//#region ../../node_modules/.pnpm/prettier-plugin-tailwindcss@0.0.0-insiders.3997fbd_prettier@3.8.1/node_modules/prettier-plugin-tailwindcss/dist/index.mjs
|
|
@@ -1094,7 +1094,7 @@ const { parsers, printers } = createPlugin([
|
|
|
1094
1094
|
__js_expression: { load: [babel_exports] },
|
|
1095
1095
|
typescript: { load: [{
|
|
1096
1096
|
name: "prettier/plugins/typescript",
|
|
1097
|
-
importer: () => import("./typescript-
|
|
1097
|
+
importer: () => import("./typescript-G7g7T3yt.js")
|
|
1098
1098
|
}] },
|
|
1099
1099
|
meriyah: { load: [{
|
|
1100
1100
|
name: "prettier/plugins/meriyah",
|
|
@@ -342,6 +342,7 @@ var Ce = At, H = class {
|
|
|
342
342
|
DirectiveCoordinate: ["name"],
|
|
343
343
|
DirectiveArgumentCoordinate: ["name", "argumentName"]
|
|
344
344
|
};
|
|
345
|
+
new Set(Object.keys(ce));
|
|
345
346
|
var C;
|
|
346
347
|
(function(e) {
|
|
347
348
|
e.QUERY = "query", e.MUTATION = "mutation", e.SUBSCRIPTION = "subscription";
|
package/dist/index.d.ts
CHANGED
|
@@ -28,12 +28,15 @@ type ArrowParensConfig = "always" | "avoid";
|
|
|
28
28
|
type EmbeddedLanguageFormattingConfig = "auto" | "off";
|
|
29
29
|
type EndOfLineConfig = "lf" | "crlf" | "cr";
|
|
30
30
|
type HtmlWhitespaceSensitivityConfig = "css" | "strict" | "ignore";
|
|
31
|
+
type JsdocUserConfig = boolean | JsdocConfig;
|
|
31
32
|
type ObjectWrapConfig = "preserve" | "collapse";
|
|
32
33
|
type ProseWrapConfig = "always" | "never" | "preserve";
|
|
33
34
|
type QuotePropsConfig = "as-needed" | "consistent" | "preserve";
|
|
35
|
+
type SortImportsUserConfig = boolean | SortImportsConfig;
|
|
34
36
|
type SortGroupItemConfig = NewlinesBetweenMarker | string | string[];
|
|
35
37
|
type SortOrderConfig = "asc" | "desc";
|
|
36
38
|
type SortPackageJsonUserConfig = boolean | SortPackageJsonConfig;
|
|
39
|
+
type SortTailwindcssUserConfig = boolean | SortTailwindcssConfig;
|
|
37
40
|
type TrailingCommaConfig = "all" | "es5" | "none";
|
|
38
41
|
/**
|
|
39
42
|
* Configuration options for the Oxfmt.
|
|
@@ -105,11 +108,11 @@ interface Oxfmtrc {
|
|
|
105
108
|
* tag aliases are canonicalized, descriptions are capitalized,
|
|
106
109
|
* long lines are wrapped, and short comments are collapsed to single-line.
|
|
107
110
|
*
|
|
108
|
-
* Pass an object
|
|
111
|
+
* Pass `true` or an object to enable with defaults, or omit/set `false` to disable.
|
|
109
112
|
*
|
|
110
113
|
* - Default: Disabled
|
|
111
114
|
*/
|
|
112
|
-
jsdoc?:
|
|
115
|
+
jsdoc?: JsdocUserConfig;
|
|
113
116
|
/**
|
|
114
117
|
* Use single quotes instead of double quotes in JSX.
|
|
115
118
|
*
|
|
@@ -183,9 +186,11 @@ interface Oxfmtrc {
|
|
|
183
186
|
* Using the similar algorithm as [eslint-plugin-perfectionist/sort-imports](https://perfectionist.dev/rules/sort-imports).
|
|
184
187
|
* For details, see each field's documentation.
|
|
185
188
|
*
|
|
189
|
+
* Pass `true` or an object to enable with defaults, or omit/set `false` to disable.
|
|
190
|
+
*
|
|
186
191
|
* - Default: Disabled
|
|
187
192
|
*/
|
|
188
|
-
sortImports?:
|
|
193
|
+
sortImports?: SortImportsUserConfig;
|
|
189
194
|
/**
|
|
190
195
|
* Sort `package.json` keys.
|
|
191
196
|
*
|
|
@@ -203,9 +208,11 @@ interface Oxfmtrc {
|
|
|
203
208
|
* Option names omit the `tailwind` prefix used in the original plugin (e.g., `config` instead of `tailwindConfig`).
|
|
204
209
|
* For details, see each field's documentation.
|
|
205
210
|
*
|
|
211
|
+
* Pass `true` or an object to enable with defaults, or omit/set `false` to disable.
|
|
212
|
+
*
|
|
206
213
|
* - Default: Disabled
|
|
207
214
|
*/
|
|
208
|
-
sortTailwindcss?:
|
|
215
|
+
sortTailwindcss?: SortTailwindcssUserConfig;
|
|
209
216
|
/**
|
|
210
217
|
* Specify the number of spaces per indentation-level.
|
|
211
218
|
*
|
|
@@ -385,11 +392,11 @@ interface FormatConfig {
|
|
|
385
392
|
* tag aliases are canonicalized, descriptions are capitalized,
|
|
386
393
|
* long lines are wrapped, and short comments are collapsed to single-line.
|
|
387
394
|
*
|
|
388
|
-
* Pass an object
|
|
395
|
+
* Pass `true` or an object to enable with defaults, or omit/set `false` to disable.
|
|
389
396
|
*
|
|
390
397
|
* - Default: Disabled
|
|
391
398
|
*/
|
|
392
|
-
jsdoc?:
|
|
399
|
+
jsdoc?: JsdocUserConfig;
|
|
393
400
|
/**
|
|
394
401
|
* Use single quotes instead of double quotes in JSX.
|
|
395
402
|
*
|
|
@@ -456,9 +463,11 @@ interface FormatConfig {
|
|
|
456
463
|
* Using the similar algorithm as [eslint-plugin-perfectionist/sort-imports](https://perfectionist.dev/rules/sort-imports).
|
|
457
464
|
* For details, see each field's documentation.
|
|
458
465
|
*
|
|
466
|
+
* Pass `true` or an object to enable with defaults, or omit/set `false` to disable.
|
|
467
|
+
*
|
|
459
468
|
* - Default: Disabled
|
|
460
469
|
*/
|
|
461
|
-
sortImports?:
|
|
470
|
+
sortImports?: SortImportsUserConfig;
|
|
462
471
|
/**
|
|
463
472
|
* Sort `package.json` keys.
|
|
464
473
|
*
|
|
@@ -476,9 +485,11 @@ interface FormatConfig {
|
|
|
476
485
|
* Option names omit the `tailwind` prefix used in the original plugin (e.g., `config` instead of `tailwindConfig`).
|
|
477
486
|
* For details, see each field's documentation.
|
|
478
487
|
*
|
|
488
|
+
* Pass `true` or an object to enable with defaults, or omit/set `false` to disable.
|
|
489
|
+
*
|
|
479
490
|
* - Default: Disabled
|
|
480
491
|
*/
|
|
481
|
-
sortTailwindcss?:
|
|
492
|
+
sortTailwindcss?: SortTailwindcssUserConfig;
|
|
482
493
|
/**
|
|
483
494
|
* Specify the number of spaces per indentation-level.
|
|
484
495
|
*
|
|
@@ -773,4 +784,4 @@ declare function format(fileName: string, sourceText: string, options?: FormatCo
|
|
|
773
784
|
*/
|
|
774
785
|
declare function jsTextToDoc(sourceExt: string, sourceText: string, oxfmtPluginOptionsJson: string, parentContext: string): Promise<string | null>;
|
|
775
786
|
//#endregion
|
|
776
|
-
export { ArrowParensConfig, CustomGroupItemConfig, EmbeddedLanguageFormattingConfig, EndOfLineConfig, FormatConfig, FormatOptions, HtmlWhitespaceSensitivityConfig, JsdocConfig, NewlinesBetweenMarker, ObjectWrapConfig, OxfmtConfig, OxfmtOverrideConfig, Oxfmtrc, ProseWrapConfig, QuotePropsConfig, SortGroupItemConfig, SortImportsConfig, SortImportsOptions, SortOrderConfig, SortPackageJsonConfig, SortPackageJsonOptions, SortPackageJsonUserConfig, SortTailwindcssConfig, SortTailwindcssOptions, TailwindcssOptions, TrailingCommaConfig, defineConfig, format, jsTextToDoc };
|
|
787
|
+
export { ArrowParensConfig, CustomGroupItemConfig, EmbeddedLanguageFormattingConfig, EndOfLineConfig, FormatConfig, FormatOptions, HtmlWhitespaceSensitivityConfig, JsdocConfig, JsdocUserConfig, NewlinesBetweenMarker, ObjectWrapConfig, OxfmtConfig, OxfmtOverrideConfig, Oxfmtrc, ProseWrapConfig, QuotePropsConfig, SortGroupItemConfig, SortImportsConfig, SortImportsOptions, SortImportsUserConfig, SortOrderConfig, SortPackageJsonConfig, SortPackageJsonOptions, SortPackageJsonUserConfig, SortTailwindcssConfig, SortTailwindcssOptions, SortTailwindcssUserConfig, TailwindcssOptions, TrailingCommaConfig, defineConfig, 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 { a as sortTailwindClasses, i as resolvePlugins, n as formatEmbeddedDoc, r as formatFile, t as formatEmbeddedCode } from "./apis-
|
|
1
|
+
import { n as jsTextToDoc$1, t as format$1 } from "./bindings-mh4tfrCL.js";
|
|
2
|
+
import { a as sortTailwindClasses, i as resolvePlugins, n as formatEmbeddedDoc, r as formatFile, t as formatEmbeddedCode } from "./apis-mHnrEtPz.js";
|
|
3
3
|
//#region src-js/index.ts
|
|
4
4
|
/**
|
|
5
5
|
* Define an oxfmt configuration with type inference.
|
|
@@ -19499,11 +19499,11 @@ var require_babel = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
19499
19499
|
if (Array.isArray(e)) return (t) => ParseErrorEnum(t, e[0]);
|
|
19500
19500
|
const r = {};
|
|
19501
19501
|
for (const n of Object.keys(e)) {
|
|
19502
|
-
const s = e[n], i = "string" == typeof s ? { message: () => s } : "function" == typeof s ? { message: s } : s, { message: o } = i, a = _objectWithoutPropertiesLoose(i, p)
|
|
19502
|
+
const s = e[n], i = "string" == typeof s ? { message: () => s } : "function" == typeof s ? { message: s } : s, { message: o } = i, a = _objectWithoutPropertiesLoose(i, p);
|
|
19503
19503
|
r[n] = toParseErrorConstructor(Object.assign({
|
|
19504
19504
|
code: "BABEL_PARSER_SYNTAX_ERROR",
|
|
19505
19505
|
reasonCode: n,
|
|
19506
|
-
toMessage:
|
|
19506
|
+
toMessage: "string" == typeof o ? () => o : o
|
|
19507
19507
|
}, t ? { syntaxPlugin: t } : {}, a));
|
|
19508
19508
|
}
|
|
19509
19509
|
return r;
|
|
@@ -31757,10 +31757,7 @@ var require_babel = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
31757
31757
|
for (let t = 0; t < e.length; t++) {
|
|
31758
31758
|
const r = e[t];
|
|
31759
31759
|
let n;
|
|
31760
|
-
if (r ? "object" != typeof r ? n = "contains a non-object node" : r.type ? r instanceof s.default && (n = "has a NodePath when it expected a raw object") : n = "without a type" : n = "has falsy node", n) {
|
|
31761
|
-
const e = Array.isArray(r) ? "array" : typeof r;
|
|
31762
|
-
throw new Error(`Node list ${n} with the index of ${t} and type of ${e}`);
|
|
31763
|
-
}
|
|
31760
|
+
if (r ? "object" != typeof r ? n = "contains a non-object node" : r.type ? r instanceof s.default && (n = "has a NodePath when it expected a raw object") : n = "without a type" : n = "has falsy node", n) throw new Error(`Node list ${n} with the index of ${t} and type of ${Array.isArray(r) ? "array" : typeof r}`);
|
|
31764
31761
|
}
|
|
31765
31762
|
return e;
|
|
31766
31763
|
}
|
|
@@ -9,7 +9,7 @@ import { readFile } from "node:fs/promises";
|
|
|
9
9
|
async function runMigratePrettier() {
|
|
10
10
|
const cwd = process.cwd();
|
|
11
11
|
if (await hasOxfmtrcFile(cwd)) return exitWithError("Oxfmt configuration file already exists.");
|
|
12
|
-
const { resolveConfigFile, resolveConfig } = await import("./prettier-
|
|
12
|
+
const { resolveConfigFile, resolveConfig } = await import("./prettier-Dwwk1Fyx.js");
|
|
13
13
|
const prettierConfigPath = await resolveConfigFile(join(cwd, "dummy.js"));
|
|
14
14
|
if (!prettierConfigPath) {
|
|
15
15
|
console.log("No Prettier configuration file found.");
|
|
@@ -11340,7 +11340,7 @@ async function loadConfigFromPackageYaml(file) {
|
|
|
11340
11340
|
var parseYaml;
|
|
11341
11341
|
async function loadYaml(file) {
|
|
11342
11342
|
const content = await read_file_default(file);
|
|
11343
|
-
if (!parseYaml) ({__parsePrettierYamlConfig: parseYaml} = await import("./yaml-
|
|
11343
|
+
if (!parseYaml) ({__parsePrettierYamlConfig: parseYaml} = await import("./yaml-BID5Twob.js"));
|
|
11344
11344
|
try {
|
|
11345
11345
|
return parseYaml(content);
|
|
11346
11346
|
} catch (error) {
|
|
@@ -15192,7 +15192,7 @@ var { parsers, printers } = createParsersAndPrinters([
|
|
|
15192
15192
|
]
|
|
15193
15193
|
},
|
|
15194
15194
|
{
|
|
15195
|
-
importPlugin: () => import("./babel-
|
|
15195
|
+
importPlugin: () => import("./babel-Fkr5EfJ9.js"),
|
|
15196
15196
|
parsers: [
|
|
15197
15197
|
"babel",
|
|
15198
15198
|
"babel-flow",
|
|
@@ -15220,7 +15220,7 @@ var { parsers, printers } = createParsersAndPrinters([
|
|
|
15220
15220
|
printers: ["glimmer"]
|
|
15221
15221
|
},
|
|
15222
15222
|
{
|
|
15223
|
-
importPlugin: () => import("./graphql-
|
|
15223
|
+
importPlugin: () => import("./graphql-BTqRh-7l.js"),
|
|
15224
15224
|
parsers: ["graphql"],
|
|
15225
15225
|
printers: ["graphql"]
|
|
15226
15226
|
},
|
|
@@ -15258,11 +15258,11 @@ var { parsers, printers } = createParsersAndPrinters([
|
|
|
15258
15258
|
printers: ["postcss"]
|
|
15259
15259
|
},
|
|
15260
15260
|
{
|
|
15261
|
-
importPlugin: () => import("./typescript-
|
|
15261
|
+
importPlugin: () => import("./typescript-G7g7T3yt.js"),
|
|
15262
15262
|
parsers: ["typescript"]
|
|
15263
15263
|
},
|
|
15264
15264
|
{
|
|
15265
|
-
importPlugin: () => import("./yaml-
|
|
15265
|
+
importPlugin: () => import("./yaml-BID5Twob.js"),
|
|
15266
15266
|
parsers: ["yaml"],
|
|
15267
15267
|
printers: ["yaml"]
|
|
15268
15268
|
}
|
|
@@ -4116,8 +4116,7 @@ var import_lib = (/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4116
4116
|
};
|
|
4117
4117
|
}
|
|
4118
4118
|
const mergeExports = (obj, exports$1) => {
|
|
4119
|
-
|
|
4120
|
-
Object.defineProperties(obj, descriptors);
|
|
4119
|
+
Object.defineProperties(obj, Object.getOwnPropertyDescriptors(exports$1));
|
|
4121
4120
|
return Object.freeze(obj);
|
|
4122
4121
|
};
|
|
4123
4122
|
module.exports = mergeExports(resolve, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as resolveJsFrom, t as expiringMap } from "./resolve-pWjAK-4f-
|
|
1
|
+
import { a as resolveJsFrom, t as expiringMap } from "./resolve-pWjAK-4f-ColMfOaZ.js";
|
|
2
2
|
import { n as cacheForDirs, t as bigSign } from "./utils-D8dQkKEd-BtAa7w-M.js";
|
|
3
3
|
import * as path from "node:path";
|
|
4
4
|
import { pathToFileURL } from "node:url";
|
|
@@ -103,14 +103,14 @@ async function getTailwindConfig(options) {
|
|
|
103
103
|
if (!stylesheet && !(mod === null || mod === void 0 ? void 0 : mod.__unstable__loadDesignSystem)) jsConfig = jsConfig ?? findClosestJsConfig(inputDir);
|
|
104
104
|
if (jsConfig) {
|
|
105
105
|
if (!stylesheet) return pathToApiMap.remember(`${pkgDir}:${jsConfig}`, async () => {
|
|
106
|
-
const { loadV3 } = await import("./v3-D-mr2VVh-
|
|
106
|
+
const { loadV3 } = await import("./v3-D-mr2VVh-CisVsFM0.js");
|
|
107
107
|
return loadV3(pkgDir, jsConfig);
|
|
108
108
|
});
|
|
109
109
|
error("explicit-stylesheet-and-config-together", base, `You have specified a Tailwind CSS stylesheet and a Tailwind CSS config at the same time. Use stylesheetPath unless you are using v3. Preferring the stylesheet.`);
|
|
110
110
|
}
|
|
111
111
|
if (mod && !mod.__unstable__loadDesignSystem) {
|
|
112
112
|
if (!stylesheet) return pathToApiMap.remember(`${pkgDir}:${jsConfig}`, async () => {
|
|
113
|
-
const { loadV3 } = await import("./v3-D-mr2VVh-
|
|
113
|
+
const { loadV3 } = await import("./v3-D-mr2VVh-CisVsFM0.js");
|
|
114
114
|
return loadV3(pkgDir, jsConfig);
|
|
115
115
|
});
|
|
116
116
|
mod = null;
|
|
@@ -118,7 +118,7 @@ async function getTailwindConfig(options) {
|
|
|
118
118
|
}
|
|
119
119
|
if (mod && mod.__unstable__loadDesignSystem && pkgDir) stylesheet ?? (stylesheet = `${pkgDir}/theme.css`);
|
|
120
120
|
return pathToApiMap.remember(`${pkgDir}:${stylesheet}`, async () => {
|
|
121
|
-
const { loadV4 } = await import("./v4-C-HWEQJm-
|
|
121
|
+
const { loadV4 } = await import("./v4-C-HWEQJm-CbHL6UrB.js");
|
|
122
122
|
return loadV4(mod, stylesheet);
|
|
123
123
|
});
|
|
124
124
|
}
|
|
@@ -11499,7 +11499,9 @@ var qp = [
|
|
|
11499
11499
|
"wasi",
|
|
11500
11500
|
"worker_threads",
|
|
11501
11501
|
"zlib"
|
|
11502
|
-
]
|
|
11502
|
+
];
|
|
11503
|
+
new Set(qp);
|
|
11504
|
+
var Ab = new Set([
|
|
11503
11505
|
"node:sea",
|
|
11504
11506
|
"node:sqlite",
|
|
11505
11507
|
"node:test",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as __toESM, i as __require, n as __esmMin, t as __commonJSMin } from "./chunk-DSjvVL_1-BYdvZw3N.js";
|
|
2
2
|
import { t as bigSign } from "./utils-D8dQkKEd-BtAa7w-M.js";
|
|
3
|
-
import { t as createJiti } from "./jiti-Bb1dT6Cw-
|
|
3
|
+
import { t as createJiti } from "./jiti-Bb1dT6Cw-CnTrJOrf.js";
|
|
4
4
|
import * as path from "node:path";
|
|
5
5
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
6
6
|
//#region ../../node_modules/.pnpm/prettier-plugin-tailwindcss@0.0.0-insiders.3997fbd_prettier@3.8.1/node_modules/prettier-plugin-tailwindcss/dist/v3-D-mr2VVh.mjs
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as __exportAll } from "./chunk-DSjvVL_1-BYdvZw3N.js";
|
|
2
|
-
import { a as resolveJsFrom, i as resolveCssFrom } from "./resolve-pWjAK-4f-
|
|
3
|
-
import { t as createJiti } from "./jiti-Bb1dT6Cw-
|
|
2
|
+
import { a as resolveJsFrom, i as resolveCssFrom } from "./resolve-pWjAK-4f-ColMfOaZ.js";
|
|
3
|
+
import { t as createJiti } from "./jiti-Bb1dT6Cw-CnTrJOrf.js";
|
|
4
4
|
import * as path from "node:path";
|
|
5
5
|
import { pathToFileURL } from "node:url";
|
|
6
6
|
import * as fs from "node:fs/promises";
|
|
@@ -5109,8 +5109,8 @@ var Zn, er = class {
|
|
|
5109
5109
|
}
|
|
5110
5110
|
#n(e) {
|
|
5111
5111
|
if (!Zn) {
|
|
5112
|
-
let [o] = this.#e
|
|
5113
|
-
Zn = Object.getOwnPropertyDescriptor(
|
|
5112
|
+
let [o] = this.#e;
|
|
5113
|
+
Zn = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(o)), "rangeAsLinePos").get;
|
|
5114
5114
|
}
|
|
5115
5115
|
if (this.#t ?? (this.#t = { root: { context: { src: this.text } } }), this.text === "" && e.origStart === 0 && e.origEnd === 0) return {
|
|
5116
5116
|
start: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oxfmt",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.43.0",
|
|
4
4
|
"description": "Formatter for the JavaScript Oxidation Compiler",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"formatter",
|
|
@@ -67,24 +67,24 @@
|
|
|
67
67
|
},
|
|
68
68
|
"preferUnplugged": true,
|
|
69
69
|
"optionalDependencies": {
|
|
70
|
-
"@oxfmt/binding-darwin-arm64": "0.
|
|
71
|
-
"@oxfmt/binding-android-arm64": "0.
|
|
72
|
-
"@oxfmt/binding-win32-arm64-msvc": "0.
|
|
73
|
-
"@oxfmt/binding-linux-arm64-gnu": "0.
|
|
74
|
-
"@oxfmt/binding-linux-arm64-musl": "0.
|
|
75
|
-
"@oxfmt/binding-openharmony-arm64": "0.
|
|
76
|
-
"@oxfmt/binding-android-arm-eabi": "0.
|
|
77
|
-
"@oxfmt/binding-linux-arm-gnueabihf": "0.
|
|
78
|
-
"@oxfmt/binding-linux-arm-musleabihf": "0.
|
|
79
|
-
"@oxfmt/binding-win32-ia32-msvc": "0.
|
|
80
|
-
"@oxfmt/binding-linux-ppc64-gnu": "0.
|
|
81
|
-
"@oxfmt/binding-linux-riscv64-gnu": "0.
|
|
82
|
-
"@oxfmt/binding-linux-riscv64-musl": "0.
|
|
83
|
-
"@oxfmt/binding-linux-s390x-gnu": "0.
|
|
84
|
-
"@oxfmt/binding-darwin-x64": "0.
|
|
85
|
-
"@oxfmt/binding-win32-x64-msvc": "0.
|
|
86
|
-
"@oxfmt/binding-freebsd-x64": "0.
|
|
87
|
-
"@oxfmt/binding-linux-x64-gnu": "0.
|
|
88
|
-
"@oxfmt/binding-linux-x64-musl": "0.
|
|
70
|
+
"@oxfmt/binding-darwin-arm64": "0.43.0",
|
|
71
|
+
"@oxfmt/binding-android-arm64": "0.43.0",
|
|
72
|
+
"@oxfmt/binding-win32-arm64-msvc": "0.43.0",
|
|
73
|
+
"@oxfmt/binding-linux-arm64-gnu": "0.43.0",
|
|
74
|
+
"@oxfmt/binding-linux-arm64-musl": "0.43.0",
|
|
75
|
+
"@oxfmt/binding-openharmony-arm64": "0.43.0",
|
|
76
|
+
"@oxfmt/binding-android-arm-eabi": "0.43.0",
|
|
77
|
+
"@oxfmt/binding-linux-arm-gnueabihf": "0.43.0",
|
|
78
|
+
"@oxfmt/binding-linux-arm-musleabihf": "0.43.0",
|
|
79
|
+
"@oxfmt/binding-win32-ia32-msvc": "0.43.0",
|
|
80
|
+
"@oxfmt/binding-linux-ppc64-gnu": "0.43.0",
|
|
81
|
+
"@oxfmt/binding-linux-riscv64-gnu": "0.43.0",
|
|
82
|
+
"@oxfmt/binding-linux-riscv64-musl": "0.43.0",
|
|
83
|
+
"@oxfmt/binding-linux-s390x-gnu": "0.43.0",
|
|
84
|
+
"@oxfmt/binding-darwin-x64": "0.43.0",
|
|
85
|
+
"@oxfmt/binding-win32-x64-msvc": "0.43.0",
|
|
86
|
+
"@oxfmt/binding-freebsd-x64": "0.43.0",
|
|
87
|
+
"@oxfmt/binding-linux-x64-gnu": "0.43.0",
|
|
88
|
+
"@oxfmt/binding-linux-x64-musl": "0.43.0"
|
|
89
89
|
}
|
|
90
90
|
}
|
package/dist/sorter-DFoFc7QW.js
DELETED