From 05e179809f8f3511fb5e3f70eab5034b5dbaa53f Mon Sep 17 00:00:00 2001 From: Dustin Moris Gorski Date: Tue, 8 Dec 2020 09:54:42 +0000 Subject: [PATCH 1/5] Updated test packages --- .../Giraffe.ViewEngine.Tests.fsproj | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/Giraffe.ViewEngine.Tests/Giraffe.ViewEngine.Tests.fsproj b/tests/Giraffe.ViewEngine.Tests/Giraffe.ViewEngine.Tests.fsproj index 324bb04..a14e3fc 100644 --- a/tests/Giraffe.ViewEngine.Tests/Giraffe.ViewEngine.Tests.fsproj +++ b/tests/Giraffe.ViewEngine.Tests/Giraffe.ViewEngine.Tests.fsproj @@ -12,14 +12,14 @@ - - - - - - - - + + + + + + + + From ad488d29c391d2d718d668e780fe8f91eec4214e Mon Sep 17 00:00:00 2001 From: Viktor Andersson Date: Tue, 19 Jan 2021 20:28:54 +0100 Subject: [PATCH 2/5] Add 'slot' and 'template' tags. --- src/Giraffe.ViewEngine/Engine.fs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Giraffe.ViewEngine/Engine.fs b/src/Giraffe.ViewEngine/Engine.fs index b9f3ea0..87866ea 100644 --- a/src/Giraffe.ViewEngine/Engine.fs +++ b/src/Giraffe.ViewEngine/Engine.fs @@ -232,6 +232,10 @@ module HtmlElements = let menuitem = voidTag "menuitem" let summary = tag "summary" + // Web Components + let slot = tag "slot" + let template = tag "template" + // Others let iframe = tag "iframe" From 8dead22b6177ff23f5c9b589fa9fd3e53a795d64 Mon Sep 17 00:00:00 2001 From: Kevin Schneider Date: Thu, 6 May 2021 08:11:33 +0200 Subject: [PATCH 3/5] Support netstandard2.0 by not using ArrayPool for that tfw --- src/Giraffe.ViewEngine/Engine.fs | 12 +++++++++++- src/Giraffe.ViewEngine/Giraffe.ViewEngine.fsproj | 4 ++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/Giraffe.ViewEngine/Engine.fs b/src/Giraffe.ViewEngine/Engine.fs index b9f3ea0..1bf6d59 100644 --- a/src/Giraffe.ViewEngine/Engine.fs +++ b/src/Giraffe.ViewEngine/Engine.fs @@ -634,14 +634,24 @@ module RenderView = [] module AsBytes = + + #if !NETSTANDARD2_0 open System.Buffers + #endif let private outputAsBytes (sb : StringBuilder) = - let chars = ArrayPool.Shared.Rent sb.Length + let chars = + #if NETSTANDARD2_0 + Array.create (sb.Length) Char.MinValue + #else + ArrayPool.Shared.Rent sb.Length + #endif sb.CopyTo(0, chars, 0, sb.Length) let result = Encoding.UTF8.GetBytes(chars, 0, sb.Length) StringBuilderPool.Release sb + #if !NETSTANDARD2_0 ArrayPool.Shared.Return chars + #endif result let xmlNode (node : XmlNode) : byte[] = diff --git a/src/Giraffe.ViewEngine/Giraffe.ViewEngine.fsproj b/src/Giraffe.ViewEngine/Giraffe.ViewEngine.fsproj index 2e8e664..a743353 100644 --- a/src/Giraffe.ViewEngine/Giraffe.ViewEngine.fsproj +++ b/src/Giraffe.ViewEngine/Giraffe.ViewEngine.fsproj @@ -8,7 +8,7 @@ en-GB - net5.0 + net5.0;netstandard2.0 portable Library true @@ -46,5 +46,5 @@ - + From afafe993b7ffb8a3802d9c3602ce5245c608ca36 Mon Sep 17 00:00:00 2001 From: Kevin Schneider Date: Thu, 6 May 2021 15:00:55 +0200 Subject: [PATCH 4/5] Remove conditional open statement for System.Buffers --- src/Giraffe.ViewEngine/Engine.fs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/Giraffe.ViewEngine/Engine.fs b/src/Giraffe.ViewEngine/Engine.fs index 1bf6d59..c9de56a 100644 --- a/src/Giraffe.ViewEngine/Engine.fs +++ b/src/Giraffe.ViewEngine/Engine.fs @@ -635,23 +635,22 @@ module RenderView = [] module AsBytes = - #if !NETSTANDARD2_0 - open System.Buffers - #endif - let private outputAsBytes (sb : StringBuilder) = let chars = #if NETSTANDARD2_0 Array.create (sb.Length) Char.MinValue #else - ArrayPool.Shared.Rent sb.Length + System.Buffers.ArrayPool.Shared.Rent sb.Length #endif + sb.CopyTo(0, chars, 0, sb.Length) let result = Encoding.UTF8.GetBytes(chars, 0, sb.Length) StringBuilderPool.Release sb + #if !NETSTANDARD2_0 - ArrayPool.Shared.Return chars + System.Buffers.ArrayPool.Shared.Return chars #endif + result let xmlNode (node : XmlNode) : byte[] = From ff7b59dfad41448edba614acd5f0b0423ff85b57 Mon Sep 17 00:00:00 2001 From: Dustin Moris Gorski Date: Mon, 24 May 2021 08:59:23 +0100 Subject: [PATCH 5/5] Upped release notes --- RELEASE_NOTES.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index b7aa949..adba10e 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,6 +1,11 @@ Release Notes ============= +## 1.4.0 + +- Added `slot` and `template` elements +- Added .NET Standard 2.0 support for full framework support + ## 1.3.0 Upgraded to `net5.0` target framework.