Releases: uber-go/fx
Releases · uber-go/fx
v1.21.1
v1.21.0
Added
- fxtest: Add WithTestLogger option that uses a
testing.TB
as the
Fx event logger. - An fxevent logger that can log events using a slog logger has been added.
Changed
- Upgrade Dig dependency to v1.17.1
Thanks to @robbert229 for their contribution to the release.
v1.20.1
v1.20.0
v1.19.3
Changed
- Fixed several typos in docs.
- WASM build support.
- Annotating In and Out structs with From/As annotations generated invalid results.
The annotation check now blocks this. Shutdown
: Support calling fromInvoke
.
Deprecated
- Deprecate
ShutdownTimeout
option.
Fixed
- Respect Shutdowner ExitCode from calling
Run
.
v1.19.2
v1.19.1
v1.19.0
Added
fx.RecoverFromPanics
Option which allows Fx to recover from user-provided constructors
and invoked functions.fx.Private
that allows the constructor to limit the scope of its outputs to the wrapping
fx.Module
.ExitCode
ShutdownOption which allows setting custom exit code at the end of app
lifecycle.Wait
which returns a channel that can be used for waiting on application shutdown.- fxevent/ZapLogger now exposes
UseLogLevel
andUseErrorLevel
methods to set
the level of the Zap logs produced by it. - Add lifecycle hook-convertible methods:
StartHook
,StopHook
,StartStopHook
that can be used with more function signatures.
Changed
fx.WithLogger
can now be passed atfx.Module
level, setting custom logger at
Module
scope instead of the wholeApp
.
Fixed
fx.OnStart
andfx.OnStop
Annotations now work with annotated types that was
provided by the annotated constructor.- fxevent/ZapLogger: Errors from
fx.Supply
are now logged atError
level, not
Info
. - A race condition in lifecycle Start/Stop methods.
- Typos in docs.