fix: use ES module imports in task-cli.ts (#305)
Some checks failed
Create Release / Check if Version Bump PR Merged (push) Waiting to run
Create Release / Create Git Tag and GitHub Release (push) Blocked by required conditions
Post-Merge Version Bump / Check if Version Bump Needed (push) Waiting to run
Post-Merge Version Bump / Create Version Bump PR (push) Blocked by required conditions
Update Component Registry (Direct Push) / update-and-validate-registry (push) Has been cancelled

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.
This commit is contained in:
Masum Gökyüz 2026-07-15 02:53:26 +03:00 committed by GitHub
parent 371041c937
commit 37ca233fa5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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 {