Update tags and embedded version to v4 alpha8
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
module Giraffe.Htmx.Common
|
module Giraffe.Htmx.Common
|
||||||
|
|
||||||
/// <summary>The version of htmx embedded in the package</summary>
|
/// <summary>The version of htmx embedded in the package</summary>
|
||||||
let HtmxVersion = "4.0.0-alpha6"
|
let HtmxVersion = "4.0.0-alpha8"
|
||||||
|
|
||||||
/// <summary>The path for the provided htmx script</summary>
|
/// <summary>The path for the provided htmx script</summary>
|
||||||
let internal htmxLocalScript = $"/_content/Giraffe.Htmx.Common/htmx.min.js?ver={HtmxVersion}"
|
let internal htmxLocalScript = $"/_content/Giraffe.Htmx.Common/htmx.min.js?ver={HtmxVersion}"
|
||||||
|
|||||||
@@ -2,6 +2,6 @@
|
|||||||
|
|
||||||
This package contains common code shared between [`Giraffe.Htmx`](https://www.nuget.org/packages/Giraffe.Htmx) and [`Giraffe.ViewEngine.Htmx`](https://www.nuget.org/packages/Giraffe.ViewEngine.Htmx), and will be automatically installed when you install either one. It also contains htmx as a static web asset, allowing it to be loaded from your local (or published) project.
|
This package contains common code shared between [`Giraffe.Htmx`](https://www.nuget.org/packages/Giraffe.Htmx) and [`Giraffe.ViewEngine.Htmx`](https://www.nuget.org/packages/Giraffe.ViewEngine.Htmx), and will be automatically installed when you install either one. It also contains htmx as a static web asset, allowing it to be loaded from your local (or published) project.
|
||||||
|
|
||||||
**htmx version: 4.0.0-alpha6**
|
**htmx version: 4.0.0-alpha8**
|
||||||
|
|
||||||
_**NOTE:** Pay special attention to breaking changes highlighted in the packages listed above._
|
_**NOTE:** Pay special attention to breaking changes highlighted in the packages listed above._
|
||||||
2
src/Common/wwwroot/htmx.min.js
vendored
2
src/Common/wwwroot/htmx.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -3,15 +3,13 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
|
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
|
||||||
<VersionPrefix>4.0.0</VersionPrefix>
|
<VersionPrefix>4.0.0</VersionPrefix>
|
||||||
<VersionSuffix>alpha6a</VersionSuffix>
|
<VersionSuffix>alpha8</VersionSuffix>
|
||||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||||
<PackageReleaseNotes>First htmx 4 alpha release of these libraries
|
<PackageReleaseNotes>Update htmx 4 to alpha8
|
||||||
- [Server] Marked removed headers as obsolete; added new HX-Source header
|
- [Common] Update provided htmx 4 to 4.0.0-alpha8
|
||||||
- [View Engine] Marked removed attributes as obsolete
|
- [View Engine] Updated script tags to pull htmx 4.0.0-alpha8
|
||||||
- [View Engine] Added new attributes, modifiers, and support for new hx-partial tag
|
|
||||||
- Updated script tags to pull htmx 4.0.0-alpha6
|
|
||||||
|
|
||||||
See package READMEs; this is not an update-and-forget-it release
|
See package and prior alpha release READMEs; v2 to v4 is not an update-and-forget-it release
|
||||||
</PackageReleaseNotes>
|
</PackageReleaseNotes>
|
||||||
<Authors>danieljsummers</Authors>
|
<Authors>danieljsummers</Authors>
|
||||||
<Company>Bit Badger Solutions</Company>
|
<Company>Bit Badger Solutions</Company>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
This package enables server-side support for [htmx](https://htmx.org) within [Giraffe](https://giraffe.wiki) and ASP.NET's `HttpContext`.
|
This package enables server-side support for [htmx](https://htmx.org) within [Giraffe](https://giraffe.wiki) and ASP.NET's `HttpContext`.
|
||||||
|
|
||||||
**htmx version: 4.0.0-alpha6**
|
**htmx version: 4.0.0-alpha8**
|
||||||
|
|
||||||
_Upgrading from v2.x: the [migration guide](https://four.htmx.org/migration-guide-htmx-4/) lists changes for v4. For this package, the `HX-Trigger` and `HX-Trigger-Name` headers are marked obsolete. They are replaced by `HX-Source`, which provides the triggering tag name and `id` attribute. The `HX-Prompt` header has also been marked as obsolete, as the `hx-prompt` attribute which generated its content has been removed._
|
_Upgrading from v2.x: the [migration guide](https://four.htmx.org/migration-guide-htmx-4/) lists changes for v4. For this package, the `HX-Trigger` and `HX-Trigger-Name` headers are marked obsolete. They are replaced by `HX-Source`, which provides the triggering tag name and `id` attribute. The `HX-Prompt` header has also been marked as obsolete, as the `hx-prompt` attribute which generated its content has been removed._
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ open Giraffe.Htmx
|
|||||||
/// Test to ensure the version was updated
|
/// Test to ensure the version was updated
|
||||||
let version =
|
let version =
|
||||||
test "HtmxVersion is correct" {
|
test "HtmxVersion is correct" {
|
||||||
Expect.equal HtmxVersion "4.0.0-alpha6" "htmx version incorrect"
|
Expect.equal HtmxVersion "4.0.0-alpha8" "htmx version incorrect"
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Tests for the HxSwap module
|
/// Tests for the HxSwap module
|
||||||
|
|||||||
@@ -687,14 +687,14 @@ let script =
|
|||||||
let html = RenderView.AsString.htmlNode Script.cdnMinified
|
let html = RenderView.AsString.htmlNode Script.cdnMinified
|
||||||
Expect.equal
|
Expect.equal
|
||||||
html
|
html
|
||||||
$"""<script src="https://cdn.jsdelivr.net/npm/htmx.org@{HtmxVersion}/dist/htmx.min.js" integrity="sha384-/5n21KGM472oBhvzUrvju8FRDq/4WNMS3TGw5RWFkZR/kq+sCevqNXFcakqRtaHu" crossorigin="anonymous"></script>"""
|
$"""<script src="https://cdn.jsdelivr.net/npm/htmx.org@{HtmxVersion}/dist/htmx.min.js" integrity="sha384-hUj4cz/Dd2p+Dq0r8A6TAMS1u7gu2bTyisk8xCQX3nodazPP+fRmcAWJrTh4Ycwb" crossorigin="anonymous"></script>"""
|
||||||
"CDN minified script tag is incorrect"
|
"CDN minified script tag is incorrect"
|
||||||
}
|
}
|
||||||
test "cdnUnminified succeeds" {
|
test "cdnUnminified succeeds" {
|
||||||
let html = RenderView.AsString.htmlNode Script.cdnUnminified
|
let html = RenderView.AsString.htmlNode Script.cdnUnminified
|
||||||
Expect.equal
|
Expect.equal
|
||||||
html
|
html
|
||||||
$"""<script src="https://cdn.jsdelivr.net/npm/htmx.org@{HtmxVersion}/dist/htmx.js" integrity="sha384-I3uRy2RjSNcS8Oi2SNWZD9IrafyrrrBb4QaHNA9pWVWfJuKtL0p8qAwHSrEyXoKh" crossorigin="anonymous"></script>"""
|
$"""<script src="https://cdn.jsdelivr.net/npm/htmx.org@{HtmxVersion}/dist/htmx.js" integrity="sha384-CHKZYHwIgmpkwoWtoPaiFIiMxP1Up7yHcsZ2NeECzLxRTXCO0mqXlujZwdJgFsFC" crossorigin="anonymous"></script>"""
|
||||||
"CDN unminified script tag is incorrect"
|
"CDN unminified script tag is incorrect"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -978,15 +978,15 @@ module Script =
|
|||||||
/// <summary>Script tag to load the minified version from jsdelivr.net</summary>
|
/// <summary>Script tag to load the minified version from jsdelivr.net</summary>
|
||||||
/// <remarks>Ensure <c>cdn.jsdelivr.net</c> is in your CSP <c>script-src</c> list (if applicable)</remarks>
|
/// <remarks>Ensure <c>cdn.jsdelivr.net</c> is in your CSP <c>script-src</c> list (if applicable)</remarks>
|
||||||
let cdnMinified =
|
let cdnMinified =
|
||||||
script [ _src "https://cdn.jsdelivr.net/npm/htmx.org@4.0.0-alpha6/dist/htmx.min.js"
|
script [ _src "https://cdn.jsdelivr.net/npm/htmx.org@4.0.0-alpha8/dist/htmx.min.js"
|
||||||
_integrity "sha384-/5n21KGM472oBhvzUrvju8FRDq/4WNMS3TGw5RWFkZR/kq+sCevqNXFcakqRtaHu"
|
_integrity "sha384-hUj4cz/Dd2p+Dq0r8A6TAMS1u7gu2bTyisk8xCQX3nodazPP+fRmcAWJrTh4Ycwb"
|
||||||
_crossorigin "anonymous" ] []
|
_crossorigin "anonymous" ] []
|
||||||
|
|
||||||
/// <summary>Script tag to load the unminified version from jsdelivr.net</summary>
|
/// <summary>Script tag to load the unminified version from jsdelivr.net</summary>
|
||||||
/// <remarks>Ensure <c>cdn.jsdelivr.net</c> is in your CSP <c>script-src</c> list (if applicable)</remarks>
|
/// <remarks>Ensure <c>cdn.jsdelivr.net</c> is in your CSP <c>script-src</c> list (if applicable)</remarks>
|
||||||
let cdnUnminified =
|
let cdnUnminified =
|
||||||
script [ _src "https://cdn.jsdelivr.net/npm/htmx.org@4.0.0-alpha6/dist/htmx.js"
|
script [ _src "https://cdn.jsdelivr.net/npm/htmx.org@4.0.0-alpha8/dist/htmx.js"
|
||||||
_integrity "sha384-I3uRy2RjSNcS8Oi2SNWZD9IrafyrrrBb4QaHNA9pWVWfJuKtL0p8qAwHSrEyXoKh"
|
_integrity "sha384-CHKZYHwIgmpkwoWtoPaiFIiMxP1Up7yHcsZ2NeECzLxRTXCO0mqXlujZwdJgFsFC"
|
||||||
_crossorigin "anonymous" ] []
|
_crossorigin "anonymous" ] []
|
||||||
|
|
||||||
/// <summary>Script tag to load the minified version from jsdelivr.net</summary>
|
/// <summary>Script tag to load the minified version from jsdelivr.net</summary>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
This package enables [htmx](https://htmx.org) support within the [Giraffe](https://giraffe.wiki) view engine.
|
This package enables [htmx](https://htmx.org) support within the [Giraffe](https://giraffe.wiki) view engine.
|
||||||
|
|
||||||
**htmx version: 4.0.0-alpha6**
|
**htmx version: 4.0.0-alpha8**
|
||||||
|
|
||||||
_Upgrading from v2.x: see [the migration guide](https://four.htmx.org/migration-guide-htmx-4/) for changes, which are plentiful. htmx switches from `XMLHTTPRequest` to `fetch`, and many changes are related to the new event cycle._
|
_Upgrading from v2.x: see [the migration guide](https://four.htmx.org/migration-guide-htmx-4/) for changes, which are plentiful. htmx switches from `XMLHTTPRequest` to `fetch`, and many changes are related to the new event cycle._
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user