Skip to content

v0.10.0

Latest

Choose a tag to compare

@yarlson yarlson released this 08 Jul 07:51

Breaking changes

  • Minimum supported Go version is now Go 1.19. This enables modern typed atomics used by the race-safe runtime state.
  • pin.ForceInteractive is no longer an exported mutable package variable. Use pin.SetForceInteractive(true) / pin.SetForceInteractive(false) to control forced interactive rendering, and pin.ForceInteractive() to read the current value.

Migration example:

// Before
pin.ForceInteractive = true
defer func() { pin.ForceInteractive = false }()

// After
pin.SetForceInteractive(true)
defer pin.SetForceInteractive(false)

Reliability fixes

  • Serialized spinner lifecycle state so concurrent Start, Stop, Fail, and returned cancel functions cannot leak goroutines, leave stale stop signals, or stop newer runs.
  • Made non-terminal Stop and Fail fully clean up their run without requiring callers to also call the returned cancel function.
  • Added serialized writer access and fixed Fail so it respects WithWriter instead of writing terminal control bytes to process stdout.
  • Made Message safe to call concurrently with UpdateMessage.
  • Made custom spinner frames defensive: nil/empty frame slices keep defaults, and non-empty slices are copied.
  • Made WithWriter(nil) a no-op.
  • Fixed right-position rendering to use the configured spinner color.

Docs and tests

  • Updated README and example prompt docs for Go 1.19, the new force-interactive API, and current Start(context.Context) usage.
  • Added race and lifecycle regression tests covering concurrent starts/stops, old cancel functions, non-terminal cleanup, writer routing, and custom frame edge cases.