Browse Source

fix: use ES module imports in task-cli.ts (#305)

Replaces require('fs')/require('path') with node:-prefixed namespace imports in .opencode/skills/task-management/scripts/task-cli.ts, matching the prevailing style elsewhere in the repo (e.g. packages/cli/src/lib/installer.ts).

Note: this is a consistency cleanup, not a compile fix. The original PR description referenced a cmdComplete control-flow change that is not in the diff, and the reported compile error does not reproduce — tsc --noEmit passes on main, as @types/node auto-resolves from the root node_modules. Commit message corrected accordingly.

Follow-up: the same require() pattern remains in .opencode/skill/project-orchestration/scripts/stage-cli.ts and session-context-manager.ts.
Masum Gökyüz 2 weeks ago
parent
commit
37ca233fa5
1 changed files with 3 additions and 2 deletions
  1. 3 2
      .opencode/skills/task-management/scripts/task-cli.ts

+ 3 - 2
.opencode/skills/task-management/scripts/task-cli.ts

@@ -1,4 +1,5 @@
 #!/usr/bin/env npx ts-node
+/// <reference types="node" />
 /**
  * Task Management CLI
  *
@@ -19,8 +20,8 @@
  *   .tmp/tasks/completed/{feature-slug}/
  */
 
-const fs = require('fs');
-const path = require('path');
+import * as fs from "node:fs";
+import * as path from "node:path";
 
 // Find project root (look for .git or package.json)
 function findProjectRoot(): string {