Skip to content

Commit 55e6fa4

Browse files
authored
refactor: unwrap Protected namespace + self-reexport (anomalyco#22938)
1 parent 7b56a22 commit 55e6fa4

1 file changed

Lines changed: 19 additions & 19 deletions

File tree

packages/opencode/src/file/protected.ts

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -37,23 +37,23 @@ const DARWIN_ROOT = ["/.DocumentRevisions-V100", "/.Spotlight-V100", "/.Trashes"
3737

3838
const WIN32_HOME = ["AppData", "Downloads", "Desktop", "Documents", "Pictures", "Music", "Videos", "OneDrive"]
3939

40-
export namespace Protected {
41-
/** Directory basenames to skip when scanning the home directory. */
42-
export function names(): ReadonlySet<string> {
43-
if (process.platform === "darwin") return new Set(DARWIN_HOME)
44-
if (process.platform === "win32") return new Set(WIN32_HOME)
45-
return new Set()
46-
}
47-
48-
/** Absolute paths that should never be watched, stated, or scanned. */
49-
export function paths(): string[] {
50-
if (process.platform === "darwin")
51-
return [
52-
...DARWIN_HOME.map((n) => path.join(home, n)),
53-
...DARWIN_LIBRARY.map((n) => path.join(home, "Library", n)),
54-
...DARWIN_ROOT,
55-
]
56-
if (process.platform === "win32") return WIN32_HOME.map((n) => path.join(home, n))
57-
return []
58-
}
40+
/** Directory basenames to skip when scanning the home directory. */
41+
export function names(): ReadonlySet<string> {
42+
if (process.platform === "darwin") return new Set(DARWIN_HOME)
43+
if (process.platform === "win32") return new Set(WIN32_HOME)
44+
return new Set()
5945
}
46+
47+
/** Absolute paths that should never be watched, stated, or scanned. */
48+
export function paths(): string[] {
49+
if (process.platform === "darwin")
50+
return [
51+
...DARWIN_HOME.map((n) => path.join(home, n)),
52+
...DARWIN_LIBRARY.map((n) => path.join(home, "Library", n)),
53+
...DARWIN_ROOT,
54+
]
55+
if (process.platform === "win32") return WIN32_HOME.map((n) => path.join(home, n))
56+
return []
57+
}
58+
59+
export * as Protected from "./protected"

0 commit comments

Comments
 (0)