From 6c18f21994687c6ab285a84f13f17d5bd3ec290e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chris=20Dos=C3=A9?= Date: Tue, 7 Jan 2025 11:17:11 -0800 Subject: [PATCH] Update all deps and reformat using new formatter rules --- .tool-versions | 4 +- Dockerfile | 6 +- lib/ambry_web/components/admin/components.ex | 72 +++++----- .../components/admin/layouts/app.html.heex | 2 +- .../components/admin/layouts/root.html.heex | 4 +- lib/ambry_web/components/admin/rich_select.ex | 6 +- lib/ambry_web/components/core_components.ex | 135 ++++++++---------- lib/ambry_web/components/layouts.ex | 10 +- .../components/layouts/app.html.heex | 2 +- .../components/layouts/auth.html.heex | 2 +- .../components/layouts/root.html.heex | 8 +- .../components/preview/layouts/app.heex | 2 +- .../components/preview/layouts/root.html.heex | 4 +- .../preview/audiobook_html/show.html.heex | 6 +- .../live/admin/audit_live/index.html.heex | 12 +- .../live/admin/book_live/form.html.heex | 6 +- .../form/audible_import_form.html.heex | 14 +- .../form/goodreads_import_form.html.heex | 22 +-- .../live/admin/book_live/index.html.heex | 14 +- lib/ambry_web/live/admin/home_live/index.ex | 8 +- .../live/admin/home_live/index.html.heex | 14 +- .../chapters/audible_import_form.html.heex | 8 +- .../chapters/source_import_form.html.heex | 4 +- lib/ambry_web/live/admin/media_live/form.ex | 8 +- .../live/admin/media_live/form.html.heex | 14 +- .../form/audible_import_form.html.heex | 12 +- .../admin/media_live/form/file_browser.ex | 24 ++-- .../form/goodreads_import_form.html.heex | 18 +-- .../live/admin/media_live/index.html.heex | 28 ++-- .../live/admin/person_live/form.html.heex | 4 +- .../person_live/form/import_form.html.heex | 10 +- .../live/admin/person_live/index.html.heex | 14 +- .../live/admin/series_live/form.html.heex | 2 +- .../live/admin/series_live/index.html.heex | 10 +- .../live/admin/user_live/index.html.heex | 20 +-- lib/ambry_web/live/audiobook_live.ex | 16 +-- lib/ambry_web/live/author_live.ex | 2 +- lib/ambry_web/live/book_live.ex | 2 +- lib/ambry_web/live/narrator_live.ex | 2 +- .../live/now_playing_live/bookmarks.ex | 6 +- .../live/now_playing_live/components.ex | 10 +- lib/ambry_web/live/person_live.ex | 17 ++- lib/ambry_web/live/search_live.ex | 2 +- lib/ambry_web/live/search_live/components.ex | 8 +- lib/ambry_web/live/series_live.ex | 2 +- mix.exs | 2 +- mix.lock | 32 ++--- 47 files changed, 310 insertions(+), 320 deletions(-) diff --git a/.tool-versions b/.tool-versions index 16c4fda9..b90afa45 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,4 +1,4 @@ # NOTE: make sure these versions match in Containerfile -elixir 1.17.2-otp-27 -erlang 27.0.1 +elixir 1.18.1-otp-27 +erlang 27.2 diff --git a/Dockerfile b/Dockerfile index 96d84fa8..04431b13 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ # NOTE: make sure these versions match in .tool-versions # NOTE: make sure the alpine version matches down below -FROM docker.io/hexpm/elixir:1.17.2-erlang-27.0.1-alpine-3.20.2 AS elixir-builder +FROM docker.io/hexpm/elixir:1.18.1-erlang-27.2-alpine-3.21.1 AS elixir-builder ARG MIX_ENV=prod @@ -50,9 +50,9 @@ RUN mix release --path /app --quiet # -------------------------- # Base Image - elixir-runner # -------------------------- -FROM docker.io/alpine:3.20.2 as elixir-runner +FROM docker.io/alpine:3.21.1 as elixir-runner -ARG SHAKA_PACKAGER_VERSION=3.2.0 +ARG SHAKA_PACKAGER_VERSION=3.4.1 RUN apk --update upgrade && \ apk add openssl ncurses-libs libstdc++ ffmpeg curl diff --git a/lib/ambry_web/components/admin/components.ex b/lib/ambry_web/components/admin/components.ex index f7d7d549..a0329da1 100644 --- a/lib/ambry_web/components/admin/components.ex +++ b/lib/ambry_web/components/admin/components.ex @@ -20,12 +20,12 @@ defmodule AmbryWeb.Admin.Components do ~H"""
<.layout_header user={@user} title={@title}> - <%= render_slot(@subheader) %> + {render_slot(@subheader)}
- <%= render_slot(@inner_block) %> + {render_slot(@inner_block)}
@@ -49,7 +49,7 @@ defmodule AmbryWeb.Admin.Components do <.title class="hidden h-6 sm:block lg:h-7" />
- <%= @title %> + {@title}
- <%= render_slot(@inner_block) %> + {render_slot(@inner_block)} """ end @@ -214,7 +214,7 @@ defmodule AmbryWeb.Admin.Components do
<%= if @rows == [] do %>
- <%= render_slot(@no_results) %> + {render_slot(@no_results)}
<% else %> @@ -226,7 +226,7 @@ defmodule AmbryWeb.Admin.Components do class={["flex items-center gap-2", if(col[:sort_field], do: "cursor-pointer select-none")]} phx-click={if(col[:sort_field], do: JS.push("sort", value: %{field: col.sort_field}))} > -

<%= col[:label] %>

+

{col[:label]}

<.sort_icon :if={col[:sort_field]} sort={@sort} sort_field={col.sort_field} /> @@ -243,18 +243,18 @@ defmodule AmbryWeb.Admin.Components do <%= for col <- @col do %> <%= if @row_click do %> <% else %> <% end %> <% end %> <%= if assigns[:actions] do %> <% end %> @@ -278,15 +278,15 @@ defmodule AmbryWeb.Admin.Components do <%= if @rows == [] do %>

<%= if @filter do %> - No results for "<%= @filter %>" + No results for "{@filter}" <% else %> - <%= render_slot(@empty) %> + {render_slot(@empty)} <% end %>

<% else %> <.admin_table_container> <.admin_table_row :for={row <- @rows} phx-click={@row_click && @row_click.(row)}> - <%= render_slot(@row, row) %> + {render_slot(@row, row)} <% end %> @@ -298,7 +298,7 @@ defmodule AmbryWeb.Admin.Components do defp admin_table_container(assigns) do ~H"""
- <%= render_slot(@inner_block) %> + {render_slot(@inner_block)}
""" end @@ -309,7 +309,7 @@ defmodule AmbryWeb.Admin.Components do defp admin_table_row(assigns) do ~H"""
- <%= render_slot(@inner_block) %> + {render_slot(@inner_block)}
""" end @@ -319,7 +319,7 @@ defmodule AmbryWeb.Admin.Components do def sort_button_bar(assigns) do ~H"""
- <%= render_slot(@inner_block) %> + {render_slot(@inner_block)}
""" end @@ -334,7 +334,7 @@ defmodule AmbryWeb.Admin.Components do class="flex cursor-pointer select-none items-center gap-2 p-2" phx-click={JS.push("sort", value: %{field: @sort_field})} > - <%= render_slot(@inner_block) %> + {render_slot(@inner_block)} <.sort_icon sort={@current_sort} sort_field={@sort_field} /> """ @@ -390,7 +390,7 @@ defmodule AmbryWeb.Admin.Components do def badge(assigns) do ~H"""
- <%= render_slot(@inner_block) %> + {render_slot(@inner_block)}
""" end @@ -461,7 +461,7 @@ defmodule AmbryWeb.Admin.Components do phx-click={JS.dispatch("change")} class="text-brand flex cursor-pointer items-center gap-1 hover:underline dark:text-brand-dark" > - <%= render_slot(@inner_block) %> + {render_slot(@inner_block)} """ @@ -479,9 +479,9 @@ defmodule AmbryWeb.Admin.Components do """ @@ -498,17 +498,17 @@ defmodule AmbryWeb.Admin.Components do
-

