Skip to content

v1.0.1

Choose a tag to compare

@ctrotech-tutor ctrotech-tutor released this 12 Jun 22:22
· 1 commit to release/v1.0.1 since this release

v1.0.1 (Patch) - Phase 4: Polish & Developer Experience

4.1 Error Message Refinement

  • Centralized error message factory (errors/messages.ts) with 5 functions: errMissing, errType, errInvalid, errCoerce, errWrap
  • All validators (string, number, boolean, pick) + define-env/validate rewritten to use factory
  • formatErrors() rewritten with rich grouped output (Missing/Invalid sections, per-key suggestions, colored arrows)
  • NO_COLOR/CI/TERM=dumb auto-detection with plain-text fallback
  • 15 new tests for factory + formatter
  • Fix: Validator chainability - refine() preserves type-specific methods via Object.assign, so number().min(0).max(100) now works

4.3 Performance Benchmarks

  • Core benchmark suite: small schema (5 fields, pass/fail), large schema (20 fields, pass/fail)
  • CLI benchmark: 3-field parse
  • Results: 253k ops/sec (pass), 10.6k ops/sec (fail), all under 0.1ms targets

4.5 Bundle Size Optimization

  • size-limit + @size-limit/file configured in all 6 packages
  • Gzipped limits: core <5KB, cli programmatic <15KB, cli binary <50KB, adapters <2KB, shared <3KB
  • CI pipeline updated: Build ? Test ? Benchmark ? Bundle size
  • All packages pass: core 4.05KB, cli binary 4KB, adapters <1KB each

Packages

  • @ctroenv/shared@1.0.1
  • @ctroenv/core@1.0.1
  • @ctroenv/cli@1.0.1
  • @ctroenv/node@1.0.1
  • @ctroenv/vite@1.0.1
  • @ctroenv/nextjs@1.0.1