diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 4f865fb4e..76030c564 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -17,30 +17,29 @@ jobs: ocaml-compiler: - 4.04.x - 4.05.x - - 4.06.x - - 4.07.x - - 4.08.x - - 4.09.x - - 4.10.x - 4.11.x - - 4.12.x + - 4.13.x + - 4.14.x + - 5.0.x + - 5.1.x include: - os: macos-latest - ocaml-compiler: 4.12.x + ocaml-compiler: 4.14.x - os: windows-latest - ocaml-compiler: 4.12.x + ocaml-compiler: 4.14.x + - os: macos-latest + ocaml-compiler: 5.1.x runs-on: ${{ matrix.os }} steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Use OCaml ${{ matrix.ocaml-compiler }} uses: ocaml/setup-ocaml@v2 with: ocaml-compiler: ${{ matrix.ocaml-compiler }} - dune-cache: true opam-depext-flags: --with-test - run: opam install . --deps-only --with-test diff --git a/CHANGES.md b/CHANGES.md index 51542f7d0..8f2859210 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,4 +1,13 @@ -# NEXT +# 4.6.0 + +* Update for OCaml 5.0 and drop support for OCaml 4.2.0 + (#312 by @rr0gi) + +* Add additional variants to `linktype` for the `rel` attribute + (Leon @LogicalOverflow Vack) + +* Expand options for `autocomplete` attribute on `` elements + (#302 by Aron @aronerben Erben) * Fix the SVG animation attributes `a_animation_values`, `a_keyTimes` and `a_keySplines` to contain semicolon separated values. @@ -10,10 +19,15 @@ * Add support for `dialog` element and `onclose` attribute (#301 by Julien Sagot) - +* Add an escape hatch for emitting attributes with non-standard names + in jsx or ppx code (a leading `_` character on attribute name) + (#295 Chas @cemerick Emerick) * Add support for `type` attribute on `|}]], [script ~a:[a_script_type (`Mime "text/javascript")] @@ txt ""]; + "script empty", + [[%html {||}]], + [script @@ txt ""]; + + "textarea empty", + [[%html {||}]], + [textarea @@ txt ""]; + ] let attribs = "ppx attribs", HtmlTests.make Html.[ @@ -235,17 +243,45 @@ let attribs = "ppx attribs", HtmlTests.make Html.[ [[%html "
"]], [div ~a:[a_draggable false] []] ; - "onoff default", + "form autocomplete default is on", [[%html ""]], - [form ~a:[a_autocomplete true] []] ; + [form ~a:[a_autocomplete `On] []] ; - "bool true", + "form autocomplete on", [[%html ""]], - [form ~a:[a_autocomplete true] []] ; + [form ~a:[a_autocomplete `On] []] ; - "bool false", + "form autocomplete off", [[%html ""]], - [form ~a:[a_autocomplete false] []] ; + [form ~a:[a_autocomplete `Off] []] ; + + "form autocomplete tokenlist", + [[%html ""]], + [form ~a:[a_autocomplete (`Tokens ["section-blue"; "shipping"; "street-address"] )] []] ; + + "form autocomplete tokenlist empty", + [[%html ""]], + [form ~a:[a_autocomplete (`Tokens [] )] []] ; + + "input autocomplete default is on", + [[%html ""]], + [input ~a:[a_autocomplete `On] ()] ; + + "input autocomplete on", + [[%html ""]], + [input ~a:[a_autocomplete `On] ()] ; + + "input autocomplete off", + [[%html ""]], + [input~a:[a_autocomplete `Off] ()] ; + + "input autocomplete tokenlist", + [[%html ""]], + [input ~a:[a_autocomplete (`Tokens ["section-blue"; "shipping"; "street-address"] )] ()] ; + + "input autocomplete tokenlist empty", + [[%html ""]], + [input ~a:[a_autocomplete (`Tokens [] )] ()] ; "link rel=canonical", [[%html ""]], @@ -283,6 +319,12 @@ let attribs = "ppx attribs", HtmlTests.make Html.[ [[%html ""]], [div ~a:[a_user_data "foo" "valfoo"] []] ; + + "arbitrary (unchecked) attributes via an escape hatch", + [[%html ""]], + [div + ~a:[Unsafe.string_attrib "some-attr" "value"] []] + ] let ns_nesting = "namespace nesting" , HtmlTests.make Html.[ @@ -374,6 +416,14 @@ let svg = "svg", SvgTests.make Svg.[ [[%svg "