<%= @book.title %>

+

{@book.title}

by - <%= contributor.name %> - (<%= contributor.type %>) + {contributor.name} + ({contributor.type})

- <%= render_slot(action) %> + {render_slot(action)}
@@ -520,21 +520,21 @@ defmodule AmbryWeb.Admin.Components do
-

<%= @book.title %>

+

{@book.title}

by - <%= contributor.name %> - (<%= contributor.type %>) + {contributor.name} + ({contributor.type})

- Published <%= display_date(@book.published) %> by <%= @book.publisher %> + Published {display_date(@book.published)} by {@book.publisher}

-

<%= @book.format %>

+

{@book.format}

- <%= render_slot(action) %> + {render_slot(action)}
@@ -546,27 +546,27 @@ defmodule AmbryWeb.Admin.Components do
-

<%= @book.title %>

+

{@book.title}

by - <%= author.name %> + {author.name}

Narrated by - <%= narrator.name %> + {narrator.name}

- Published <%= display_date(@book.published) %> by <%= @book.publisher %> + Published {display_date(@book.published)} by {@book.publisher}

-

<%= @book.format %>

+

{@book.format}

- <%= render_slot(action) %> + {render_slot(action)}
diff --git a/lib/ambry_web/components/admin/layouts/app.html.heex b/lib/ambry_web/components/admin/layouts/app.html.heex index 2e3ca9ab..c42af049 100644 --- a/lib/ambry_web/components/admin/layouts/app.html.heex +++ b/lib/ambry_web/components/admin/layouts/app.html.heex @@ -3,5 +3,5 @@
<.side_nav active_path={@admin_nav_active_path} /> - <%= @inner_content %> + {@inner_content}
diff --git a/lib/ambry_web/components/admin/layouts/root.html.heex b/lib/ambry_web/components/admin/layouts/root.html.heex index f22b6b72..c779a6c7 100644 --- a/lib/ambry_web/components/admin/layouts/root.html.heex +++ b/lib/ambry_web/components/admin/layouts/root.html.heex @@ -9,7 +9,7 @@ <.live_title suffix=" • Ambry Admin"> - <%= assigns[:page_title] || "Personal Audiobook Streaming" %> + {assigns[:page_title] || "Personal Audiobook Streaming"}
- <%= render_slot(col, row) %> + {render_slot(col, row)} - <%= render_slot(col, row) %> + {render_slot(col, row)} - <%= render_slot(@actions, row) %> + {render_slot(@actions, row)}