load-oxfmt-config 0.26.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 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.71.0` is a peer dependency and is installed alongside this package.
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
@@ -501,6 +508,7 @@ Notes:
501
508
 
502
509
  - The default lockfile list mirrors oxfmt documentation intent (`package-lock.json`, `pnpm-lock.yaml`, etc.) and common ecosystem lockfiles. It is not guaranteed to be a complete internal oxfmt list.
503
510
  - `ignorePatterns` use gitignore semantics and are interpreted relative to the resolved oxfmt config directory. Parent-directory (`..`) path segments are rejected because patterns cannot match files outside that directory.
511
+ - Within `ignorePatterns` or a single ignore file, `vendor/` followed by `!vendor/keep.js` still ignores the file because its parent directory is excluded. Use `vendor/*` followed by `!vendor/keep.js` to include that child. This matches oxfmt 0.72.0's corrected parent-directory handling.
504
512
  - `includeConfigIgnorePatterns` defaults to `true` to preserve current behavior.
505
513
  - `loadConfigForIgnorePatterns` defaults to `true` to preserve current behavior.
506
514
  - Nested config behavior follows oxfmt semantics:
@@ -508,6 +516,7 @@ Notes:
508
516
  - `disableNestedConfig: true`: resolve from `cwd` only
509
517
  - `configPath`: also disables nested lookup (same intent as CLI `-c`)
510
518
  - invalid nested config only fails files that resolve to that config (no project-wide pre-scan)
519
+ - files matched by global ignores are skipped before loading nested configs, even when those configs are invalid
511
520
 
512
521
  ## Precedence
513
522
 
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 `ignorePatterns` and `overrides`.
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.26.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,12 +43,12 @@
43
43
  },
44
44
  "sideEffects": false,
45
45
  "peerDependencies": {
46
- "oxfmt": ">=0.71.0"
46
+ "oxfmt": ">=0.73.0"
47
47
  },
48
48
  "dependencies": {
49
49
  "@ntnyq/utils": "^0.23.0",
50
50
  "editorconfig": "^3.0.2",
51
- "ignore": "^7.0.10",
51
+ "ignore": "^7.0.12",
52
52
  "jiti": "^2.7.0",
53
53
  "jsonc-parser": "^3.3.1",
54
54
  "minimatch": "~10.2.6"