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,81 +0,0 @@
1
- import * as path from "node:path";
2
- //#region ../../node_modules/.pnpm/prettier-plugin-tailwindcss@0.0.0-insiders.3997fbd_prettier@3.8.3/node_modules/prettier-plugin-tailwindcss/dist/utils-D8dQkKEd.mjs
3
- function isNodeLike(value) {
4
- return typeof (value === null || value === void 0 ? void 0 : value.type) === "string";
5
- }
6
- function visit(ast, callbackMap) {
7
- function _visit(node, path, meta) {
8
- if (typeof callbackMap === "function") {
9
- if (callbackMap(node, path, meta) === false) return;
10
- } else if (node.type in callbackMap) {
11
- if (callbackMap[node.type](node, path, meta) === false) return;
12
- }
13
- const keys = Object.keys(node);
14
- for (let i = 0; i < keys.length; i++) {
15
- const child = node[keys[i]];
16
- if (Array.isArray(child)) {
17
- for (let j = 0; j < child.length; j++) if (isNodeLike(child[j])) {
18
- let newMeta = { ...meta };
19
- let newPath = [{
20
- node: child[j],
21
- parent: node,
22
- key: keys[i],
23
- index: j,
24
- meta: newMeta
25
- }, ...path];
26
- _visit(child[j], newPath, newMeta);
27
- }
28
- } else if (isNodeLike(child)) {
29
- let newMeta = { ...meta };
30
- _visit(child, [{
31
- node: child,
32
- parent: node,
33
- key: keys[i],
34
- index: i,
35
- meta: newMeta
36
- }, ...path], newMeta);
37
- }
38
- }
39
- }
40
- let newMeta = {};
41
- _visit(ast, [{
42
- node: ast,
43
- parent: null,
44
- key: null,
45
- index: null,
46
- meta: newMeta
47
- }], newMeta);
48
- }
49
- function spliceChangesIntoString(str, changes) {
50
- if (!changes[0]) return str;
51
- changes.sort((a, b) => {
52
- return a.end - b.end || a.start - b.start;
53
- });
54
- let result = "";
55
- let previous = changes[0];
56
- result += str.slice(0, previous.start);
57
- result += previous.after;
58
- for (let i = 1; i < changes.length; ++i) {
59
- let change = changes[i];
60
- result += str.slice(previous.end, change.start);
61
- result += change.after;
62
- previous = change;
63
- }
64
- result += str.slice(previous.end);
65
- return result;
66
- }
67
- function bigSign(bigIntValue) {
68
- return Number(bigIntValue > 0n) - Number(bigIntValue < 0n);
69
- }
70
- function cacheForDirs(cache, inputDir, value, targetDir, makeKey = (dir) => dir) {
71
- let dir = inputDir;
72
- while (dir !== path.dirname(dir) && dir.length >= targetDir.length) {
73
- const key = makeKey(dir);
74
- if (cache.get(key) !== void 0) break;
75
- cache.set(key, value);
76
- if (dir === targetDir) break;
77
- dir = path.dirname(dir);
78
- }
79
- }
80
- //#endregion
81
- export { visit as i, cacheForDirs as n, spliceChangesIntoString as r, bigSign as t };