@henryqw/pi-add-dir 3.2.2 → 3.2.3

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.
@@ -18,7 +18,7 @@ const CONTEXT_FILES = ["AGENTS.md", "CLAUDE.md"] as const;
18
18
  const SKILL_DIRS = [".pi/skills", ".agents/skills", ".claude/skills"] as const;
19
19
  const SKIPPED_SEARCH_DIRS = new Set([".git", "node_modules"]);
20
20
 
21
- function isMissingPathError(error: unknown): boolean {
21
+ export function isMissingPathError(error: unknown): boolean {
22
22
  if (!error || typeof error !== "object" || !("code" in error)) return false;
23
23
  return error.code === "ENOENT" || error.code === "ENOTDIR";
24
24
  }
@@ -16,6 +16,7 @@ import {
16
16
  collectSkillPaths,
17
17
  dirExists,
18
18
  findFiles,
19
+ isMissingPathError,
19
20
  resolveDir,
20
21
  scanDirContext,
21
22
  type AddedDir,
@@ -129,9 +130,7 @@ function hasGitMarker(cwd: string): boolean {
129
130
  lstatSync(join(directory, ".git"));
130
131
  return true;
131
132
  } catch (error) {
132
- if (!error || typeof error !== "object" || !("code" in error) || (error.code !== "ENOENT" && error.code !== "ENOTDIR")) {
133
- throw error;
134
- }
133
+ if (!isMissingPathError(error)) throw error;
135
134
  }
136
135
  const parent = dirname(directory);
137
136
  if (parent === directory) return false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@henryqw/pi-add-dir",
3
- "version": "3.2.2",
3
+ "version": "3.2.3",
4
4
  "description": "Add external directories to a Pi session with context, skills, and file search.",
5
5
  "keywords": [
6
6
  "pi-package",