load-oxfmt-config 0.27.0 → 0.28.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/README.md +8 -1
- package/dist/index.d.mts +7 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -33,9 +33,16 @@ yarn add oxfmt load-oxfmt-config
|
|
|
33
33
|
pnpm add oxfmt load-oxfmt-config
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
-
> `oxfmt >=0.
|
|
36
|
+
> `oxfmt >=0.73.0` is a peer dependency and is installed alongside this package.
|
|
37
37
|
> Node.js `^22.13.0 || >=24` is supported.
|
|
38
38
|
|
|
39
|
+
Oxfmt 0.73.0 adds `associations` and `astro` options. The loader preserves
|
|
40
|
+
association entries and Astro options in `OxfmtOptions`; it does not select a
|
|
41
|
+
formatter. Association globs are relative to the returned config `dirname`, and
|
|
42
|
+
later matching entries win. Consumers must resolve these before calling oxfmt's
|
|
43
|
+
`format()` API, which does not evaluate `associations`. Symlinked configs are
|
|
44
|
+
already discovered, with relative patterns based on the link's directory.
|
|
45
|
+
|
|
39
46
|
## Usage
|
|
40
47
|
|
|
41
48
|
### Basic Usage
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FormatConfig } from "oxfmt";
|
|
1
|
+
import { FormatConfig, OxfmtAssociationConfig } from "oxfmt";
|
|
2
2
|
//#region src/types.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* Object-form `.editorconfig` option for fine-grained lookup control.
|
|
@@ -177,9 +177,14 @@ export interface OxfmtConfigOverride {
|
|
|
177
177
|
options?: FormatConfig;
|
|
178
178
|
}
|
|
179
179
|
/**
|
|
180
|
-
* Final oxfmt options, including config
|
|
180
|
+
* Final oxfmt options, including config associations, ignore patterns, and overrides.
|
|
181
181
|
*/
|
|
182
182
|
export interface OxfmtOptions extends FormatConfig {
|
|
183
|
+
/**
|
|
184
|
+
* File language associations, relative to the config directory.
|
|
185
|
+
* Later matching entries take precedence. The loader preserves these for consumers.
|
|
186
|
+
*/
|
|
187
|
+
associations?: OxfmtAssociationConfig[];
|
|
183
188
|
/**
|
|
184
189
|
* Ignore files matching these glob patterns.
|
|
185
190
|
*
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "load-oxfmt-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.28.0",
|
|
5
5
|
"description": "Load and resolve oxfmt configuration files, including explicit JS/TS config paths, and merge supported `.editorconfig` settings for Oxfmt.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"editorconfig",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
},
|
|
44
44
|
"sideEffects": false,
|
|
45
45
|
"peerDependencies": {
|
|
46
|
-
"oxfmt": ">=0.
|
|
46
|
+
"oxfmt": ">=0.73.0"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@ntnyq/utils": "^0.23.0",
|