fix(deps): update module github.com/kataras/iris/v12 to v12.2.0-alpha3#456
Open
renovate[bot] wants to merge 1 commit intomasterfrom
Open
fix(deps): update module github.com/kataras/iris/v12 to v12.2.0-alpha3#456renovate[bot] wants to merge 1 commit intomasterfrom
renovate[bot] wants to merge 1 commit intomasterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
v12.2.0-alpha2->v12.2.0-alpha3Release Notes
kataras/iris
v12.2.0-alpha3Compare Source
Next (currently v12.2.0-alpha3)
This release introduces new features and some breaking changes.
The codebase for Dependency Injection, Internationalization and localization and more have been simplified a lot (fewer LOCs and easier to read and follow up).
Fixes and Improvements
Replace json-iterator with go-json as requested at #1818.
New
iris.IsErrEmptyJSON(err) boolwhich reports whether the given "err" is caused by aContext.ReadJSONcall when the request body didn't start with { (or it was totally empty).Example Code:
That means that the client can optionally set a JSON body.
New
APIContainer.EnableStrictMode(bool)to disable automatic payload binding and panic on missing dependencies for exported struct'sfields or function's input parameters on MVC controller or hero function or PartyConfigurator.New
Party.PartyConfigure(relativePath string, partyReg ...PartyConfigurator) Partyhelper, registers a children Party likePartyandPartyFuncbut instead it accepts a structure value which may contain one or more of the dependencies registered byRegisterDependencyorConfigureContainer().RegisterDependencymethods and fills the unset/zero exported struct's fields respectfully (useful when the api's dependencies amount are too much to pass on a function).New feature: add the ability to set custom error handlers on path type parameters errors (existing or custom ones). Example Code:
Improve the performance and fix
:int, :int8, :int16, :int32, :int64, :uint, :uint8, :uint16, :uint32, :uint64path type parameters couldn't accept a positive number written with the plus symbol or with a leading zeroes, e.g.+42and021.The
iris.WithEmptyFormErroroption is respected oncontext.ReadQuerymethod too, as requested at #1727. Example comments were updated.New
httptest.Strictoption setter to enable thehttpexpect.RequireReporterinstead of the default `httpexpect.AssetReporter. Use that to enable complete test failure on the first error. As requested at: #1722.New
uuidbuiltin path parameter type. Example:New
Configuration.KeepAliveandiris.WithKeepAlive(time.Duration) Configuratoradded as helpers to start the server using a tcp listener featured with keep-alive.New
DirOptions.ShowHidden boolis added by @tuhao1020 at PR #1717 to show or hide the hidden files whenShowListis set to true.New
Context.ReadJSONStreammethod andJSONReaderoptions forContext.ReadJSONandContext.ReadJSONStream, see the example.New
FallbackViewfeature, per-party or per handler chain. Example can be found at: _examples/view/fallback.versioning.Aliasesmiddleware and up to 80% faster version resolve. Example Code:New Basic Authentication middleware. Its
Defaultfunction has not changed, however, the rest, e.g.Newcontains breaking changes as the new middleware features new functionalities.Add
iris.DirOptions.SPA boolfield to allow Single Page Applications under a file server.A generic User interface, see the
Context.SetUser/Usermethods in the New Context Methods section for more. In-short, the basicauth middleware's stored user can now be retrieved throughContext.User()which provides more information than the nativectx.Request().BasicAuth()method one. Third-party authentication middleware creators can benefit of these two methods, plus the Logout below.A
Context.Logoutmethod is added, can be used to invalidate basicauth or jwt client credentials.Add the ability to share functions between handlers chain and add an example on sharing Go structures (aka services).
Add the new
Party.UseOncemethod to the*RouteAdd a new
*Route.RemoveHandler(...interface{}) intandParty.RemoveHandler(...interface{}) Partymethods, delete a handler based on its name or the handler pc function.Redis Driver is now based on the go-redis module. Radix and redigo removed entirely. Sessions are now stored in hashes which fixes issue #1610. The only breaking change on default configuration is that the
redis.Config.Delimoption was removed. The redis sessions database driver is now defaults to the&redis.GoRedisDriver{}. End-developers can implement their own implementations too. TheDatabase#Closeis now automatically called on interrupt signals, no need to register it by yourself.Add builtin support for i18n pluralization. Please check out the following yaml locale example to see an overview of the supported formats.
Fix #1650
Fix #1649
Fix #1648
Fix #1641
Add
Party.SetRoutesNoLog(disable bool) Partyto disable (the new) verbose logging of next routes.Add
mvc.Application.SetControllersNoLog(disable bool) *mvc.Applicationto disable (the new) verbose logging of next controllers. As requested at #1630.Fix #1621 and add a new
cache.WithKeyto customize the cached entry key.Add a
Response() *http.Responseto the Response Recorder.Fix Response Recorder
Flushwhen transfer-encoding ischunked.Fix Response Recorder
Cloneconcurrent access afterwards.Add a
ParseTemplatemethod on view engines to manually parse and add a template from a text as requested. Examples.Full
http.FileSysteminterface support for all view engines as requested. The first argument of the functions(HTML,Blocks,Pug,Amber,Ace,Jet,Django,Handlebars) can now be either a directory ofstringtype (like before) or a value which completes thehttp.FileSysteminterface. The.Binarymethod of all view engines was removed: pass the go-bindata's latest versionAssetFile()exported function as the first argument instead of string.Add
Route.ExcludeSitemap() *Routeto exclude a route from sitemap as requested in chat, also offline routes are excluded automatically now.Improved tracing (with
app.Logger().SetLevel("debug")) for routes. Screens:DBUG Routes (1)
DBUG Routes (2)
DBUG Routes (3)
Update the pprof middleware.
New
Controller.HandleHTTPError(mvc.Code) <T>optional Controller method to handle http errors as requested at: MVC - More Elegent OnErrorCode registration?. Example can be found here.Configuration
📅 Schedule: At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by WhiteSource Renovate. View repository job log here.