Skip to content

Commit

Permalink
Merge pull request #456 from phoenixframework/sd-update-deps
Browse files Browse the repository at this point in the history
Update dependencies
  • Loading branch information
SteffenDE authored Dec 4, 2024
2 parents 7901e06 + 96f6468 commit 36ad469
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 45 deletions.
2 changes: 2 additions & 0 deletions .formatter.exs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ locals_without_parens = [
[
import_deps: [:phoenix],
plugins: [Phoenix.LiveView.HTMLFormatter],
# TODO: remove when we drop support for LV 0.19/0.20
migrate_eex_to_curly_interpolation: false,
inputs: ["*.{ex,exs}", "{config,lib,test}/**/*.{ex,exs}"],
locals_without_parens: locals_without_parens,
export: [locals_without_parens: locals_without_parens]
Expand Down
8 changes: 4 additions & 4 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ defmodule Phoenix.LiveDashboard.MixProject do
{:ecto, "~> 3.6.2 or ~> 3.7", optional: true},

# Dev and test
{:circular_buffer, "~> 0.3", only: :dev},
{:telemetry_poller, "~> 0.4", only: :dev},
{:circular_buffer, "~> 0.4", only: :dev},
{:telemetry_poller, "~> 1.0", only: :dev},
{:phoenix_live_reload, "~> 1.2", only: :dev},
{:plug_cowboy, "~> 2.0", only: :dev},
{:jason, "~> 1.0", only: [:dev, :test, :docs]},
{:floki, "~> 0.27", only: :test},
{:stream_data, "~> 0.1", only: :test},
{:ecto_sqlite3, "~> 0.9.1", only: [:dev, :test]},
{:stream_data, "~> 1.0", only: :test},
{:ecto_sqlite3, "~> 0.17", only: [:dev, :test]},
{:ex_doc, "~> 0.21", only: :docs},
{:makeup_eex, ">= 0.1.1", only: :docs},
{:esbuild, "~> 0.5", only: :dev},
Expand Down
62 changes: 31 additions & 31 deletions mix.lock

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ defmodule Phoenix.LiveDashboard.TitleBarComponentTest do
)

assert result =~ "123"
assert result =~ ~R|<style nonce="style_nonce">\s*#.*\{width:0.1%\}|
assert result =~ ~r|<style nonce="style_nonce">\s*#.*\{width:0.1%\}|
assert result =~ "div class=\"test-class\""
end
end
Expand Down
2 changes: 1 addition & 1 deletion test/phoenix/live_dashboard/pages/processes_live_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ defmodule Phoenix.LiveDashboard.ProcessesLiveTest do
live |> element("button", @kill_process_label) |> render_click()
assert_received {:DOWN, ^ref, _, _, :killed}

return_path = processes_path(10, "", :message_queue_len, :desc)
return_path = processes_path("config", 10, "", :message_queue_len, :desc)
assert_patch(live, return_path, 1000)
end

Expand Down
4 changes: 0 additions & 4 deletions test/phoenix/live_dashboard/reingold_tilford_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,6 @@ defmodule Phoenix.LiveDashboard.ReingoldTilfordTest do
end
end

defp validate_x_separation_between_nodes(%{children: []} = node, ancestor_x_coordinate) do
if ancestor_x_coordinate + @node_x_separation <= node, do: true, else: false
end

defp validate_x_separation_between_nodes(
%{children: children} = ancestor,
ancestor_x_coordinate
Expand Down
26 changes: 22 additions & 4 deletions test/test_helper.exs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,28 @@ defmodule Phoenix.LiveDashboardTest.Router do
live_dashboard "/dashboard",
metrics: Phoenix.LiveDashboardTest.Telemetry

live_dashboard "/parent_cookie_domain",
request_logger_cookie_domain: :parent,
live_session_name: :cookie_dashboard
end

# we only really support one live dashboard per router,
# and some tests rely on correct redirect paths that wouldn't work with multiple dashboards;
# as a workaround we forward all non matching requests to a separate router
forward "/", Phoenix.LiveDashboardTest.RouterConfig
end

defmodule Phoenix.LiveDashboardTest.RouterConfig do
use Phoenix.Router
import Phoenix.LiveDashboard.Router

pipeline :browser do
plug :fetch_session
end

scope "/", ThisWontBeUsed, as: :this_wont_be_used do
pipe_through :browser

live_dashboard "/config",
live_socket_path: "/custom/live",
csp_nonce_assign_key: %{
Expand All @@ -100,10 +122,6 @@ defmodule Phoenix.LiveDashboardTest.Router do
metrics_history: {TestHistory, :test_data, []},
request_logger_cookie_domain: "my.domain",
live_session_name: :config_dashboard

live_dashboard "/parent_cookie_domain",
request_logger_cookie_domain: :parent,
live_session_name: :cookie_dashboard
end
end

Expand Down

0 comments on commit 36ad469

Please sign in to comment.