From 567b73e6e06d219de4f00e5b2a32e5b7e72e2c8e Mon Sep 17 00:00:00 2001 From: x22x22 Date: Thu, 30 Oct 2025 17:55:51 +0800 Subject: [PATCH] refactor: clean up build_package.js and remove unused imports chore: update .gitignore to remove Python cache entries --- .gitignore | 5 ----- scripts/build_package.js | 12 ++---------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/.gitignore b/.gitignore index f168e25a..2c3156b9 100644 --- a/.gitignore +++ b/.gitignore @@ -55,10 +55,5 @@ logs/ # GHA credentials gha-creds-*.json -# Python caches -__pycache__/ -*.py[codz] -*$py.class - # Log files patch_output.log diff --git a/scripts/build_package.js b/scripts/build_package.js index 1c147f8a..73f73861 100644 --- a/scripts/build_package.js +++ b/scripts/build_package.js @@ -17,7 +17,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { execSync, spawnSync } from 'node:child_process'; +import { execSync } from 'node:child_process'; import { writeFileSync } from 'node:fs'; import { join } from 'node:path'; @@ -27,15 +27,7 @@ if (!process.cwd().includes('packages')) { } // build typescript files -const tscResult = spawnSync('tsc', ['--build'], { stdio: 'inherit' }); - -if (tscResult.status !== 0) { - const failureReason = - tscResult.status !== null - ? `exit code ${tscResult.status}` - : `signal ${tscResult.signal ?? 'unknown'}`; - console.warn(`tsc --build completed with warnings (${failureReason}).`); -} +execSync('tsc --build', { stdio: 'inherit' }); // copy .{md,json} files execSync('node ../../scripts/copy_files.js', { stdio: 'inherit' });