Skip to content

Commit 486bf96

Browse files
committed
build: optimize dependency check and TypeScript compilation process
- Replace npm ci --dry-run with file modification time comparison for faster dependency check - Use npx tsc --noEmit instead of npm run check for more accurate TypeScript compilation check - Update package-lock.json handling for improved dependency management Signed-off-by: diverger <[email protected]>
1 parent be5a859 commit 486bf96

File tree

10 files changed

+1746
-811
lines changed

10 files changed

+1746
-811
lines changed

build.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ if [ ! -d "node_modules" ]; then
4242
print_info "Installing dependencies..."
4343
npm install
4444
else
45-
# Check if package-lock.json is in sync with package.json
45+
# Quick check: compare package.json and package-lock.json modification times
4646
print_info "Checking if dependencies are up to date..."
47-
if ! npm ci --dry-run >/dev/null 2>&1; then
48-
print_warning "Lock file is out of sync with package.json"
47+
if [ "package.json" -nt "package-lock.json" ] || [ "package.json" -nt "node_modules/.package-lock.json" ] 2>/dev/null; then
48+
print_warning "Package files appear out of sync"
4949
print_info "Updating dependencies..."
5050
npm install
5151
else
@@ -55,7 +55,7 @@ fi
5555

5656
# Run TypeScript check
5757
print_info "Running TypeScript compilation check..."
58-
if npm run check; then
58+
if npx tsc --noEmit; then
5959
print_success "TypeScript compilation check passed"
6060
else
6161
print_error "TypeScript compilation check failed"

dist/file-manager.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)