From 48f9e39ebf855bcaf9296c61454af8d5367688a6 Mon Sep 17 00:00:00 2001 From: Alan Vardy Date: Fri, 20 Dec 2024 14:34:39 -0800 Subject: [PATCH] Update deps --- .github/workflows/ci.yml | 20 ++++++++++---------- .tool-versions | 4 ++-- lib/exzeitable.ex | 10 +++++----- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cc43d28f..4cb773f6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,8 +28,8 @@ jobs: ${{ runner.os }}-credo- - uses: erlef/setup-beam@v1 with: - otp-version: 27.0 - elixir-version: 1.17 + otp-version: 27.2 + elixir-version: 1.18.0 - run: mix deps.get - run: mix credo --strict @@ -59,8 +59,8 @@ jobs: ${{ runner.os }}-credo- - uses: erlef/setup-beam@v1 with: - otp-version: 27.0 - elixir-version: 1.17 + otp-version: 27.2 + elixir-version: 1.18.0 - run: mix deps.get - run: mix doctor @@ -90,8 +90,8 @@ jobs: ${{ runner.os }}-cypress- - uses: erlef/setup-beam@v1 with: - otp-version: 27.0 - elixir-version: 1.17 + otp-version: 27.2 + elixir-version: 1.18.0 - run: mix deps.get - run: mix assets.deploy - run: mix cypress.run @@ -123,8 +123,8 @@ jobs: ${{ runner.os }}-dialyzer- - uses: erlef/setup-beam@v1 with: - otp-version: 27.0 - elixir-version: 1.17 + otp-version: 27.2 + elixir-version: 1.18.0 - run: mix deps.get - run: mix dialyzer @@ -154,8 +154,8 @@ jobs: ${{ runner.os }}-coveralls- - uses: erlef/setup-beam@v1 with: - otp-version: 27.0 - elixir-version: 1.17 + otp-version: 27.2 + elixir-version: 1.18.0 - run: mix deps.get - run: mix coveralls.json - name: Upload to codecov.io diff --git a/.tool-versions b/.tool-versions index 97004565..fe6dc8be 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,2 +1,2 @@ -elixir 1.17 -erlang 27.0 +elixir 1.18 +erlang 27.2 diff --git a/lib/exzeitable.ex b/lib/exzeitable.ex index 67f349ac..aef252d5 100644 --- a/lib/exzeitable.ex +++ b/lib/exzeitable.ex @@ -20,7 +20,7 @@ defmodule Exzeitable do import Phoenix.HTML.Form use PhoenixHTMLHelpers import Ecto.Query - alias Phoenix.LiveView.Helpers + alias Phoenix.LiveView.{Helpers, Socket} alias Exzeitable.{Database, Filter, Format, HTML, Params, Validation} @callback render(map) :: {:ok, iolist} @type socket :: Phoenix.LiveView.Socket.t() @@ -104,7 +104,7 @@ defmodule Exzeitable do end @doc "Changes page when pagination buttons are clicked" - def handle_event("change_page", %{"page" => page}, %{assigns: %{params: params}} = socket) do + def handle_event("change_page", %{"page" => page}, %Socket{assigns: %{params: params}} = socket) do new_params = Map.put(params, :page, String.to_integer(page)) socket @@ -150,7 +150,7 @@ defmodule Exzeitable do {:noreply, maybe_get_records(socket)} end - defp maybe_get_records(%{assigns: %{params: params}} = socket) do + defp maybe_get_records(%Socket{assigns: %{params: params}} = socket) do if connected?(socket) do socket |> assign_params(:list, Database.get_records(params)) @@ -162,7 +162,7 @@ defmodule Exzeitable do end end - defp maybe_set_refresh(%{socket: %{assigns: %{refresh: refresh}}} = socket) + defp maybe_set_refresh(%{socket: %Socket{assigns: %{refresh: refresh}} = socket}) when is_integer(refresh) do with true <- connected?(socket), {:ok, _tref} <- :timer.send_interval(refresh, self(), :refresh) do @@ -176,7 +176,7 @@ defmodule Exzeitable do socket end - defp assign_params(%{assigns: %{params: params}} = socket, key, value) do + defp assign_params(%Socket{assigns: %{params: params}} = socket, key, value) do params |> Map.put(key, value) |> then(&assign(socket, :params, &1))