From d49c7698dd4042a3b89d2d3120acb2951aa23bb0 Mon Sep 17 00:00:00 2001 From: Kayvan Sylvan Date: Tue, 27 May 2025 13:48:43 -0700 Subject: [PATCH] chore: update build script to use Node.js built-in modules and fix linting issues ## CHANGES - Replace CommonJS require with node: prefix - Remove unused _workspaceRoot variable declaration - Change template literal to regular string - Update .gitignore to exclude VSCode settings --- .gitignore | 5 ++++- build-web-agent.js | 8 ++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 021314c6..324593f8 100644 --- a/.gitignore +++ b/.gitignore @@ -14,4 +14,7 @@ build/ .DS_Store # Environment variables -.env \ No newline at end of file +.env + +# VSCode settings +.vscode/ diff --git a/build-web-agent.js b/build-web-agent.js index ef583d5a..12dc8bd1 100644 --- a/build-web-agent.js +++ b/build-web-agent.js @@ -1,6 +1,6 @@ #!/usr/bin/env node -const fs = require("fs"); -const path = require("path"); +const fs = require("node:fs"); +const path = require("node:path"); // --- Configuration --- const configFilePath = "./build-web-agent.cfg.js"; // Path relative to this script (__dirname) @@ -60,7 +60,7 @@ async function main() { } // 2. Determine and validate asset folder root and build directory - const workspaceRoot = path.resolve(__dirname, "."); + const _workspaceRoot = path.resolve(__dirname, "."); const assetFolderRootInput = config.asset_root; let assetFolderRoot; @@ -193,7 +193,7 @@ Discovering source directories in '${assetFolderRoot}' (excluding '${buildDirNam ` Conflicting files: '${baseFilenamesSeen[baseName]}' and '${filenameWithExt}'.` ); console.error( - ` Please ensure all files in a subdirectory have unique names after removing their last extensions.` + " Please ensure all files in a subdirectory have unique names after removing their last extensions." ); process.exit(1); } else {