All Versions
46
Latest Version
Avg Release Cycle
59 days
Latest Release
-

Changelog History
Page 2

  • v3.3.0 Changes

    October 28, 2018

    ๐Ÿš€ Minor release to publish a couple feature requests:

    ๐Ÿ†• New features

    • โž• Added str as an alias for the encodedText function from the GiraffeViewEngine.
    • โž• Added the HttpContext.GetRequestUrl() extension method to retrieve the entire URL string of the incoming HTTP request.
  • v3.2.0 Changes

    October 10, 2018

    ๐Ÿ‘Œ Improvements

    • โž• Adding the charset parameter in the HTTP Content-Type response header when returning a text response (text/plain, text/html) or a JSON or XML response (application/json, application/xml). By default Giraffe is using UTF8 encoding for all its responses.
  • v3.1.0 Changes

    September 28, 2018

    ๐Ÿ†• New features

    • โž• Added a new http handler called validatePreconditions to help with conditional requests:

      let someHandler (eTag : string) (content : string) =
          let eTagHeader = Some (EntityTagHeaderValue.FromString true eTag)
          validatePreconditions eTagHeader None
          >=> setBodyFromString content
      
    • Made previously internal functionality for sub routing available through the SubRouting module:

      • SubRouting.getSavedPartialPath: Returns the currently partially resolved path.
      • SubRouting.getNextPartOfPath: Returns the yet unresolved part of the path.
      • SubRouting.routeWithPartialPath: Invokes a route handler as part of a sub route.

    ๐Ÿ‘Œ Improvements

    • ๐ŸŽ Performance improvements for Giraffe's default response writers.
    • ๐ŸŽ Performance improvements of the htmlView handler.
    • โฌ†๏ธ Upgraded to the latest TaskBuilder.fs NuGet package which also has the SourceLink integration now.

    ๐Ÿ› Bug fixes

    • ๐Ÿ›  Fixed the Successful.NO_CONTENT http handler, which threw an exception when calling from ASP.NET Core 2.1.
  • v3.0.0 Changes

    September 18, 2018

    ๐Ÿ’ฅ Breaking changes

    • ๐Ÿ”„ Changed the type XmlNode by removing the RawText and EncodedText union case and replaced both by a single Text union case. The HTML encoding (or not) is being done now when calling one of the two helper functions rawText and encodedText.

      • This change - even though theoretically a breaking change - should not affect the vast majority of Giraffe users unless you were constructing your own XmlNode elements which were of type RawText or EncodedText (which is extremely unlikely given that there's not much room for more nodes of these two types).
    • โœ‚ Removed the task {} override in Giraffe which was forcing the FSharp.Control.Tasks.V2.ContextInsensitive version of the Task CE. This change has no effect on the behaviour of task computation expressions in Giraffe. In the context of an ASP.NET Core web application there is not difference between ContextSensitive and ContextInsensitive which is why the override has been removed. The only breaking change which could affect an existing Giraffe web application is that in some places you will need to explicitly open FSharp.Control.Tasks.V2.ContextInsensitive where before it might have been sufficient to only open Giraffe.

    • ๐Ÿ”„ Changed the members of the IJsonSerializer interface to accommodate new (de-)serialize methods for chunked encoding transfer.

      The new interface is the following:

      type IJsonSerializer =
          abstract member SerializeToString<'T>      : 'T -> string
          abstract member SerializeToBytes<'T>       : 'T -> byte array
          abstract member SerializeToStreamAsync<'T> : 'T -> Stream -> Task
      
          abstract member Deserialize<'T>      : string -> 'T
          abstract member Deserialize<'T>      : byte[] -> 'T
          abstract member DeserializeAsync<'T> : Stream -> Task<'T>
      

    ๐Ÿ‘Œ Improvements

    • ๐ŸŽ Significant performance improvements in the GiraffeViewEngine by changing the underlying composition of views from simple string concatenation to using a StringBuilder object.

    ๐Ÿ†• New features

    • ๐Ÿ‘Œ Support for short GUIDs and short IDs (aka YouTube IDs) in route arguments and query string parameters.
    • ๐Ÿ‘ Enabled SourceLink support for Giraffe source code (thanks Cameron Taggart)! For more information check out Adding SourceLink to your .NET Core Library.
    • โž• Added a new JSON serializer called Utf8JsonSerializer. This type uses the Utf8 JSON serializer library, which is currently the fastest JSON serializer for .NET. NewtonsoftJsonSerializer is still the default JSON serializer in Giraffe (for stability and backwards compatibility), but Utf8JsonSerializer can be swapped in via ASP.NET Core's dependency injection API. The new Utf8JsonnSerializer is significantly faster (especially when sending chunked responses) than NewtonsoftJsonSerializer.
    • โž• Added a new HttpContext extension method for chunked JSON transfers: WriteJsonChunkedAsync<'T> (dataObj : 'T). This new HttpContext method can write content directly to the HTTP response stream without buffering into a byte array first (see Writing JSON).
    • โž• Added a new jsonChunked http handler. This handler is the equivalent http handler version of the WriteJsonChunkedAsync extension method.
    • โž• Added first class support for ASP.NET Core's response caching feature.

    Special thanks

    ๐Ÿš€ Special thanks to Dmitry Kushnir for doing the bulk work of all the perf improvements in this release as well as adding Giraffe to the TechEmpower Webframework Benchmarks!

  • v2.0.1 Changes

    August 20, 2018

    ๐Ÿ”„ Changed the task {} CE to load from FSharp.Control.Tasks.V2.ContextInsensitive instead of FSharp.Control.Tasks.ContextInsensitive.

  • v2.0.0 Changes

    August 18, 2018

    ๐Ÿ’ฅ Breaking changes

    • ๐Ÿ”„ Changed the name of the handler requiresAuthPolicy to evaluateUserPolicy in order to better describe its functionality and to avoid a name clash between two newly added handlers for validating ASP.NET Core's AuthorizationPolicy objects (see new features).
    • ๐Ÿ”„ Changed how he AddGiraffe() extension method registers Giraffe dependencies in ASP.NET Core. It now follows the TryAdd pattern which will only register a dependency if it hasn't been registered beforehand.
    • ๐Ÿ”„ Changed the HttpContext.GetService<'T>() extension method to throw a MissingDependencyException if it cannot resolve a desired dependency.

    ๐Ÿ†• New features

    • โž• Added two new http handlers to validate an ASP.NET Core AuthorizationPolicy (see: Policy based authorization). The authorizeByPolicyName and authorizeByPolicy http handlers will use ASP.NET Core's authorization service to validate a user against a given policy.
    • โšก๏ธ Updated TaskBuilder.fs to version 2.0.*.
    • โšก๏ธ Updated ASP.NET Core NuGet packages to latest 2.1.* versions.
    • Enabled return! for opt { } computation expressions.
    • Added blockquote, _integrity and _scoped to the GiraffeViewEngine.
    • โž• Added attributes for mouse, keyboard, touch, drag & drop, focus, input and mouse wheel events to the GiraffeViewEngine.
    • โž• Added new accessibility attributes to the GriaffeViewEngine. These can be used after opening the Giraffe.GiraffeViewEngine.Accessibility module.
    • โž• Added a new Successful.NO_CONTENT http handler which can be used to return a HTTP 204 response.
    • โž• Added more structured logging around the Giraffe middleware.

    ๐Ÿ› Bug fixes

    • ๐Ÿ›  Fixed a bug in routef, routeCif and subRoutef which prohibited to parse multiple GUIDs
    • ๐Ÿ›  Fixed a bug in routef, routeCif and subRoutef which wrongly decoded a route argument twice (and therefore turned + signs into spaces).
    • ๐Ÿ›  Fixed XML documentation for all Giraffe functions which should make function tooltips nicely formatted again.
    • Enabled the HttpContext.BindModelAsync<'T>() extension method and the bindModel<'T> http handler to also bind to a model in the case of a PATCH or DELETE http request.
  • v1.1.0 Changes

    ๐Ÿ†• New features

    • โž• Added subRoutef http handler (see subRoutef)
    • โž• Added routex and routeCix http handler (see routex)
    • ๐Ÿ‘Œ Improved model binding (see Model Binding)
      • Fixed issues: #121, #206
      • Added a TryBindFormAsync and a TryBindQueryString HttpContext extension methods
      • Added new HttpHandler functions to offer a more functional API for model binding:
        • bindJson<'T>
        • bindXml<'T>
        • bindForm<'T>
        • tryBindForm<'T>
        • bindQuery<'T>
        • tryBindQuery<'T>
        • bindModel<'T>
    • โž• Added new Model Validation API

    ๐Ÿš€ To see an example of the new features you can check the official Giraffe 1.1.0 release blog post.

    ๐Ÿ› Bug fixes

    • routeBind works when nested in a subRoute handler now
    • routeBind doesn't crate a model object any more if the route arguments do not match the provided model
  • v1.0.0 Changes

    ๐Ÿš€ First RTM release of Giraffe.

    ๐Ÿš€ This release has many minor breaking changes and a few bigger features. Please read the changelog carefully before updating your existing application.

    ๐Ÿ†• New features

    • ๐Ÿ“š JSON and XML serialization is now configurable through Dependency Injection (see Serialization)
    • โž• Added new features to validate conditional HTTP headers before processing a web request (see Conditional Requests)
    • โž• Added streaming capabilities (see Streaming)
    • โž• Added HEAD, OPTIONS, TRACE, CONNECT http handlers
    • โž• Added more HttpContext extension methods to create parity between response writing methods and HttpHandler functions (see Response Writing and Content Negotiation)
    • โž• Added detailed XML docs to all public facing functions for better Intellisense support
    • The Giraffe.Common module auto opens now

    ๐Ÿ’ฅ Breaking changes

    • ๐Ÿ—„ Deprecated Griaffe.Tasks. Giraffe uses the original TaskBuilder.fs library now.
    • 0๏ธโƒฃ Giraffe comes with a default set of required dependencies which need to be registered via services.AddGiraffe() during application startup now
    • ๐Ÿ“ฆ The Giraffe.TokenRouter library has been moved to a separate NuGet package under the same name
    • โœ‚ Removed redundant serialization methods
      • Removed serializeJson, deserializeJson<'T>, deserializeJsonFromStream<'T>, defaultJsonSerializerSettings, defaultSerializeJson, defaultDeserializeJson<'T>, serializeXml and deserializeXml<'T>
    • โœ‚ Removed the customJson http handler
    • ๐Ÿ“‡ Renamed the html http handler to htmlString
    • ๐Ÿ“‡ Renamed the renderHtml http handler to htmlView
    • ๐Ÿ“‡ Renamed setBodyAsString http handler to setBodyFromString
    • ๐Ÿ“‡ Renamed ReturnHtmlFileAsync() to WriteHtmlFileAsync()
      • The function can also accept relative and absolute file paths now
    • ๐Ÿ“‡ Renamed RenderHtmlAsync() to WriteHtmlViewAsync()
    • โœ‚ Removed the overloads for BindJsonAsync<'T>, BindModelAsync<'T> and WriteJsonAsync which accepted an object of type JsonSerializerSettings
    • ๐Ÿ“‡ Renamed the signOff http handler to signOut to be more consistent with existing ASP.NET Core naming conventions

    ๐Ÿš€ To get a summary of the new features and changes you can check the official Giraffe 1.0.0 release blog post.

  • v0.1.9 Changes

    • ๐Ÿ›  Fixed wrong version numbers in package references for Giraffe and Giraffe.Razor
  • v0.1.0 Changes

    ๐Ÿ’ฅ Breaking changes

    • โœ… Renamed portRoute to routePorts to be more consistent with other routing functions (route, routef, routeStartsWith, etc.)

    ๐Ÿ†• New features

    • ๐Ÿ‘ routef and routeCif both support %O for matching System.Guid values now
    • โž• Added HTML attributes helper functions to the GiraffeViewEngine.

    Example:

    let html = p [ _class "someCssClass"; _id "greetingsText" ] [ encodedText "Hello World" ]