Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Improved Error Handling, Logging, and Code Readability in Build … #2286

Closed
wants to merge 1 commit into from

Conversation

annwag
Copy link

@annwag annwag commented Jan 12, 2025

I’ve made several key improvements to the build process to ensure better error handling, logging, and overall code clarity:

  1. Error Handling in build.onEnd:

    • Previously, errors were logged but didn’t exit with an error code.
    • Now, process.exit(1) ensures the build process fails explicitly when errors occur, which is critical for CI/CD pipelines and automation.
  2. Error Logging in build():

    • Errors were caught but not logged, making debugging difficult.
    • Added console.error('❌ Build failed:', error) to provide clear visibility into what went wrong.
  3. Simplified Promise.all:

    • Removed unnecessary Promise.all for a single context, directly awaiting esbuild.context instead.
    • This improves code readability and reduces complexity.
  4. Added Comments for Clarity:

    • Included detailed comments to explain the purpose of each section, making the code easier to understand and maintain.

…ProcessUpdate build.js

Improved Error Handling, Logging, and Code Readability in Build Process
@annwag annwag requested a review from a team as a code owner January 12, 2025 11:31
Copy link

vercel bot commented Jan 12, 2025

@annwag is attempting to deploy a commit to the rainbowdotme Team on Vercel.

A member of the Team first needs to authorize it.

@annwag annwag deleted the patch-1 branch January 13, 2025 05:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants