super-backlog 0.3.1 → 0.3.2

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.
@@ -6,6 +6,12 @@ import { createServer } from 'node:http';
6
6
  import { isAbsolute, join } from 'node:path';
7
7
  import process from 'node:process';
8
8
  export const DASHBOARD_PORT = 6428;
9
+ export function recursiveWatchSupported(platform, nodeVersion) {
10
+ // Node 24 on Windows triggers a libuv assertion in recursive fs.watch:
11
+ // https://github.com/nodejs/node/issues/xxx (fs-event.c line 72)
12
+ const major = Number(nodeVersion.split('.')[0]);
13
+ return !(platform === 'win32' && !Number.isNaN(major) && major >= 24);
14
+ }
9
15
  function openInBrowser(url) {
10
16
  try {
11
17
  if (process.platform === 'win32') {
@@ -50,13 +56,19 @@ export async function startServeServer(cwd, opts = {}) {
50
56
  }, 300);
51
57
  };
52
58
  let watcher = null;
53
- try {
54
- // recursive so subdirectory writes (e.g. backlog/tasks/*.md) fire on every platform
55
- watcher = watch(join(cwd, 'backlog'), { persistent: true, recursive: true }, debouncedRegenerate);
56
- watcher.on('error', () => { }); // e.g. watched dir removed mid-session
59
+ const backlogDir = join(cwd, 'backlog');
60
+ if (recursiveWatchSupported(process.platform, process.versions.node)) {
61
+ try {
62
+ // recursive so subdirectory writes (e.g. backlog/tasks/*.md) fire on every platform
63
+ watcher = watch(backlogDir, { persistent: true, recursive: true }, debouncedRegenerate);
64
+ watcher.on('error', () => { }); // e.g. watched dir removed mid-session
65
+ }
66
+ catch {
67
+ watcher = null; // no backlog dir -> no live reload; serving still works
68
+ }
57
69
  }
58
- catch {
59
- watcher = null; // no backlog dir -> no live reload; serving still works
70
+ else {
71
+ console.warn('warning: live reload is disabled because Node 24+ on Windows cannot reliably watch directories recursively (libuv fs-event bug); use Node 22 or Linux/macOS for --serve');
60
72
  }
61
73
  const server = createServer((req, res) => {
62
74
  const url = req.url ?? '/';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "super-backlog",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "One command to equip any project with Backlog.md + Superpowers, plus a Project Dashboard.",
5
5
  "license": "MIT",
6
6
  "repository": {