load-oxfmt-config 0.22.0 → 0.23.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 (2) hide show
  1. package/dist/index.d.mts +14 -15
  2. package/package.json +8 -8
package/dist/index.d.mts CHANGED
@@ -3,7 +3,7 @@ import { FormatConfig } from "oxfmt";
3
3
  /**
4
4
  * Object-form `.editorconfig` option for fine-grained lookup control.
5
5
  */
6
- interface EditorconfigOption {
6
+ export interface EditorconfigOption {
7
7
  /**
8
8
  * When `true`, only look for `.editorconfig` in the `cwd` directory itself
9
9
  * (no upward traversal).
@@ -24,7 +24,7 @@ interface EditorconfigOption {
24
24
  /**
25
25
  * Format option override for a single matching rule.
26
26
  */
27
- interface OxfmtConfigOverride {
27
+ export interface OxfmtConfigOverride {
28
28
  /**
29
29
  * Glob patterns to match files.
30
30
  */
@@ -41,7 +41,7 @@ interface OxfmtConfigOverride {
41
41
  /**
42
42
  * Options for loading and merging oxfmt configuration.
43
43
  */
44
- interface LoadOxfmtConfigOptions {
44
+ export interface LoadOxfmtConfigOptions {
45
45
  /**
46
46
  * Path to the configuration file.
47
47
  */
@@ -83,7 +83,7 @@ interface LoadOxfmtConfigOptions {
83
83
  /**
84
84
  * Final oxfmt options, including config `ignorePatterns` and `overrides`.
85
85
  */
86
- interface OxfmtOptions extends FormatConfig {
86
+ export interface OxfmtOptions extends FormatConfig {
87
87
  /**
88
88
  * Ignore files matching these glob patterns.
89
89
  *
@@ -99,7 +99,7 @@ interface OxfmtOptions extends FormatConfig {
99
99
  /**
100
100
  * Result object with metadata about resolved oxfmt config.
101
101
  */
102
- interface LoadOxfmtConfigResult {
102
+ export interface LoadOxfmtConfigResult {
103
103
  /**
104
104
  * Final merged config from oxfmt and optional `.editorconfig` mapping.
105
105
  */
@@ -116,7 +116,7 @@ interface LoadOxfmtConfigResult {
116
116
  /**
117
117
  * Options for resolving whether a single file should be ignored.
118
118
  */
119
- interface IsOxfmtIgnoredOptions {
119
+ export interface IsOxfmtIgnoredOptions {
120
120
  /**
121
121
  * Current working directory.
122
122
  *
@@ -176,7 +176,7 @@ interface IsOxfmtIgnoredOptions {
176
176
  /**
177
177
  * Ignore resolution result.
178
178
  */
179
- interface IsOxfmtIgnoredResult {
179
+ export interface IsOxfmtIgnoredResult {
180
180
  /**
181
181
  * Whether the file should be ignored.
182
182
  */
@@ -202,7 +202,7 @@ interface IsOxfmtIgnoredResult {
202
202
  * console.log(result.config)
203
203
  * ```
204
204
  */
205
- declare function loadOxfmtConfig(options?: LoadOxfmtConfigOptions): Promise<LoadOxfmtConfigResult>;
205
+ export declare function loadOxfmtConfig(options?: LoadOxfmtConfigOptions): Promise<LoadOxfmtConfigResult>;
206
206
  //#endregion
207
207
  //#region src/ignore.d.ts
208
208
  /**
@@ -221,7 +221,7 @@ declare function loadOxfmtConfig(options?: LoadOxfmtConfigOptions): Promise<Load
221
221
  * })
222
222
  * ```
223
223
  */
224
- declare function isOxfmtIgnored(options: IsOxfmtIgnoredOptions): Promise<IsOxfmtIgnoredResult>;
224
+ export declare function isOxfmtIgnored(options: IsOxfmtIgnoredOptions): Promise<IsOxfmtIgnoredResult>;
225
225
  //#endregion
226
226
  //#region src/config.d.ts
227
227
  /**
@@ -231,7 +231,7 @@ declare function isOxfmtIgnored(options: IsOxfmtIgnoredOptions): Promise<IsOxfmt
231
231
  * @param configPath - Optional config path.
232
232
  * @returns Cache key for resolve cache.
233
233
  */
234
- declare function getResolveCacheKey(cwd: string, configPath?: string): string;
234
+ export declare function getResolveCacheKey(cwd: string, configPath?: string): string;
235
235
  /**
236
236
  * Build a cache key for config content; prefixes missing entries.
237
237
  *
@@ -240,7 +240,7 @@ declare function getResolveCacheKey(cwd: string, configPath?: string): string;
240
240
  * @param resolveKey - Resolution cache key.
241
241
  * @returns Cache key for config content cache.
242
242
  */
243
- declare function getConfigCacheKey(resolvedPath: string | undefined, editorconfigPath: string | undefined, resolveKey: string): string;
243
+ export declare function getConfigCacheKey(resolvedPath: string | undefined, editorconfigPath: string | undefined, resolveKey: string): string;
244
244
  /**
245
245
  * Resolve the oxfmt config file path.
246
246
  *
@@ -259,7 +259,7 @@ declare function getConfigCacheKey(resolvedPath: string | undefined, editorconfi
259
259
  * const path = await resolveOxfmtrcPath(process.cwd())
260
260
  * ```
261
261
  */
262
- declare function resolveOxfmtrcPath(cwd: string, configPath?: string): Promise<string | undefined>;
262
+ export declare function resolveOxfmtrcPath(cwd: string, configPath?: string): Promise<string | undefined>;
263
263
  /**
264
264
  * Read and parse an oxfmt config file.
265
265
  *
@@ -267,8 +267,7 @@ declare function resolveOxfmtrcPath(cwd: string, configPath?: string): Promise<s
267
267
  * @param options - Config loading options.
268
268
  * @returns Parsed config object.
269
269
  */
270
- declare function readConfigFromFile(resolvedPath: string, options?: {
270
+ export declare function readConfigFromFile(resolvedPath: string, options?: {
271
271
  useCache?: boolean;
272
272
  }): Promise<OxfmtOptions>;
273
- //#endregion
274
- export { EditorconfigOption, IsOxfmtIgnoredOptions, IsOxfmtIgnoredResult, LoadOxfmtConfigOptions, LoadOxfmtConfigResult, OxfmtConfigOverride, OxfmtOptions, getConfigCacheKey, getResolveCacheKey, isOxfmtIgnored, loadOxfmtConfig, readConfigFromFile, resolveOxfmtrcPath };
273
+ //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "load-oxfmt-config",
3
- "version": "0.22.0",
3
+ "version": "0.23.0",
4
4
  "description": "Load and resolve oxfmt configuration files, including explicit JS/TS config paths, and merge supported `.editorconfig` settings for Oxfmt.",
5
5
  "keywords": [
6
6
  "editorconfig",
@@ -50,19 +50,19 @@
50
50
  },
51
51
  "devDependencies": {
52
52
  "@ntnyq/tsconfig": "^3.1.0",
53
- "@types/node": "^26.4.1",
54
- "bumpp": "^12.2.2",
53
+ "@types/node": "^26.5.0",
54
+ "bumpp": "^12.3.0",
55
55
  "husky": "^9.1.7",
56
56
  "nano-staged": "^1.0.2",
57
57
  "npm-run-all2": "^9.0.3",
58
- "oxfmt": "^0.66.0",
59
- "oxlint": "^1.81.0",
60
- "tsdown": "^0.22.14",
58
+ "oxfmt": "^0.67.0",
59
+ "oxlint": "^1.82.0",
60
+ "tsdown": "^0.23.0",
61
61
  "typescript": "^7.0.2",
62
- "vitest": "^4.1.11"
62
+ "vitest": "^5.0.0"
63
63
  },
64
64
  "peerDependencies": {
65
- "oxfmt": ">=0.66.0"
65
+ "oxfmt": ">=0.67.0"
66
66
  },
67
67
  "nano-staged": {
68
68
  "*.{js,ts,mjs,tsx}": "oxlint --fix",