load-oxfmt-config 0.16.0 → 0.17.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.mjs +8 -3
  2. package/package.json +9 -9
package/dist/index.mjs CHANGED
@@ -441,7 +441,8 @@ function getEditorconfigResolveCacheKey(resolveKey) {
441
441
  */
442
442
  function getEditorconfigSearchDir(cwd, configPath) {
443
443
  if (!configPath) return cwd;
444
- return dirname(isAbsolute(configPath) ? configPath : join(cwd, configPath));
444
+ const resolvedConfigPath = isAbsolute(configPath) ? configPath : join(cwd, configPath);
445
+ return dirname(resolvedConfigPath);
445
446
  }
446
447
  /**
447
448
  * Merges root-level EditorConfig options with oxfmt config options.
@@ -598,7 +599,8 @@ function rebaseEditorconfigPattern(pattern, editorconfigDir, anchorDir) {
598
599
  * @returns Parsed EditorConfig data ready to merge into oxfmt config.
599
600
  */
600
601
  async function readEditorconfigFromFile(editorconfigPath, anchorDir) {
601
- const parsedSections = parseBuffer(await readFile(editorconfigPath));
602
+ const content = await readFile(editorconfigPath);
603
+ const parsedSections = parseBuffer(content);
602
604
  const editorconfigDir = dirname(editorconfigPath);
603
605
  const rootOptions = {};
604
606
  const overrides = [];
@@ -841,7 +843,10 @@ async function resolveGitInfoExcludePath(repoRoot) {
841
843
  const commonDirPath = join(resolvedGitDir, "commondir");
842
844
  try {
843
845
  const commonDir = (await readFile(commonDirPath, "utf8")).trim();
844
- if (commonDir) return join(isAbsolute(commonDir) ? commonDir : resolve(resolvedGitDir, commonDir), "info", "exclude");
846
+ if (commonDir) {
847
+ const resolvedCommonDir = isAbsolute(commonDir) ? commonDir : resolve(resolvedGitDir, commonDir);
848
+ return join(resolvedCommonDir, "info", "exclude");
849
+ }
845
850
  } catch (error) {
846
851
  const code = error.code;
847
852
  if (code !== "ENOENT" && code !== "ENOTDIR") throw error;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "load-oxfmt-config",
3
- "version": "0.16.0",
3
+ "version": "0.17.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",
@@ -42,7 +42,7 @@
42
42
  "access": "public"
43
43
  },
44
44
  "dependencies": {
45
- "@ntnyq/utils": "^0.18.1",
45
+ "@ntnyq/utils": "^0.21.0",
46
46
  "editorconfig": "^3.0.2",
47
47
  "ignore": "^7.0.6",
48
48
  "jiti": "^2.7.0",
@@ -50,21 +50,21 @@
50
50
  },
51
51
  "devDependencies": {
52
52
  "@ntnyq/tsconfig": "^3.1.0",
53
- "@types/node": "^26.1.1",
53
+ "@types/node": "^26.1.2",
54
54
  "@typescript/native-preview": "^7.0.0-dev.20260707.2",
55
- "bumpp": "^12.0.0",
55
+ "bumpp": "^12.1.1",
56
56
  "changelogithub": "14.0.0",
57
57
  "husky": "^9.1.7",
58
58
  "nano-staged": "^1.0.2",
59
59
  "npm": "11.18.0",
60
- "npm-run-all2": "^9.0.2",
61
- "oxfmt": "^0.60.0",
62
- "oxlint": "^1.75.0",
63
- "tsdown": "^0.22.13",
60
+ "npm-run-all2": "^9.0.3",
61
+ "oxfmt": "^0.61.0",
62
+ "oxlint": "^1.76.0",
63
+ "tsdown": "^0.22.14",
64
64
  "vitest": "^4.1.10"
65
65
  },
66
66
  "peerDependencies": {
67
- "oxfmt": ">=0.60.0"
67
+ "oxfmt": ">=0.61.0"
68
68
  },
69
69
  "nano-staged": {
70
70
  "*.{js,ts,mjs,tsx}": "oxlint --fix",