From e4c03a0938ef520cc272ed4afd2751234b857f02 Mon Sep 17 00:00:00 2001 From: Carlos Villela Date: Wed, 8 Apr 2026 21:46:52 +0000 Subject: [PATCH 1/2] fix(lint): resolve ESLint errors introduced by #1564 - test/onboard.test.js: replace __dirname with import.meta.dirname (test files are ESM, __dirname is CJS-only) - bin/lib/onboard.js: remove @typescript-eslint/no-require-imports disable comment (rule doesn't exist in CJS ESLint config, require is valid in CJS) Co-Authored-By: Claude Opus 4.6 (1M context) --- bin/lib/onboard.js | 1 - test/onboard.test.js | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/bin/lib/onboard.js b/bin/lib/onboard.js index 2599f6db1..2574a14ac 100644 --- a/bin/lib/onboard.js +++ b/bin/lib/onboard.js @@ -421,7 +421,6 @@ function getBlueprintMinOpenshellVersion(rootDir = ROOT) { // Lazy require: yaml is already a dependency via bin/lib/policies.js but // pulling it at module load would slow down `nemoclaw --help` for users // who never reach the preflight path. - // eslint-disable-next-line @typescript-eslint/no-require-imports const YAML = require("yaml"); const blueprintPath = path.join(rootDir, "nemoclaw-blueprint", "blueprint.yaml"); if (!fs.existsSync(blueprintPath)) return null; diff --git a/test/onboard.test.js b/test/onboard.test.js index 0398c6b01..d9abac38f 100644 --- a/test/onboard.test.js +++ b/test/onboard.test.js @@ -592,7 +592,7 @@ describe("onboard helpers", () => { // Sanity check against the real on-disk blueprint so a future edit that // accidentally drops or breaks the field is caught by CI rather than at // a user's onboard time. - const repoRoot = path.resolve(__dirname, ".."); + const repoRoot = path.resolve(import.meta.dirname, ".."); const v = getBlueprintMinOpenshellVersion(repoRoot); expect(v).not.toBe(null); expect(/^[0-9]+\.[0-9]+\.[0-9]+/.test(v)).toBe(true); From ad1aaf0907a92afbdc5cd187a7f6106e5873ac43 Mon Sep 17 00:00:00 2001 From: Carlos Villela Date: Wed, 8 Apr 2026 21:50:25 +0000 Subject: [PATCH 2/2] fix(lint): run Prettier on unformatted code from #1564 Co-Authored-By: Claude Opus 4.6 (1M context) --- bin/lib/onboard.js | 6 ++++-- test/onboard.test.js | 14 ++++++++------ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/bin/lib/onboard.js b/bin/lib/onboard.js index 2574a14ac..854748e33 100644 --- a/bin/lib/onboard.js +++ b/bin/lib/onboard.js @@ -1785,8 +1785,10 @@ async function preflight() { console.error(""); console.error(" Upgrade openshell and retry:"); console.error(" https://github.com/NVIDIA/OpenShell/releases"); - console.error(" Or remove the existing binary so the installer can re-fetch a current build:"); - console.error(" command -v openshell && rm -f \"$(command -v openshell)\""); + console.error( + " Or remove the existing binary so the installer can re-fetch a current build:", + ); + console.error(' command -v openshell && rm -f "$(command -v openshell)"'); console.error(""); process.exit(1); } diff --git a/test/onboard.test.js b/test/onboard.test.js index d9abac38f..f4e2bf16a 100644 --- a/test/onboard.test.js +++ b/test/onboard.test.js @@ -331,7 +331,9 @@ describe("onboard helpers", () => { }); it("regression #1409: leaves Dockerfile defaults when proxy env is unset", () => { - const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), "nemoclaw-onboard-dockerfile-proxy-default-")); + const tmpDir = fs.mkdtempSync( + path.join(os.tmpdir(), "nemoclaw-onboard-dockerfile-proxy-default-"), + ); const dockerfilePath = path.join(tmpDir, "Dockerfile"); fs.writeFileSync( dockerfilePath, @@ -529,17 +531,17 @@ describe("onboard helpers", () => { it("regression #1317: getBlueprintMinOpenshellVersion returns null on missing or unparseable blueprint", () => { // Missing directory - const missingDir = path.join(os.tmpdir(), "nemoclaw-blueprint-missing-" + Date.now().toString()); + const missingDir = path.join( + os.tmpdir(), + "nemoclaw-blueprint-missing-" + Date.now().toString(), + ); expect(getBlueprintMinOpenshellVersion(missingDir)).toBe(null); // Present file, missing field — must NOT block onboard const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), "nemoclaw-blueprint-no-field-")); const blueprintDir = path.join(tmpDir, "nemoclaw-blueprint"); fs.mkdirSync(blueprintDir, { recursive: true }); - fs.writeFileSync( - path.join(blueprintDir, "blueprint.yaml"), - 'version: "0.1.0"\n', - ); + fs.writeFileSync(path.join(blueprintDir, "blueprint.yaml"), 'version: "0.1.0"\n'); try { expect(getBlueprintMinOpenshellVersion(tmpDir)).toBe(null); } finally {