oxfmt 0.48.0 → 0.50.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.
Files changed (50) hide show
  1. package/configuration_schema.json +70 -12
  2. package/dist/acorn-sBRpswSh.js +4972 -0
  3. package/dist/angular-DtI-eDW8.js +4004 -0
  4. package/dist/{apis-hnICGpKH.js → apis-CKvPKBJI.js} +51 -5
  5. package/dist/babel-DaNjvh9L.js +9885 -0
  6. package/dist/{bindings-DSOLttxo.js → bindings-Dj_YoR0Z.js} +26 -26
  7. package/dist/cli-worker.js +1 -1
  8. package/dist/cli.js +5 -5
  9. package/dist/{dist-DBVLDX4Z.js → dist-D_YbN99t.js} +19 -17
  10. package/dist/{estree-CvnLDdmw.js → estree-CzfNsl8m.js} +1914 -1911
  11. package/dist/flow-c9AjoQam.js +52916 -0
  12. package/dist/glimmer-D_zkI0w_.js +7533 -0
  13. package/dist/graphql-BFXkB4Nq.js +1944 -0
  14. package/dist/html-DkcPxRXg.js +7139 -0
  15. package/dist/index.d.ts +61 -5
  16. package/dist/index.js +2 -2
  17. package/dist/{init-BbKOMZ57.js → init-C3nxU_Wc.js} +1 -1
  18. package/dist/{jiti-Bb1dT6Cw-DpVi6yB1.js → jiti-Bb1dT6Cw-C0N20Za1.js} +5 -7
  19. package/dist/markdown-DVLNmbQg.js +6880 -0
  20. package/dist/{meriyah-CIaAh_Jq.js → meriyah-BGPf00Rn.js} +4649 -4647
  21. package/dist/{migrate-biome-BMqs7-eg.js → migrate-biome-DclTzwKW.js} +1 -1
  22. package/dist/{migrate-prettier-mSf_N9fW.js → migrate-prettier-DLfviW85.js} +2 -2
  23. package/dist/plugin-DOdiccQR.js +1914 -0
  24. package/dist/postcss-D-ql-dm8.js +6788 -0
  25. package/dist/prettier-Cw36juP9.js +15601 -0
  26. package/dist/{prettier-plugin-oxfmt-CLoiASgP.js → prettier-plugin-oxfmt-BlJcmKAv.js} +38 -3
  27. package/dist/{resolve-pWjAK-4f-BnvQ49el.js → sorter-BZkvDMjt-DpGe0QK9.js} +325 -4
  28. package/dist/{sorter-C3ZRVYzK.js → sorter-w0dgpoFw.js} +1 -2
  29. package/dist/typescript-C_eN_ThF.js +22899 -0
  30. package/dist/{v3-D-mr2VVh-DA8uo048.js → v3-D-mr2VVh-CU7hQIit.js} +3 -4
  31. package/dist/{v4-C-HWEQJm-olIGVWd7.js → v4-C-HWEQJm-C8EWwksG.js} +3 -4
  32. package/dist/yaml-Bqxyk-13.js +5280 -0
  33. package/package.json +28 -20
  34. package/dist/acorn-K_XpABqm.js +0 -4968
  35. package/dist/angular-B2OHapHD.js +0 -4057
  36. package/dist/babel-DA0BK-9N.js +0 -9883
  37. package/dist/chunk-DSjvVL_1-DvmJ8i3j.js +0 -36
  38. package/dist/chunk-DrSxFLj_.js +0 -14
  39. package/dist/flow-BthqNux8.js +0 -52912
  40. package/dist/glimmer-0WQITj6v.js +0 -7541
  41. package/dist/graphql-CZVKp936.js +0 -1945
  42. package/dist/html-CC61hPUL.js +0 -7137
  43. package/dist/markdown-BkJWkmO_.js +0 -6876
  44. package/dist/postcss-C8WoCp9x.js +0 -6785
  45. package/dist/prettier-DpEoE-3g.js +0 -15596
  46. package/dist/sorter-BZkvDMjt-CgLjPuXI.js +0 -212
  47. package/dist/typescript-Cg8onQ4r.js +0 -22936
  48. package/dist/utils-D8dQkKEd-CoIwOuFZ.js +0 -81
  49. package/dist/yaml-CTxkSwZx.js +0 -5281
  50. /package/dist/{shared-BTEY2VsW.js → shared-BtJbjkue.js} +0 -0
@@ -1,6 +1,43 @@
1
+ import { createRequire } from "node:module";
2
+ //#region \0rolldown/runtime.js
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __esmMin = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
10
+ var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
11
+ var __exportAll = (all, no_symbols) => {
12
+ let target = {};
13
+ for (var name in all) __defProp(target, name, {
14
+ get: all[name],
15
+ enumerable: true
16
+ });
17
+ if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
18
+ return target;
19
+ };
20
+ var __copyProps = (to, from, except, desc) => {
21
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
22
+ key = keys[i];
23
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
24
+ get: ((k) => from[k]).bind(null, key),
25
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
26
+ });
27
+ }
28
+ return to;
29
+ };
30
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
31
+ value: mod,
32
+ enumerable: true
33
+ }) : target, mod));
34
+ var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
35
+ var __require = /* @__PURE__ */ createRequire(import.meta.url);
36
+ //#endregion
1
37
  //#region src-js/libs/apis.ts
