Bump htmx version; add .NET 8 support

This commit is contained in:
Daniel J. Summers 2023-11-22 16:09:52 -05:00
parent 8fd6af8c26
commit fcaaa693bc
4 changed files with 10 additions and 10 deletions

View File

@ -13,7 +13,7 @@ jobs:
strategy:
matrix:
dotnet-version: [ "6.0", "7.0" ]
dotnet-version: [ "6.0", "7.0", "8.0" ]
steps:
- uses: actions/checkout@v3

View File

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<VersionPrefix>1.9.6</VersionPrefix>
<PackageReleaseNotes>Add support for hx-disabled-elt attribute; update script tags to pull htmx 1.9.6</PackageReleaseNotes>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<VersionPrefix>1.9.8</VersionPrefix>
<PackageReleaseNotes>Update script tags to pull htmx 1.9.8; add support for .NET 8</PackageReleaseNotes>
<Authors>danieljsummers</Authors>
<Company>Bit Badger Solutions</Company>
<PackageProjectUrl>https://github.com/bit-badger/Giraffe.Htmx</PackageProjectUrl>

View File

@ -425,14 +425,14 @@ let script =
let html = RenderView.AsString.htmlNode Script.minified
Expect.equal
html
"""<script src="https://unpkg.com/htmx.org@1.9.6" integrity="sha384-FhXw7b6AlE/jyjlZH5iHa/tTe9EpJ1Y55RjcgPbjeWMskSxZt1v9qkxLJWNJaGni" crossorigin="anonymous"></script>"""
"""<script src="https://unpkg.com/htmx.org@1.9.8" integrity="sha384-rgjA7mptc2ETQqXoYC3/zJvkU7K/aP44Y+z7xQuJiVnB/422P/Ak+F/AqFR7E4Wr" crossorigin="anonymous"></script>"""
"Minified script tag is incorrect"
}
test "unminified succeeds" {
let html = RenderView.AsString.htmlNode Script.unminified
Expect.equal
html
"""<script src="https://unpkg.com/htmx.org@1.9.6/dist/htmx.js" integrity="sha384-DyaDHx3hlXQ3QqTsQbNECvRW/A/B+4OtEWLCHbsDRPI3oJ98ekMiWJ4Yyrrqimog" crossorigin="anonymous"></script>"""
"""<script src="https://unpkg.com/htmx.org@1.9.8/dist/htmx.js" integrity="sha384-zOAIsdGekNHQVAjCjVrQ1xHoxyvnxgr63EH6IyXsCfvKZdRFRyG1u8GbWxO5oZ38" crossorigin="anonymous"></script>"""
"Unminified script tag is incorrect"
}
]

View File

@ -299,14 +299,14 @@ module Script =
/// Script tag to load the minified version from unpkg.com
let minified =
script [ _src "https://unpkg.com/htmx.org@1.9.6"
_integrity "sha384-FhXw7b6AlE/jyjlZH5iHa/tTe9EpJ1Y55RjcgPbjeWMskSxZt1v9qkxLJWNJaGni"
script [ _src "https://unpkg.com/htmx.org@1.9.8"
_integrity "sha384-rgjA7mptc2ETQqXoYC3/zJvkU7K/aP44Y+z7xQuJiVnB/422P/Ak+F/AqFR7E4Wr"
_crossorigin "anonymous" ] []
/// Script tag to load the unminified version from unpkg.com
let unminified =
script [ _src "https://unpkg.com/htmx.org@1.9.6/dist/htmx.js"
_integrity "sha384-DyaDHx3hlXQ3QqTsQbNECvRW/A/B+4OtEWLCHbsDRPI3oJ98ekMiWJ4Yyrrqimog"
script [ _src "https://unpkg.com/htmx.org@1.9.8/dist/htmx.js"
_integrity "sha384-zOAIsdGekNHQVAjCjVrQ1xHoxyvnxgr63EH6IyXsCfvKZdRFRyG1u8GbWxO5oZ38"
_crossorigin "anonymous" ] []