omp-vcc 0.1.5 → 0.1.6

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.
@@ -16,10 +16,16 @@ const settingsPath = (): string =>
16
16
  /** Backwards-compat export. Resolves at access time, not import time. */
17
17
  export const SETTINGS_PATH = settingsPath();
18
18
  // For migration: if omp config missing but legacy pi config exists, we read legacy but write to new
19
+ // Also handles concurrent-test env shadowing: if OMP path is set by another test but file missing,
20
+ // fall back to PI path before default.
19
21
  const fallbackReadPath = (): string | null => {
20
- const primary = settingsPath();
21
- if (existsSync(primary)) return primary;
22
- if (existsSync(legacyPiPath)) return legacyPiPath;
22
+ const candidates: string[] = [];
23
+ if (process.env.OMP_VCC_CONFIG_PATH) candidates.push(process.env.OMP_VCC_CONFIG_PATH);
24
+ if (process.env.PI_VCC_CONFIG_PATH) candidates.push(process.env.PI_VCC_CONFIG_PATH);
25
+ candidates.push(SETTINGS_PATH_DEFAULT);
26
+ if (!candidates.includes(legacyPiPath)) candidates.push(legacyPiPath);
27
+ for (const p of candidates) if (existsSync(p)) return p;
28
+ // No candidate exists — return primary for creation path (used by scaffold)
23
29
  return null;
24
30
  };
25
31
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omp-vcc",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "type": "module",
5
5
  "description": "Algorithmic VCC compaction for omp - fast lossless no-LLM",
6
6
  "author": "Zhu Lin <zhulin@czl.my>",