@ankurhalder/codebase-snapshot 4.0.7 → 4.1.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
@@ -177,7 +177,10 @@ export default {
177
177
  ```js
178
178
  import { generateSnapshot, resolveConfig, validateSnapshot, loadConfigFile } from "@ankurhalder/codebase-snapshot";
179
179
 
180
- const config = resolveConfig(await loadConfigFile(process.cwd()));
180
+ // Pass the repository explicitly: loadConfigFile returns only the config it found, so a
181
+ // directory with no config file would leave resolveConfig scanning process.cwd() instead.
182
+ const dir = "/path/to/repo";
183
+ const config = resolveConfig(await loadConfigFile(dir), { cwd: dir });
181
184
  const manifest = generateSnapshot(config);
182
185
  const validation = validateSnapshot(config);
183
186
  ```