Repository navigation
feat: upgrade scriptc to 0.4.8 and eliminate custom pino patches - #12
sunjay-devbot wants to merge 3 commits into
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
- remove pino and update pnpm-lock.yaml - add scripts/patch_hono.mjs with strict pattern verification and idempotency - enhance logger to serialize Error objects (type, message, stack) and filter by LOG_LEVEL
| }; | ||
|
|
||
| function shouldLog(level: string): boolean { | ||
| const envLevel = (process.env.LOG_LEVEL || "info").toLowerCase(); |
There was a problem hiding this comment.
I think, we have a config/env.config.ts file
There was a problem hiding this comment.
Addressed in commit 0621496 — added LOG_LEVEL schema validation, allowed values, and parseLogLevel() to src/config/env.config.ts, and updated src/utils/logging.ts to source config.logLevel directly.
Summary
This PR upgrades
scriptcfrom0.1.7to0.4.8, eliminates custom JavaScript library patches, and enables pure native static binary compilation onFROM scratchwithout Node island dependencies.Key Changes
scriptc: UpdatedDockerfile.scriptcto usescriptc@0.4.8and removed the obsolete--dynamiccompiler flag.pinowith a zero-dependency structured JSON logger insrc/utils/logging.ts, deletingscripts/patch_pino_events.mjs. This removes 5 Node island demotions (atomic-sleep,thread-stream,on-exit-leak-free,safe-stable-stringify,Error.prepareStackTrace), allowing pure static musl compilation.upstreamResponse.headers.entries()withupstreamResponse.headers.forEach()insrc/proxy/handler.tsto resolve compiler issueSC2020.escapeToBufferto resolveSC9001.Performance Comparison (
scriptcNative vs Node.js 24 Alpine)/proxyThroughput: 4,953 req/s vs 2,321 req/s (+113% / 2.13x higher)