@apst/oxfmt 0.0.0-dev.20260324.019d1d21 → 0.0.0-dev.20260523.bbcb2890

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.
@@ -26,17 +26,25 @@ declare const CONFIG_DEFAULT: {
26
26
  readonly newlinesBetween: true;
27
27
  }, "type-builtin", {
28
28
  readonly newlinesBetween: true;
29
- }, ["type-external", "type-subpath"], {
29
+ }, "type-external", {
30
30
  readonly newlinesBetween: true;
31
- }, "type-internal", ["type-parent", "type-sibling", "type-index"], {
31
+ }, "type-subpath", {
32
+ readonly newlinesBetween: true;
33
+ }, "type-internal", {
34
+ readonly newlinesBetween: true;
35
+ }, "type-parent", "type-sibling", "type-index", {
32
36
  readonly newlinesBetween: true;
33
37
  }, "type-import", {
34
38
  readonly newlinesBetween: true;
35
39
  }, "builtin", {
36
40
  readonly newlinesBetween: true;
37
- }, ["external", "subpath"], {
41
+ }, "external", {
42
+ readonly newlinesBetween: true;
43
+ }, "subpath", {
44
+ readonly newlinesBetween: true;
45
+ }, "internal", {
38
46
  readonly newlinesBetween: true;
39
- }, "internal", ["parent", "sibling", "index"], {
47
+ }, "parent", "sibling", "index", {
40
48
  readonly newlinesBetween: true;
41
49
  }, "style", {
42
50
  readonly newlinesBetween: true;
@@ -54,9 +62,11 @@ declare const CONFIG_DEFAULT: {
54
62
  readonly sortPackageJson: {
55
63
  readonly sortScripts: false;
56
64
  };
65
+ readonly sortTailwindcss: undefined;
57
66
  readonly tabWidth: 4;
58
67
  readonly trailingComma: "all";
59
68
  readonly useTabs: false;
69
+ readonly vueIndentScriptAndStyle: undefined;
60
70
  };
61
71
  export { CONFIG_DEFAULT };
62
72
  //# sourceMappingURL=default.d.ts.map
@@ -34,9 +34,11 @@ const CONFIG_DEFAULT = {
34
34
  sortSideEffects: false
35
35
  },
36
36
  sortPackageJson: { sortScripts: false },
37
+ sortTailwindcss: void 0,
37
38
  tabWidth: 4,
38
39
  trailingComma: "all",
39
- useTabs: false
40
+ useTabs: false,
41
+ vueIndentScriptAndStyle: void 0
40
42
  };
41
43
 
42
44
  exports.CONFIG_DEFAULT = CONFIG_DEFAULT;
@@ -1 +1 @@
1
- {"version":3,"file":"default.js","names":["IGNORE_PATTERNS_DEFAULT","SORT_IMPORTS_GROUPS_DEFAULT","SORT_IMPORTS_INTERNAL_PATTERN_DEFAULT"],"sources":["../../src/constants/default.ts"],"sourcesContent":["import type { OxfmtConfig } from \"oxfmt\";\n\nimport { IGNORE_PATTERNS_DEFAULT } from \"#/constants/ignore-patterns\";\nimport {\n SORT_IMPORTS_GROUPS_DEFAULT,\n SORT_IMPORTS_INTERNAL_PATTERN_DEFAULT,\n} from \"#/constants/sort-imports\";\n\n/**\n * Default config for Oxfmt.\n */\nconst CONFIG_DEFAULT = {\n arrowParens: \"always\",\n bracketSameLine: false,\n bracketSpacing: true,\n embeddedLanguageFormatting: \"auto\",\n endOfLine: \"lf\",\n htmlWhitespaceSensitivity: \"ignore\",\n ignorePatterns: IGNORE_PATTERNS_DEFAULT,\n insertFinalNewline: true,\n jsxSingleQuote: false,\n objectWrap: \"preserve\",\n overrides: [],\n printWidth: 80,\n proseWrap: \"preserve\",\n quoteProps: \"as-needed\",\n semi: true,\n singleAttributePerLine: true,\n singleQuote: false,\n sortImports: {\n groups: SORT_IMPORTS_GROUPS_DEFAULT,\n ignoreCase: true,\n internalPattern: SORT_IMPORTS_INTERNAL_PATTERN_DEFAULT,\n newlinesBetween: false,\n order: \"asc\",\n partitionByComment: false,\n partitionByNewline: false,\n sortSideEffects: false,\n },\n sortPackageJson: {\n sortScripts: false,\n },\n tabWidth: 4,\n trailingComma: \"all\",\n useTabs: false,\n} as const satisfies OxfmtConfig;\n\nexport { CONFIG_DEFAULT };\n"],"mappings":";;;;;;;AAWA,MAAM,iBAAiB;CACnB,aAAa;CACb,iBAAiB;CACjB,gBAAgB;CAChB,4BAA4B;CAC5B,WAAW;CACX,2BAA2B;CAC3B,gBAAgBA;CAChB,oBAAoB;CACpB,gBAAgB;CAChB,YAAY;CACZ,WAAW,EAAE;CACb,YAAY;CACZ,WAAW;CACX,YAAY;CACZ,MAAM;CACN,wBAAwB;CACxB,aAAa;CACb,aAAa;EACT,QAAQC;EACR,YAAY;EACZ,iBAAiBC;EACjB,iBAAiB;EACjB,OAAO;EACP,oBAAoB;EACpB,oBAAoB;EACpB,iBAAiB;EACpB;CACD,iBAAiB,EACb,aAAa,OAChB;CACD,UAAU;CACV,eAAe;CACf,SAAS;CACZ"}
1
+ {"version":3,"file":"default.js","names":["IGNORE_PATTERNS_DEFAULT","SORT_IMPORTS_GROUPS_DEFAULT","SORT_IMPORTS_INTERNAL_PATTERN_DEFAULT"],"sources":["../../src/constants/default.ts"],"sourcesContent":["import type { OxfmtConfig } from \"oxfmt\";\n\nimport { IGNORE_PATTERNS_DEFAULT } from \"#/constants/ignore-patterns\";\nimport {\n SORT_IMPORTS_GROUPS_DEFAULT,\n SORT_IMPORTS_INTERNAL_PATTERN_DEFAULT,\n} from \"#/constants/sort-imports\";\n\n/**\n * Default config for Oxfmt.\n */\nconst CONFIG_DEFAULT = {\n arrowParens: \"always\",\n bracketSameLine: false,\n bracketSpacing: true,\n embeddedLanguageFormatting: \"auto\",\n endOfLine: \"lf\",\n htmlWhitespaceSensitivity: \"ignore\",\n ignorePatterns: IGNORE_PATTERNS_DEFAULT,\n insertFinalNewline: true,\n jsxSingleQuote: false,\n objectWrap: \"preserve\",\n overrides: [],\n printWidth: 80,\n proseWrap: \"preserve\",\n quoteProps: \"as-needed\",\n semi: true,\n singleAttributePerLine: true,\n singleQuote: false,\n sortImports: {\n groups: SORT_IMPORTS_GROUPS_DEFAULT,\n ignoreCase: true,\n internalPattern: SORT_IMPORTS_INTERNAL_PATTERN_DEFAULT,\n newlinesBetween: false,\n order: \"asc\",\n partitionByComment: false,\n partitionByNewline: false,\n sortSideEffects: false,\n },\n sortPackageJson: {\n sortScripts: false,\n },\n sortTailwindcss: void 0,\n tabWidth: 4,\n trailingComma: \"all\",\n useTabs: false,\n vueIndentScriptAndStyle: void 0,\n} as const satisfies OxfmtConfig;\n\nexport { CONFIG_DEFAULT };\n"],"mappings":";;;;;;;AAWA,MAAM,iBAAiB;CACnB,aAAa;CACb,iBAAiB;CACjB,gBAAgB;CAChB,4BAA4B;CAC5B,WAAW;CACX,2BAA2B;CAC3B,gBAAgBA;CAChB,oBAAoB;CACpB,gBAAgB;CAChB,YAAY;CACZ,WAAW,CAAC;CACZ,YAAY;CACZ,WAAW;CACX,YAAY;CACZ,MAAM;CACN,wBAAwB;CACxB,aAAa;CACb,aAAa;EACT,QAAQC;EACR,YAAY;EACZ,iBAAiBC;EACjB,iBAAiB;EACjB,OAAO;EACP,oBAAoB;EACpB,oBAAoB;EACpB,iBAAiB;CACrB;CACA,iBAAiB,EACb,aAAa,MACjB;CACA,iBAAiB,KAAK;CACtB,UAAU;CACV,eAAe;CACf,SAAS;CACT,yBAAyB,KAAK;AAClC"}
@@ -33,9 +33,11 @@ const CONFIG_DEFAULT = {
33
33
  sortSideEffects: false
34
34
  },
