refactor: clean up build_package.js and remove unused imports

chore: update .gitignore to remove Python cache entries
This commit is contained in:
x22x22
2025-10-30 17:55:51 +08:00
parent 366de0be7e
commit 567b73e6e0
2 changed files with 2 additions and 15 deletions

5
.gitignore vendored
View File

@@ -55,10 +55,5 @@ logs/
# GHA credentials # GHA credentials
gha-creds-*.json gha-creds-*.json
# Python caches
__pycache__/
*.py[codz]
*$py.class
# Log files # Log files
patch_output.log patch_output.log

View File

@@ -17,7 +17,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
import { execSync, spawnSync } from 'node:child_process'; import { execSync } from 'node:child_process';
import { writeFileSync } from 'node:fs'; import { writeFileSync } from 'node:fs';
import { join } from 'node:path'; import { join } from 'node:path';
@@ -27,15 +27,7 @@ if (!process.cwd().includes('packages')) {
} }
// build typescript files // build typescript files
const tscResult = spawnSync('tsc', ['--build'], { stdio: 'inherit' }); execSync('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}).`);
}
// copy .{md,json} files // copy .{md,json} files
execSync('node ../../scripts/copy_files.js', { stdio: 'inherit' }); execSync('node ../../scripts/copy_files.js', { stdio: 'inherit' });