refactor(imports): migrated node module imports to namespace imports

- Converted named imports from node modules (fs, path, os) to namespace imports across all packages.
- Extended extension loader error handling with isEacces and hasFsCode type guards.
This commit is contained in:
can1357
2026-01-24 03:37:59 +01:00
parent fc3dd7e569
commit 51d39e7eea
74 changed files with 371 additions and 309 deletions
@@ -1,6 +1,6 @@
import { afterEach, beforeEach, describe, expect, it, vi } from "bun:test";
import * as fs from "node:fs";
import { tmpdir } from "node:os";
import * as os from "node:os";
import * as path from "node:path";
import * as pythonExecutor from "@oh-my-pi/pi-coding-agent/ipy/executor";
import * as pythonKernel from "@oh-my-pi/pi-coding-agent/ipy/kernel";
@@ -38,7 +38,7 @@ describe("python tool settings", () => {
let testDir: string;
beforeEach(() => {
testDir = path.join(tmpdir(), `python-tool-settings-${crypto.randomUUID()}`);
testDir = path.join(os.tmpdir(), `python-tool-settings-${crypto.randomUUID()}`);
fs.mkdirSync(testDir, { recursive: true });
});