35
35
  sortPackageJson: { sortScripts: false },
36
+ sortTailwindcss: void 0,
36
37
  tabWidth: 4,
37
38
  trailingComma: "all",
38
- useTabs: false
39
+ useTabs: false,
40
+ vueIndentScriptAndStyle: void 0
39
41
  };
40
42
 
41
43
  export { CONFIG_DEFAULT };
@@ -1 +1 @@
1
- {"version":3,"file":"default.mjs","names":[],"sources":["../../src/constants/default.ts"],"sourcesContent":["import type { OxfmtConfig } from \"oxfmt\";\n\nimport { IGNORE_PATTERNS_DEFAULT } from \"#/constants/ignore-patterns\";\nimport {\n SORT_IMPORTS_GROUPS_DEFAULT,\n SORT_IMPORTS_INTERNAL_PATTERN_DEFAULT,\n} from \"#/constants/sort-imports\";\n\n/**\n * Default config for Oxfmt.\n */\nconst CONFIG_DEFAULT = {\n arrowParens: \"always\",\n bracketSameLine: false,\n bracketSpacing: true,\n embeddedLanguageFormatting: \"auto\",\n endOfLine: \"lf\",\n htmlWhitespaceSensitivity: \"ignore\",\n ignorePatterns: IGNORE_PATTERNS_DEFAULT,\n insertFinalNewline: true,\n jsxSingleQuote: false,\n objectWrap: \"preserve\",\n overrides: [],\n printWidth: 80,\n proseWrap: \"preserve\",\n quoteProps: \"as-needed\",\n semi: true,\n singleAttributePerLine: true,\n singleQuote: false,\n sortImports: {\n groups: SORT_IMPORTS_GROUPS_DEFAULT,\n ignoreCase: true,\n internalPattern: SORT_IMPORTS_INTERNAL_PATTERN_DEFAULT,\n newlinesBetween: false,\n order: \"asc\",\n partitionByComment: false,\n partitionByNewline: false,\n sortSideEffects: false,\n },\n sortPackageJson: {\n sortScripts: false,\n },\n tabWidth: 4,\n trailingComma: \"all\",\n useTabs: false,\n} as const satisfies OxfmtConfig;\n\nexport { CONFIG_DEFAULT };\n"],"mappings":";;;;;;AAWA,MAAM,iBAAiB;CACnB,aAAa;CACb,iBAAiB;CACjB,gBAAgB;CAChB,4BAA4B;CAC5B,WAAW;CACX,2BAA2B;CAC3B,gBAAgB;CAChB,oBAAoB;CACpB,gBAAgB;CAChB,YAAY;CACZ,WAAW,EAAE;CACb,YAAY;CACZ,WAAW;CACX,YAAY;CACZ,MAAM;CACN,wBAAwB;CACxB,aAAa;CACb,aAAa;EACT,QAAQ;EACR,YAAY;EACZ,iBAAiB;EACjB,iBAAiB;EACjB,OAAO;EACP,oBAAoB;EACpB,oBAAoB;EACpB,iBAAiB;EACpB;CACD,iBAAiB,EACb,aAAa,OAChB;CACD,UAAU;CACV,eAAe;CACf,SAAS;CACZ"}
1
+ {"version":3,"file":"default.mjs","names":[],"sources":["../../src/constants/default.ts"],"sourcesContent":["import type { OxfmtConfig } from \"oxfmt\";\n\nimport { IGNORE_PATTERNS_DEFAULT } from \"#/constants/ignore-patterns\";\nimport {\n SORT_IMPORTS_GROUPS_DEFAULT,\n SORT_IMPORTS_INTERNAL_PATTERN_DEFAULT,\n} from \"#/constants/sort-imports\";\n\n/**\n * Default config for Oxfmt.\n */\nconst CONFIG_DEFAULT = {\n arrowParens: \"always\",\n bracketSameLine: false,\n bracketSpacing: true,\n embeddedLanguageFormatting: \"auto\",\n endOfLine: \"lf\",\n htmlWhitespaceSensitivity: \"ignore\",\n ignorePatterns: IGNORE_PATTERNS_DEFAULT,\n insertFinalNewline: true,\n jsxSingleQuote: false,\n objectWrap: \"preserve\",\n overrides: [],\n printWidth: 80,\n proseWrap: \"preserve\",\n quoteProps: \"as-needed\",\n semi: true,\n singleAttributePerLine: true,\n singleQuote: false,\n sortImports: {\n groups: SORT_IMPORTS_GROUPS_DEFAULT,\n ignoreCase: true,\n internalPattern: SORT_IMPORTS_INTERNAL_PATTERN_DEFAULT,\n newlinesBetween: false,\n order: \"asc\",\n partitionByComment: false,\n partitionByNewline: false,\n sortSideEffects: false,\n },\n sortPackageJson: {\n sortScripts: false,\n },\n sortTailwindcss: void 0,\n tabWidth: 4,\n trailingComma: \"all\",\n useTabs: false,\n vueIndentScriptAndStyle: void 0,\n} as const satisfies OxfmtConfig;\n\nexport { CONFIG_DEFAULT };\n"],"mappings":";;;;;;AAWA,MAAM,iBAAiB;CACnB,aAAa;CACb,iBAAiB;CACjB,gBAAgB;CAChB,4BAA4B;CAC5B,WAAW;CACX,2BAA2B;CAC3B,gBAAgB;CAChB,oBAAoB;CACpB,gBAAgB;CAChB,YAAY;CACZ,WAAW,CAAC;CACZ,YAAY;CACZ,WAAW;CACX,YAAY;CACZ,MAAM;CACN,wBAAwB;CACxB,aAAa;CACb,aAAa;EACT,QAAQ;EACR,YAAY;EACZ,iBAAiB;EACjB,iBAAiB;EACjB,OAAO;EACP,oBAAoB;EACpB,oBAAoB;EACpB,iBAAiB;CACrB;CACA,iBAAiB,EACb,aAAa,MACjB;CACA,iBAAiB,KAAK;CACtB,UAAU;CACV,eAAe;CACf,SAAS;CACT,yBAAyB,KAAK;AAClC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ignore-patterns.js","names":[],"sources":["../../src/constants/ignore-patterns.ts"],"sourcesContent":["const IGNORE_PATTERNS_DEFAULT = [\n // git\n \"**/.git/**\",\n // macOS\n \"**/__MACOSX/**\",\n \"**/.DS_Store\",\n // node modules\n \"**/node_modules/**\",\n // build\n \"**/.panda/**\",\n \"**/.next/**\",\n \"**/.expo/**\",\n \"**/.vercel/**\",\n \"**/dist/**\",\n \"build/**\",\n \"app/build/**\",\n \"web/build/**\",\n \"out/**\",\n \"app/out/**\",\n \"web/out/**\",\n // lock\n \"**/package-lock.json\",\n \"**/yarn.lock\",\n \"**/pnpm-lock.yaml\",\n \"**/bun.lock\",\n] as const satisfies string[];\n\nexport { IGNORE_PATTERNS_DEFAULT };\n"],"mappings":";;AAAA,MAAM,0BAA0B;CAE5B;CAEA;CACA;CAEA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACH"}
1
+ {"version":3,"file":"ignore-patterns.js","names":[],"sources":["../../src/constants/ignore-patterns.ts"],"sourcesContent":["const IGNORE_PATTERNS_DEFAULT = [\n // git\n \"**/.git/**\",\n // macOS\n \"**/__MACOSX/**\",\n \"**/.DS_Store\",\n // node modules\n \"**/node_modules/**\",\n // build\n \"**/.panda/**\",\n \"**/.next/**\",\n \"**/.expo/**\",\n \"**/.vercel/**\",\n \"**/dist/**\",\n \"build/**\",\n \"app/build/**\",\n \"web/build/**\",\n \"out/**\",\n \"app/out/**\",\n \"web/out/**\",\n // lock\n \"**/package-lock.json\",\n \"**/yarn.lock\",\n \"**/pnpm-lock.yaml\",\n \"**/bun.lock\",\n] as const satisfies string[];\n\nexport { IGNORE_PATTERNS_DEFAULT };\n"],"mappings":";;AAAA,MAAM,0BAA0B;CAE5B;CAEA;CACA;CAEA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;AACJ"}
@@ -1 +1 @@
1
- {"version":3,"file":"ignore-patterns.mjs","names":[],"sources":["../../src/constants/ignore-patterns.ts"],"sourcesContent":["const IGNORE_PATTERNS_DEFAULT = [\n // git\n \"**/.git/**\",\n // macOS\n \"**/__MACOSX/**\",\n \"**/.DS_Store\",\n // node modules\n \"**/node_modules/**\",\n // build\n \"**/.panda/**\",\n \"**/.next/**\",\n \"**/.expo/**\",\n \"**/.vercel/**\",\n \"**/dist/**\",\n \"build/**\",\n \"app/build/**\",\n \"web/build/**\",\n \"out/**\",\n \"app/out/**\",\n \"web/out/**\",\n // lock\n \"**/package-lock.json\",\n \"**/yarn.lock\",\n \"**/pnpm-lock.yaml\",\n \"**/bun.lock\",\n] as const satisfies string[];\n\nexport { IGNORE_PATTERNS_DEFAULT };\n"],"mappings":"AAAA,MAAM,0BAA0B;CAE5B;CAEA;CACA;CAEA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACH"}
1
+ {"version":3,"file":"ignore-patterns.mjs","names":[],"sources":["../../src/constants/ignore-patterns.ts"],"sourcesContent":["const IGNORE_PATTERNS_DEFAULT = [\n // git\n \"**/.git/**\",\n // macOS\n \"**/__MACOSX/**\",\n \"**/.DS_Store\",\n // node modules\n \"**/node_modules/**\",\n // build\n \"**/.panda/**\",\n \"**/.next/**\",\n \"**/.expo/**\",\n \"**/.vercel/**\",\n \"**/dist/**\",\n \"build/**\",\n \"app/build/**\",\n \"web/build/**\",\n \"out/**\",\n \"app/out/**\",\n \"web/out/**\",\n // lock\n \"**/package-lock.json\",\n \"**/yarn.lock\",\n \"**/pnpm-lock.yaml\",\n \"**/bun.lock\",\n] as const satisfies string[];\n\nexport { IGNORE_PATTERNS_DEFAULT };\n"],"mappings":"AAAA,MAAM,0BAA0B;CAE5B;CAEA;CACA;CAEA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;AACJ"}
@@ -1,22 +1,30 @@
1
- import { OxfmtConfig } from "oxfmt";
2
- type SortGroupItemConfigArray = Required<Required<OxfmtConfig>["sortImports"]>["groups"];
1
+ import { SortImportsConfig } from "oxfmt";
2
+ type SortGroupItemConfigArray = Required<Required<SortImportsConfig>["groups"]>;
3
3
  declare const SORT_IMPORTS_GROUPS_DEFAULT: ["side_effect", {
4
4
  readonly newlinesBetween: true;
5
5
  }, "side_effect_style", {
6
6
  readonly newlinesBetween: true;
7
7
  }, "type-builtin", {
8
8
  readonly newlinesBetween: true;
9
- }, ["type-external", "type-subpath"], {
9
+ }, "type-external", {
10
10
  readonly newlinesBetween: true;
11
- }, "type-internal", ["type-parent", "type-sibling", "type-index"], {
11
+ }, "type-subpath", {
12
+ readonly newlinesBetween: true;
13
+ }, "type-internal", {
14
+ readonly newlinesBetween: true;
15
+ }, "type-parent", "type-sibling", "type-index", {
12
16
  readonly newlinesBetween: true;
13
17
  }, "type-import", {
14
18
  readonly newlinesBetween: true;
15
19
  }, "builtin", {
16
20
  readonly newlinesBetween: true;
17
- }, ["external", "subpath"], {
21
+ }, "external", {
22
+ readonly newlinesBetween: true;
23
+ }, "subpath", {
24
+ readonly newlinesBetween: true;
25
+ }, "internal", {
18
26
  readonly newlinesBetween: true;
19
- }, "internal", ["parent", "sibling", "index"], {
27
+ }, "parent", "sibling", "index", {
20
28
  readonly newlinesBetween: true;
21
29
  }, "style", {
22
30
  readonly newlinesBetween: true;
@@ -7,27 +7,29 @@ const SORT_IMPORTS_GROUPS_DEFAULT = [
7
7
  { newlinesBetween: true },
8
8
  "type-builtin",
9
9
  { newlinesBetween: true },
10
- ["type-external", "type-subpath"],
10
+ "type-external",
11
+ { newlinesBetween: true },
12
+ "type-subpath",
11
13
  { newlinesBetween: true },
12
14
  "type-internal",
13
- [
14
- "type-parent",
15
- "type-sibling",
16
- "type-index"
17
- ],
15
+ { newlinesBetween: true },
16
+ "type-parent",
17
+ "type-sibling",
18
+ "type-index",
18
19
  { newlinesBetween: true },
19
20
  "type-import",
20
21
  { newlinesBetween: true },
21
22
  "builtin",
22
23
  { newlinesBetween: true },
23
- ["external", "subpath"],
24
+ "external",
25
+ { newlinesBetween: true },
26
+ "subpath",
24
27
  { newlinesBetween: true },
25
28
  "internal",
26
- [
27
- "parent",
28
- "sibling",
29
- "index"
30
- ],
29
+ { newlinesBetween: true },
30
+ "parent",
31
+ "sibling",
32
+ "index",
31
33
  { newlinesBetween: true },
32
34
  "style",
33
35
  { newlinesBetween: true },
@@ -1 +1 @@
1
- {"version":3,"file":"sort-imports.js","names":[],"sources":["../../src/constants/sort-imports.ts"],"sourcesContent":["import type { OxfmtConfig } from \"oxfmt\";\n\ntype SortGroupItemConfigArray = Required<\n Required<OxfmtConfig>[\"sortImports\"]\n>[\"groups\"];\n\nconst SORT_IMPORTS_GROUPS_DEFAULT = [\n // import \"p\";\n \"side_effect\",\n {\n newlinesBetween: true,\n },\n // import \"./index.css\";\n \"side_effect_style\",\n {\n newlinesBetween: true,\n },\n // import type Path from \"node:path\";\n \"type-builtin\",\n {\n newlinesBetween: true,\n },\n // import type { x } from \"p\";\n [\n \"type-external\",\n \"type-subpath\",\n ],\n {\n newlinesBetween: true,\n },\n // import type { x } from \"#/p\";\n \"type-internal\",\n [\n \"type-parent\",\n \"type-sibling\",\n \"type-index\",\n ],\n {\n newlinesBetween: true,\n },\n // others\n \"type-import\",\n {\n newlinesBetween: true,\n },\n // import Path from \"node:path\";\n \"builtin\",\n {\n newlinesBetween: true,\n },\n // import { x } from \"p\";\n [\n \"external\",\n \"subpath\",\n ],\n {\n newlinesBetween: true,\n },\n // import { x } from \"#/p\";\n \"internal\",\n [\n \"parent\",\n \"sibling\",\n \"index\",\n ],\n {\n newlinesBetween: true,\n },\n // import x from \"./index.css\";\n \"style\",\n {\n newlinesBetween: true,\n },\n // others\n \"import\",\n {\n newlinesBetween: true,\n },\n \"unknown\",\n] as const satisfies SortGroupItemConfigArray;\n\nconst SORT_IMPORTS_INTERNAL_PATTERN_DEFAULT = [\n \"~/\",\n \"@/\",\n \"#/\",\n] as const satisfies string[];\n\nexport type { SortGroupItemConfigArray };\nexport { SORT_IMPORTS_GROUPS_DEFAULT, SORT_IMPORTS_INTERNAL_PATTERN_DEFAULT };\n"],"mappings":";;AAMA,MAAM,8BAA8B;CAEhC;CACA,EACI,iBAAiB,MACpB;CAED;CACA,EACI,iBAAiB,MACpB;CAED;CACA,EACI,iBAAiB,MACpB;CAED,CACI,iBACA,eACH;CACD,EACI,iBAAiB,MACpB;CAED;CACA;EACI;EACA;EACA;EACH;CACD,EACI,iBAAiB,MACpB;CAED;CACA,EACI,iBAAiB,MACpB;CAED;CACA,EACI,iBAAiB,MACpB;CAED,CACI,YACA,UACH;CACD,EACI,iBAAiB,MACpB;CAED;CACA;EACI;EACA;EACA;EACH;CACD,EACI,iBAAiB,MACpB;CAED;CACA,EACI,iBAAiB,MACpB;CAED;CACA,EACI,iBAAiB,MACpB;CACD;CACH;AAED,MAAM,wCAAwC;CAC1C;CACA;CACA;CACH"}
1
+ {"version":3,"file":"sort-imports.js","names":[],"sources":["../../src/constants/sort-imports.ts"],"sourcesContent":["import type { SortImportsConfig } from \"oxfmt\";\n\ntype SortGroupItemConfigArray = Required<Required<SortImportsConfig>[\"groups\"]>;\n\nconst SORT_IMPORTS_GROUPS_DEFAULT = [\n // import \"p\";\n \"side_effect\",\n {\n newlinesBetween: true,\n },\n // import \"./index.css\";\n \"side_effect_style\",\n {\n newlinesBetween: true,\n },\n // import type Path from \"node:path\";\n \"type-builtin\",\n {\n newlinesBetween: true,\n },\n // import type { x } from \"p\";\n \"type-external\",\n {\n newlinesBetween: true,\n },\n // import type { x } from \"#p/abc\";\n \"type-subpath\",\n {\n newlinesBetween: true,\n },\n // import type { x } from \"#/p\";\n \"type-internal\",\n {\n newlinesBetween: true,\n },\n // import type { x } from \"../p\";\n \"type-parent\",\n // import type { x } from \"./p\";\n \"type-sibling\",\n // import type { x } from \".\";\n \"type-index\",\n {\n newlinesBetween: true,\n },\n // others\n \"type-import\",\n {\n newlinesBetween: true,\n },\n // import Path from \"node:path\";\n \"builtin\",\n {\n newlinesBetween: true,\n },\n // import { x } from \"p\";\n \"external\",\n {\n newlinesBetween: true,\n },\n // import { x } from \"#p/abc\";\n \"subpath\",\n {\n newlinesBetween: true,\n },\n // import { x } from \"#/p\";\n \"internal\",\n {\n newlinesBetween: true,\n },\n // import { x } from \"../p\";\n \"parent\",\n // import { x } from \"./p\";\n \"sibling\",\n // import { x } from \".\";\n \"index\",\n {\n newlinesBetween: true,\n },\n // import x from \"./index.css\";\n \"style\",\n {\n newlinesBetween: true,\n },\n // others\n \"import\",\n {\n newlinesBetween: true,\n },\n \"unknown\",\n] as const satisfies SortGroupItemConfigArray;\n\nconst SORT_IMPORTS_INTERNAL_PATTERN_DEFAULT = [\n \"~/\",\n \"@/\",\n \"#/\",\n] as const satisfies string[];\n\nexport type { SortGroupItemConfigArray };\nexport { SORT_IMPORTS_GROUPS_DEFAULT, SORT_IMPORTS_INTERNAL_PATTERN_DEFAULT };\n"],"mappings":";;AAIA,MAAM,8BAA8B;CAEhC;CACA,EACI,iBAAiB,KACrB;CAEA;CACA,EACI,iBAAiB,KACrB;CAEA;CACA,EACI,iBAAiB,KACrB;CAEA;CACA,EACI,iBAAiB,KACrB;CAEA;CACA,EACI,iBAAiB,KACrB;CAEA;CACA,EACI,iBAAiB,KACrB;CAEA;CAEA;CAEA;CACA,EACI,iBAAiB,KACrB;CAEA;CACA,EACI,iBAAiB,KACrB;CAEA;CACA,EACI,iBAAiB,KACrB;CAEA;CACA,EACI,iBAAiB,KACrB;CAEA;CACA,EACI,iBAAiB,KACrB;CAEA;CACA,EACI,iBAAiB,KACrB;CAEA;CAEA;CAEA;CACA,EACI,iBAAiB,KACrB;CAEA;CACA,EACI,iBAAiB,KACrB;CAEA;CACA,EACI,iBAAiB,KACrB;CACA;AACJ;AAEA,MAAM,wCAAwC;CAC1C;CACA;CACA;AACJ"}
@@ -5,27 +5,29 @@ const SORT_IMPORTS_GROUPS_DEFAULT = [
5
5
  { newlinesBetween: true },
6
6
  "type-builtin",
7
7
  { newlinesBetween: true },
8
- ["type-external", "type-subpath"],
8
+ "type-external",
9
+ { newlinesBetween: true },
10
+ "type-subpath",
9
11
  { newlinesBetween: true },
10
12
  "type-internal",
11
- [
12
- "type-parent",
13
- "type-sibling",
14
- "type-index"
15
- ],
13
+ { newlinesBetween: true },
14
+ "type-parent",
15
+ "type-sibling",
16
+ "type-index",
16
17
  { newlinesBetween: true },
17
18
  "type-import",
18
19
  { newlinesBetween: true },
19
20
  "builtin",
20
21
  { newlinesBetween: true },
21
- ["external", "subpath"],
22
+ "external",
23
+ { newlinesBetween: true },
24
+ "subpath",
22
25
  { newlinesBetween: true },
23
26
  "internal",
24
- [
25
- "parent",
26
- "sibling",
27
- "index"
28
- ],
27
+ { newlinesBetween: true },
28
+ "parent",
29
+ "sibling",
30
+ "index",
29
31
  { newlinesBetween: true },
30
32
  "style",
31
33
  { newlinesBetween: true },
@@ -1 +1 @@
1
- {"version":3,"file":"sort-imports.mjs","names":[],"sources":["../../src/constants/sort-imports.ts"],"sourcesContent":["import type { OxfmtConfig } from \"oxfmt\";\n\ntype SortGroupItemConfigArray = Required<\n Required<OxfmtConfig>[\"sortImports\"]\n>[\"groups\"];\n\nconst SORT_IMPORTS_GROUPS_DEFAULT = [\n // import \"p\";\n \"side_effect\",\n {\n newlinesBetween: true,\n },\n // import \"./index.css\";\n \"side_effect_style\",\n {\n newlinesBetween: true,\n },\n // import type Path from \"node:path\";\n \"type-builtin\",\n {\n newlinesBetween: true,\n },\n // import type { x } from \"p\";\n [\n \"type-external\",\n \"type-subpath\",\n ],\n {\n newlinesBetween: true,\n },\n // import type { x } from \"#/p\";\n \"type-internal\",\n [\n \"type-parent\",\n \"type-sibling\",\n \"type-index\",\n ],\n {\n newlinesBetween: true,\n },\n // others\n \"type-import\",\n {\n newlinesBetween: true,\n },\n // import Path from \"node:path\";\n \"builtin\",\n {\n newlinesBetween: true,\n },\n // import { x } from \"p\";\n [\n \"external\",\n \"subpath\",\n ],\n {\n newlinesBetween: true,\n },\n // import { x } from \"#/p\";\n \"internal\",\n [\n \"parent\",\n \"sibling\",\n \"index\",\n ],\n {\n newlinesBetween: true,\n },\n // import x from \"./index.css\";\n \"style\",\n {\n newlinesBetween: true,\n },\n // others\n \"import\",\n {\n newlinesBetween: true,\n },\n \"unknown\",\n] as const satisfies SortGroupItemConfigArray;\n\nconst SORT_IMPORTS_INTERNAL_PATTERN_DEFAULT = [\n \"~/\",\n \"@/\",\n \"#/\",\n] as const satisfies string[];\n\nexport type { SortGroupItemConfigArray };\nexport { SORT_IMPORTS_GROUPS_DEFAULT, SORT_IMPORTS_INTERNAL_PATTERN_DEFAULT };\n"],"mappings":"AAMA,MAAM,8BAA8B;CAEhC;CACA,EACI,iBAAiB,MACpB;CAED;CACA,EACI,iBAAiB,MACpB;CAED;CACA,EACI,iBAAiB,MACpB;CAED,CACI,iBACA,eACH;CACD,EACI,iBAAiB,MACpB;CAED;CACA;EACI;EACA;EACA;EACH;CACD,EACI,iBAAiB,MACpB;CAED;CACA,EACI,iBAAiB,MACpB;CAED;CACA,EACI,iBAAiB,MACpB;CAED,CACI,YACA,UACH;CACD,EACI,iBAAiB,MACpB;CAED;CACA;EACI;EACA;EACA;EACH;CACD,EACI,iBAAiB,MACpB;CAED;CACA,EACI,iBAAiB,MACpB;CAED;CACA,EACI,iBAAiB,MACpB;CACD;CACH;AAED,MAAM,wCAAwC;CAC1C;CACA;CACA;CACH"}
1
+ {"version":3,"file":"sort-imports.mjs","names":[],"sources":["../../src/constants/sort-imports.ts"],"sourcesContent":["import type { SortImportsConfig } from \"oxfmt\";\n\ntype SortGroupItemConfigArray = Required<Required<SortImportsConfig>[\"groups\"]>;\n\nconst SORT_IMPORTS_GROUPS_DEFAULT = [\n // import \"p\";\n \"side_effect\",\n {\n newlinesBetween: true,\n },\n // import \"./index.css\";\n \"side_effect_style\",\n {\n newlinesBetween: true,\n },\n // import type Path from \"node:path\";\n \"type-builtin\",\n {\n newlinesBetween: true,\n },\n // import type { x } from \"p\";\n \"type-external\",\n {\n newlinesBetween: true,\n },\n // import type { x } from \"#p/abc\";\n \"type-subpath\",\n {\n newlinesBetween: true,\n },\n // import type { x } from \"#/p\";\n \"type-internal\",\n {\n newlinesBetween: true,\n },\n // import type { x } from \"../p\";\n \"type-parent\",\n // import type { x } from \"./p\";\n \"type-sibling\",\n // import type { x } from \".\";\n \"type-index\",\n {\n newlinesBetween: true,\n },\n // others\n \"type-import\",\n {\n newlinesBetween: true,\n },\n // import Path from \"node:path\";\n \"builtin\",\n {\n newlinesBetween: true,\n },\n // import { x } from \"p\";\n \"external\",\n {\n newlinesBetween: true,\n },\n // import { x } from \"#p/abc\";\n \"subpath\",\n {\n newlinesBetween: true,\n },\n // import { x } from \"#/p\";\n \"internal\",\n {\n newlinesBetween: true,\n },\n // import { x } from \"../p\";\n \"parent\",\n // import { x } from \"./p\";\n \"sibling\",\n // import { x } from \".\";\n \"index\",\n {\n newlinesBetween: true,\n },\n // import x from \"./index.css\";\n \"style\",\n {\n newlinesBetween: true,\n },\n // others\n \"import\",\n {\n newlinesBetween: true,\n },\n \"unknown\",\n] as const satisfies SortGroupItemConfigArray;\n\nconst SORT_IMPORTS_INTERNAL_PATTERN_DEFAULT = [\n \"~/\",\n \"@/\",\n \"#/\",\n] as const satisfies string[];\n\nexport type { SortGroupItemConfigArray };\nexport { SORT_IMPORTS_GROUPS_DEFAULT, SORT_IMPORTS_INTERNAL_PATTERN_DEFAULT };\n"],"mappings":"AAIA,MAAM,8BAA8B;CAEhC;CACA,EACI,iBAAiB,KACrB;CAEA;CACA,EACI,iBAAiB,KACrB;CAEA;CACA,EACI,iBAAiB,KACrB;CAEA;CACA,EACI,iBAAiB,KACrB;CAEA;CACA,EACI,iBAAiB,KACrB;CAEA;CACA,EACI,iBAAiB,KACrB;CAEA;CAEA;CAEA;CACA,EACI,iBAAiB,KACrB;CAEA;CACA,EACI,iBAAiB,KACrB;CAEA;CACA,EACI,iBAAiB,KACrB;CAEA;CACA,EACI,iBAAiB,KACrB;CAEA;CACA,EACI,iBAAiB,KACrB;CAEA;CACA,EACI,iBAAiB,KACrB;CAEA;CAEA;CAEA;CACA,EACI,iBAAiB,KACrB;CAEA;CACA,EACI,iBAAiB,KACrB;CAEA;CACA,EACI,iBAAiB,KACrB;CACA;AACJ;AAEA,MAAM,wCAAwC;CAC1C;CACA;CACA;AACJ"}
@@ -1 +1 @@
1
- {"version":3,"file":"define.js","names":["mergeConfig","CONFIG_DEFAULT"],"sources":["../../src/functions/define.ts"],"sourcesContent":["import type { OxfmtConfig } from \"oxfmt\";\n\nimport { clone } from \"es-toolkit\";\n\nimport { CONFIG_DEFAULT } from \"#/constants/default\";\nimport { mergeConfig } from \"#/functions/merge\";\n\nconst defineConfigFn = (userConfig?: OxfmtConfig): OxfmtConfig => {\n return mergeConfig(clone(CONFIG_DEFAULT), userConfig);\n};\n\n/**\n * Define Oxfmt configuration.\n *\n * All arrays will not be merged, adding new values will replace existing values.\n *\n * ### Example\n *\n * ```ts\n * import { defineConfig } from \"@apst/oxfmt\";\n * import { IGNORE_PATTERNS_DEFAULT } from \"@apst/oxfmt/constants/ignore-patterns\";\n *\n * export default defineConfig({\n * ignorePatterns: [\n * ...IGNORE_PATTERNS_DEFAULT,\n * // ...\n * ],\n * });\n * ```\n */\nfunction defineConfig(config?: OxfmtConfig): OxfmtConfig;\n\nfunction defineConfig(config?: OxfmtConfig): OxfmtConfig {\n return defineConfigFn(config);\n}\n\nexport { defineConfig };\n"],"mappings":";;;;AAOA,MAAM,kBAAkB,eAA0C;AAC9D,QAAOA,gDAAkBC,yCAAe,EAAE,WAAW;;AAwBzD,SAAS,aAAa,QAAmC;AACrD,QAAO,eAAe,OAAO"}
1
+ {"version":3,"file":"define.js","names":["mergeConfig","CONFIG_DEFAULT"],"sources":["../../src/functions/define.ts"],"sourcesContent":["import type { OxfmtConfig } from \"oxfmt\";\n\nimport { clone } from \"es-toolkit\";\n\nimport { CONFIG_DEFAULT } from \"#/constants/default\";\nimport { mergeConfig } from \"#/functions/merge\";\n\nconst defineConfigFn = (userConfig?: OxfmtConfig): OxfmtConfig => {\n return mergeConfig(clone(CONFIG_DEFAULT), userConfig);\n};\n\n/**\n * Define Oxfmt configuration.\n *\n * All arrays will not be merged, adding new values will replace existing values.\n *\n * ### Example\n *\n * ```ts\n * import { defineConfig } from \"@apst/oxfmt\";\n * import { IGNORE_PATTERNS_DEFAULT } from \"@apst/oxfmt/constants/ignore-patterns\";\n *\n * export default defineConfig({\n * ignorePatterns: [\n * ...IGNORE_PATTERNS_DEFAULT,\n * // ...\n * ],\n * });\n * ```\n */\nfunction defineConfig(config?: OxfmtConfig): OxfmtConfig;\n\nfunction defineConfig(config?: OxfmtConfig): OxfmtConfig {\n return defineConfigFn(config);\n}\n\nexport { defineConfig };\n"],"mappings":";;;;AAOA,MAAM,kBAAkB,eAA0C;CAC9D,OAAOA,gDAAkBC,wCAAc,GAAG,UAAU;AACxD;AAuBA,SAAS,aAAa,QAAmC;CACrD,OAAO,eAAe,MAAM;AAChC"}
@@ -1 +1 @@
1
- {"version":3,"file":"define.mjs","names":[],"sources":["../../src/functions/define.ts"],"sourcesContent":["import type { OxfmtConfig } from \"oxfmt\";\n\nimport { clone } from \"es-toolkit\";\n\nimport { CONFIG_DEFAULT } from \"#/constants/default\";\nimport { mergeConfig } from \"#/functions/merge\";\n\nconst defineConfigFn = (userConfig?: OxfmtConfig): OxfmtConfig => {\n return mergeConfig(clone(CONFIG_DEFAULT), userConfig);\n};\n\n/**\n * Define Oxfmt configuration.\n *\n * All arrays will not be merged, adding new values will replace existing values.\n *\n * ### Example\n *\n * ```ts\n * import { defineConfig } from \"@apst/oxfmt\";\n * import { IGNORE_PATTERNS_DEFAULT } from \"@apst/oxfmt/constants/ignore-patterns\";\n *\n * export default defineConfig({\n * ignorePatterns: [\n * ...IGNORE_PATTERNS_DEFAULT,\n * // ...\n * ],\n * });\n * ```\n */\nfunction defineConfig(config?: OxfmtConfig): OxfmtConfig;\n\nfunction defineConfig(config?: OxfmtConfig): OxfmtConfig {\n return defineConfigFn(config);\n}\n\nexport { defineConfig };\n"],"mappings":";;;;AAOA,MAAM,kBAAkB,eAA0C;AAC9D,QAAO,YAAY,MAAM,eAAe,EAAE,WAAW;;AAwBzD,SAAS,aAAa,QAAmC;AACrD,QAAO,eAAe,OAAO"}
1
+ {"version":3,"file":"define.mjs","names":[],"sources":["../../src/functions/define.ts"],"sourcesContent":["import type { OxfmtConfig } from \"oxfmt\";\n\nimport { clone } from \"es-toolkit\";\n\nimport { CONFIG_DEFAULT } from \"#/constants/default\";\nimport { mergeConfig } from \"#/functions/merge\";\n\nconst defineConfigFn = (userConfig?: OxfmtConfig): OxfmtConfig => {\n return mergeConfig(clone(CONFIG_DEFAULT), userConfig);\n};\n\n/**\n * Define Oxfmt configuration.\n *\n * All arrays will not be merged, adding new values will replace existing values.\n *\n * ### Example\n *\n * ```ts\n * import { defineConfig } from \"@apst/oxfmt\";\n * import { IGNORE_PATTERNS_DEFAULT } from \"@apst/oxfmt/constants/ignore-patterns\";\n *\n * export default defineConfig({\n * ignorePatterns: [\n * ...IGNORE_PATTERNS_DEFAULT,\n * // ...\n * ],\n * });\n * ```\n */\nfunction defineConfig(config?: OxfmtConfig): OxfmtConfig;\n\nfunction defineConfig(config?: OxfmtConfig): OxfmtConfig {\n return defineConfigFn(config);\n}\n\nexport { defineConfig };\n"],"mappings":";;;;AAOA,MAAM,kBAAkB,eAA0C;CAC9D,OAAO,YAAY,MAAM,cAAc,GAAG,UAAU;AACxD;AAuBA,SAAS,aAAa,QAAmC;CACrD,OAAO,eAAe,MAAM;AAChC"}
@@ -1 +1 @@
1
- {"version":3,"file":"merge.js","names":[],"sources":["../../src/functions/merge.ts"],"sourcesContent":["import { mergeWith } from \"es-toolkit\";\n\nconst mergeConfig = <\n T extends Record<PropertyKey, any>,\n S extends Record<PropertyKey, any>,\n>(\n target: T,\n source?: S,\n): T & S => {\n if (!source) return target;\n\n return mergeWith(target, source, (_: unknown, target: unknown): unknown => {\n // array replacement\n if (Array.isArray(target)) return target;\n // default deep merge\n return void 0;\n });\n};\n\nexport { mergeConfig };\n"],"mappings":";;AAEA,MAAM,eAIF,QACA,WACQ;AACR,KAAI,CAAC,OAAQ,QAAO;AAEpB,kCAAiB,QAAQ,SAAS,GAAY,WAA6B;AAEvE,MAAI,MAAM,QAAQ,OAAO,CAAE,QAAO;GAGpC"}
1
+ {"version":3,"file":"merge.js","names":[],"sources":["../../src/functions/merge.ts"],"sourcesContent":["import { mergeWith } from \"es-toolkit\";\n\nconst mergeConfig = <\n T extends Record<PropertyKey, any>,\n S extends Record<PropertyKey, any>,\n>(\n target: T,\n source?: S,\n): T & S => {\n if (!source) return target;\n\n return mergeWith(target, source, (_: unknown, target: unknown): unknown => {\n // array replacement\n if (Array.isArray(target)) return target;\n // default deep merge\n return void 0;\n });\n};\n\nexport { mergeConfig };\n"],"mappings":";;AAEA,MAAM,eAIF,QACA,WACQ;CACR,IAAI,CAAC,QAAQ,OAAO;CAEpB,iCAAiB,QAAQ,SAAS,GAAY,WAA6B;EAEvE,IAAI,MAAM,QAAQ,MAAM,GAAG,OAAO;CAGtC,CAAC;AACL"}
@@ -1 +1 @@
1
- {"version":3,"file":"merge.mjs","names":[],"sources":["../../src/functions/merge.ts"],"sourcesContent":["import { mergeWith } from \"es-toolkit\";\n\nconst mergeConfig = <\n T extends Record<PropertyKey, any>,\n S extends Record<PropertyKey, any>,\n>(\n target: T,\n source?: S,\n): T & S => {\n if (!source) return target;\n\n return mergeWith(target, source, (_: unknown, target: unknown): unknown => {\n // array replacement\n if (Array.isArray(target)) return target;\n // default deep merge\n return void 0;\n });\n};\n\nexport { mergeConfig };\n"],"mappings":";;AAEA,MAAM,eAIF,QACA,WACQ;AACR,KAAI,CAAC,OAAQ,QAAO;AAEpB,QAAO,UAAU,QAAQ,SAAS,GAAY,WAA6B;AAEvE,MAAI,MAAM,QAAQ,OAAO,CAAE,QAAO;GAGpC"}
1
+ {"version":3,"file":"merge.mjs","names":[],"sources":["../../src/functions/merge.ts"],"sourcesContent":["import { mergeWith } from \"es-toolkit\";\n\nconst mergeConfig = <\n T extends Record<PropertyKey, any>,\n S extends Record<PropertyKey, any>,\n>(\n target: T,\n source?: S,\n): T & S => {\n if (!source) return target;\n\n return mergeWith(target, source, (_: unknown, target: unknown): unknown => {\n // array replacement\n if (Array.isArray(target)) return target;\n // default deep merge\n return void 0;\n });\n};\n\nexport { mergeConfig };\n"],"mappings":";;AAEA,MAAM,eAIF,QACA,WACQ;CACR,IAAI,CAAC,QAAQ,OAAO;CAEpB,OAAO,UAAU,QAAQ,SAAS,GAAY,WAA6B;EAEvE,IAAI,MAAM,QAAQ,MAAM,GAAG,OAAO;CAGtC,CAAC;AACL"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apst/oxfmt",
3
- "version": "0.0.0-dev.20260324.019d1d21",
3
+ "version": "0.0.0-dev.20260523.bbcb2890",
4
4
  "description": "A shareable Oxfmt configuration",
5
5
  "keywords": [
6
6
  "oxfmt",
@@ -57,10 +57,10 @@
57
57
  "es-toolkit": "^1.40.0"
58
58
  },
59
59
  "devDependencies": {
60
- "oxfmt": "0.41.0"
60
+ "oxfmt": "0.50.0"
61
61
  },
62
62
  "peerDependencies": {
63
- "oxfmt": "^0.41.0"
63
+ "oxfmt": "^0.50.0"
64
64
  },
65
65
  "peerDependenciesMeta": {
66
66
  "oxfmt": {