Skip to content

Commit 59b3022

Browse files
committed
fix: cli/validate-manifest.ts import path and readTextFile API
- Fix import path: ./validate-manifest.ts → ../validate-manifest.ts (cli/ directory needs parent path to reach src/) - Fix API: readTextFile → readFile (Deno 2 compat)
1 parent f808898 commit 59b3022

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

packages/core/src/cli/validate-manifest.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
* 1 — manifest has errors
1313
*/
1414

15-
import { readTextFile } from 'node:fs/promises';
15+
import { readFile } from 'node:fs/promises';
1616
import { resolve } from 'node:path';
17-
import { validateManifestFromJson } from './validate-manifest.ts';
17+
import { validateManifestFromJson } from '../validate-manifest.ts';
1818

1919
// ─── CLI Entry Point ──────────────────────────────────────────────────
2020

@@ -36,7 +36,8 @@ async function main() {
3636

3737
let json: string;
3838
try {
39-
json = await readTextFile(filePath, { encoding: 'utf-8' });
39+
const buf = await readFile(filePath);
40+
json = new TextDecoder().decode(buf);
4041
} catch (err) {
4142
const msg = err instanceof Error ? err.message : String(err);
4243
console.error(`Error reading file "${filePath}": ${msg}`);

0 commit comments

Comments
 (0)