fix: (v1) Move log helpers to @repo/utils and finish console.* migration#1301
Conversation
Move log helpers to @repo/utils and finish console.* migration across build integrations and the arkenv CLI. Co-authored-by: Cursor <cursoragent@cursor.com>
|
There was a problem hiding this comment.
ℹ️ No critical issues — minor suggestions inline.
Reviewed changes — centralized build/watcher log helpers in @repo/utils and migrated remaining console.* call sites across the CLI and integration packages.
- Add shared log helpers in
@repo/utilswithBUILD_PREFIX/WATCHER_PREFIXand unit tests. - Bundle helpers via
alwaysBundlein@arkenv/build,@arkenv/nextjs,@arkenv/nuxt,@arkenv/bun-plugin, andarkenvso published packages keep zero extra runtime dependencies. - Route CLI paths through
LoggerPortby passing the CLI logger intoNodeWorkspaceandNodeProjectScannerAdapter, and using aTextReporterfallback logger for unhandled rejections/exceptions. - Remove remaining ad-hoc
console.*calls in build watcher fallbacks, Next.js validation output, Nuxt module errors, Bun plugin schema load failures, and the library-import guard.
Kimi K2 (free via Pullfrog for OSS) | 𝕏
Merge origin/v1 and relocate log helpers from @arkenv/build/log to @repo/utils on top of the core/log split and nuxt flat-layout changes. Co-authored-by: Cursor <cursoragent@cursor.com>
arkenv
@arkenv/build
@arkenv/bun-plugin
@arkenv/core
@arkenv/fumadocs-ui
@arkenv/nextjs
@arkenv/nuxt
@arkenv/standard
@arkenv/vite-plugin
commit: |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Fall back to logBuildError from @repo/utils so append errors remain visible outside the LoggerPort wiring path. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Addressed the |
Remove changesets for log-helper consolidation and prefix formatting since those refactors have no consumer-facing API changes vs v1. Co-authored-by: Cursor <cursoragent@cursor.com>
Re-export log helpers from @arkenv/build (main entry and ./log subpath) via a thin shim over @repo/utils so existing imports stay compatible. Add logBuildErrorWithCause/logErrorWithCauseVia helpers and use them in safeAppend, bun-plugin schema loading, and build watcher fallbacks so failures log full stack traces instead of message-only strings. Co-authored-by: Yam C Borodetsky <hi@yam.codes>
There was a problem hiding this comment.
ℹ️ No critical issues — minor suggestions inline.
Reviewed changes — restored the @arkenv/build/log subpath export via a @repo/utils shim and switched error logging to WithCause helpers so failures preserve full stack traces.
- Restored
@arkenv/build/logsubpath by re-exporting helpers from@repo/utilsthrough a newsrc/log.tsshim and adding the entry back topackage.jsonandtsdown.config.ts. - Added
formatErrorCauseand WithCause helpers to@repo/utilsand re-exported them from@arkenv/build. - Updated
safeAppend, watcher fallbacks, and Bun plugin schema loading to route errors throughlogBuildErrorWithCause/logErrorWithCauseVia/logWatcherErrorWithCause. - Expanded test coverage for
formatErrorCause,logBuildErrorWithCause, andlogErrorWithCauseVia.
Kimi K2 (free via Pullfrog for OSS) | 𝕏
Co-authored-by: Yam C Borodetsky <hi@yam.codes>
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — added direct test coverage for logWatcherErrorWithCause in packages/internal/utils/src/utils/log-helpers.test.ts.
- Covered
logWatcherErrorWithCausewith a test that verifies the watcher-prefixed header and full error stack are logged toconsole.error.
Kimi K2 (free via Pullfrog for OSS) | 𝕏

Fixes #1237
Summary
formatBuildError,logBuildError,logBuildWarning,logWatcherError, etc.) to@repo/utilswith tests@arkenv/buildwatcher fallbacks,@arkenv/nextjsvalidation output,@arkenv/nuxtmodule errors, and@arkenv/bun-pluginschema load failures to use the helpers viaalwaysBundleLoggerPort: fallbackTextReporterfor unhandled rejections, logger-awaresafeAppend, and scanner git-not-installed messagesTest plan
pnpm run typecheckpnpm run testpnpm run fixMade with Cursor