2
38
  const CACHES = {
3
39
  prettier: null,
40
+ sveltePlugin: null,
4
41
  tailwindPlugin: null,
5
42
  tailwindSorter: null,
6
43
  oxfmtPlugin: null
@@ -11,7 +48,7 @@ async function loadCached(key, loader) {
11
48
  }
12
49
  async function loadPrettier() {
13
50
  return loadCached("prettier", async () => {
14
- const prettier = await import("./prettier-DpEoE-3g.js");
51
+ const prettier = await import("./prettier-Cw36juP9.js");
15
52
  const { formatOptionsHiddenDefaults } = prettier.__internal;
16
53
  formatOptionsHiddenDefaults.parentParser = null;
17
54
  formatOptionsHiddenDefaults.__onHtmlRoot = null;
@@ -37,6 +74,7 @@ async function resolvePlugins() {
37
74
  */
38
75
  async function formatFile({ code, options }) {
39
76
  const prettier = CACHES.prettier ?? await loadPrettier();
77
+ if ("_useSveltePlugin" in options) await setupSveltePlugin(options);
40
78
  if ("_useTailwindPlugin" in options) await setupTailwindPlugin(options);
41
79
  if ("_oxfmtPluginOptionsJson" in options) await setupOxfmtPlugin(options);
42
80
  return prettier.format(code, options);
@@ -92,7 +130,7 @@ async function formatEmbeddedDoc({ texts, options }) {
92
130
  * Option mapping (sortTailwindcss.xxx → tailwindXxx) is also done in Rust side.
93
131
  */
94
132
  async function setupTailwindPlugin(options) {
95
- CACHES.tailwindPlugin ??= await loadCached("tailwindPlugin", () => import("./dist-DBVLDX4Z.js"));
133
+ CACHES.tailwindPlugin ??= await loadCached("tailwindPlugin", () => import("./dist-D_YbN99t.js"));
96
134
  options.plugins ??= [];
97
135
  options.plugins.push(CACHES.tailwindPlugin);
98
136
  }
@@ -102,7 +140,7 @@ async function setupTailwindPlugin(options) {
102
140
  * @returns Array of sorted class strings (same order/length as input)
103
141
  */
104
142
  async function sortTailwindClasses({ classes, options }) {
105
- CACHES.tailwindSorter ??= await loadCached("tailwindSorter", () => import("./sorter-C3ZRVYzK.js"));
143
+ CACHES.tailwindSorter ??= await loadCached("tailwindSorter", () => import("./sorter-w0dgpoFw.js"));
106
144
  const { createSorter } = CACHES.tailwindSorter;
107
145
  return (await createSorter({
108
146
  filepath: options.filepath,
@@ -113,12 +151,20 @@ async function sortTailwindClasses({ classes, options }) {
113
151
  })).sortClassAttributes(classes);
114
152
  }
115
153
  /**
154
+ * Load prettier-plugin-svelte to provide the `svelte` parser.
155
+ */
156
+ async function setupSveltePlugin(options) {
157
+ CACHES.sveltePlugin ??= await loadCached("sveltePlugin", async () => await import("./plugin-DOdiccQR.js").then((m) => /* @__PURE__ */ __toESM(m.default, 1)));
158
+ options.plugins ??= [];
159
+ options.plugins.push(CACHES.sveltePlugin);
160
+ }
161
+ /**
116
162
  * Load oxfmt plugin for js-in-xxx parsers.
117
163
  */
118
164
  async function setupOxfmtPlugin(options) {
119
- CACHES.oxfmtPlugin ??= await loadCached("oxfmtPlugin", async () => await import("./prettier-plugin-oxfmt-CLoiASgP.js"));
165
+ CACHES.oxfmtPlugin ??= await loadCached("oxfmtPlugin", async () => await import("./prettier-plugin-oxfmt-BlJcmKAv.js"));
120
166
  options.plugins ??= [];
121
167
  options.plugins.push(CACHES.oxfmtPlugin);
122
168
  }
123
169
  //#endregion
124
- export { sortTailwindClasses as a, resolvePlugins as i, formatEmbeddedDoc as n, formatFile as r, formatEmbeddedCode as t };
170
+ export { sortTailwindClasses as a, __exportAll as c, __toESM as d, resolvePlugins as i, __require as l, formatEmbeddedDoc as n, __commonJSMin as o, formatFile as r, __esmMin as s, formatEmbeddedCode as t, __toCommonJS as u };