refactor: unwrap Protected namespace + self-reexport (#22938)

This commit is contained in:
Kit Langton
2026-04-17 00:02:51 +00:00
committed by GitHub
parent 2704ad9110
commit 059b32c212
+2 -2
View File
@@ -37,7 +37,6 @@ const DARWIN_ROOT = ["/.DocumentRevisions-V100", "/.Spotlight-V100", "/.Trashes"
const WIN32_HOME = ["AppData", "Downloads", "Desktop", "Documents", "Pictures", "Music", "Videos", "OneDrive"] const WIN32_HOME = ["AppData", "Downloads", "Desktop", "Documents", "Pictures", "Music", "Videos", "OneDrive"]
export namespace Protected {
/** Directory basenames to skip when scanning the home directory. */ /** Directory basenames to skip when scanning the home directory. */
export function names(): ReadonlySet<string> { export function names(): ReadonlySet<string> {
if (process.platform === "darwin") return new Set(DARWIN_HOME) if (process.platform === "darwin") return new Set(DARWIN_HOME)
@@ -56,4 +55,5 @@ export namespace Protected {
if (process.platform === "win32") return WIN32_HOME.map((n) => path.join(home, n)) if (process.platform === "win32") return WIN32_HOME.map((n) => path.join(home, n))
return [] return []
} }
}
export * as Protected from "./protected"