@howaboua/opencode-roadmap-plugin 0.2.0 → 0.2.1
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/dist/src/roadmap/files.js +12 -4
- package/package.json +1 -1
|
@@ -11,12 +11,20 @@ export const readRoadmapFile = async (base) => {
|
|
|
11
11
|
return await fs.readFile(roadmapPath(base), "utf-8");
|
|
12
12
|
};
|
|
13
13
|
const fsyncDir = async (dir) => {
|
|
14
|
-
|
|
14
|
+
// Directory fsync is often not supported or needed on Windows and causes EPERM
|
|
15
|
+
if (process.platform === "win32")
|
|
16
|
+
return;
|
|
15
17
|
try {
|
|
16
|
-
await
|
|
18
|
+
const handle = await fs.open(dir, "r");
|
|
19
|
+
try {
|
|
20
|
+
await handle.sync();
|
|
21
|
+
}
|
|
22
|
+
finally {
|
|
23
|
+
await handle.close().catch(() => { });
|
|
24
|
+
}
|
|
17
25
|
}
|
|
18
|
-
|
|
19
|
-
|
|
26
|
+
catch {
|
|
27
|
+
// Best effort: ignore errors if we can't open/sync the directory
|
|
20
28
|
}
|
|
21
29
|
};
|
|
22
30
|
export const writeRoadmapFile = async (base, data) => {
|