Skip to content

Commit

Permalink
Update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
alanvardy committed Dec 20, 2024
1 parent ab41308 commit 818084c
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 17 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
elixir 1.17
erlang 27.0
elixir 1.18
erlang 27.2
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

## v0.6.8 (2024-12-20)

- Update Elixir and Erlang versions

## v0.6.7 (2024-12-18)

- Update to Phoenix LiveView 1.0
Expand Down
10 changes: 5 additions & 5 deletions lib/exzeitable.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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))
Expand All @@ -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
Expand All @@ -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))
Expand Down

0 comments on commit 818084c

Please sign in to comment.