Skip to content

Commit 36ad469

Browse files
authored
Merge pull request #456 from phoenixframework/sd-update-deps
Update dependencies
2 parents 7901e06 + 96f6468 commit 36ad469

File tree

7 files changed

+61
-45
lines changed

7 files changed

+61
-45
lines changed

.formatter.exs

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ locals_without_parens = [
77
[
88
import_deps: [:phoenix],
99
plugins: [Phoenix.LiveView.HTMLFormatter],
10+
# TODO: remove when we drop support for LV 0.19/0.20
11+
migrate_eex_to_curly_interpolation: false,
1012
inputs: ["*.{ex,exs}", "{config,lib,test}/**/*.{ex,exs}"],
1113
locals_without_parens: locals_without_parens,
1214
export: [locals_without_parens: locals_without_parens]

mix.exs

+4-4
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,14 @@ defmodule Phoenix.LiveDashboard.MixProject do
5656
{:ecto, "~> 3.6.2 or ~> 3.7", optional: true},
5757

5858
# Dev and test
59-
{:circular_buffer, "~> 0.3", only: :dev},
60-
{:telemetry_poller, "~> 0.4", only: :dev},
59+
{:circular_buffer, "~> 0.4", only: :dev},
60+
{:telemetry_poller, "~> 1.0", only: :dev},
6161
{:phoenix_live_reload, "~> 1.2", only: :dev},
6262
{:plug_cowboy, "~> 2.0", only: :dev},
6363
{:jason, "~> 1.0", only: [:dev, :test, :docs]},
6464
{:floki, "~> 0.27", only: :test},
65-
{:stream_data, "~> 0.1", only: :test},
66-
{:ecto_sqlite3, "~> 0.9.1", only: [:dev, :test]},
65+
{:stream_data, "~> 1.0", only: :test},
66+
{:ecto_sqlite3, "~> 0.17", only: [:dev, :test]},
6767
{:ex_doc, "~> 0.21", only: :docs},
6868
{:makeup_eex, ">= 0.1.1", only: :docs},
6969
{:esbuild, "~> 0.5", only: :dev},

mix.lock

+31-31
Large diffs are not rendered by default.

test/phoenix/live_dashboard/components/title_bar_component_test.exs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ defmodule Phoenix.LiveDashboard.TitleBarComponentTest do
1717
)
1818

1919
assert result =~ "123"
20-
assert result =~ ~R|<style nonce="style_nonce">\s*#.*\{width:0.1%\}|
20+
assert result =~ ~r|<style nonce="style_nonce">\s*#.*\{width:0.1%\}|
2121
assert result =~ "div class=\"test-class\""
2222
end
2323
end

test/phoenix/live_dashboard/pages/processes_live_test.exs

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ defmodule Phoenix.LiveDashboard.ProcessesLiveTest do
136136
live |> element("button", @kill_process_label) |> render_click()
137137
assert_received {:DOWN, ^ref, _, _, :killed}
138138

139-
return_path = processes_path(10, "", :message_queue_len, :desc)
139+
return_path = processes_path("config", 10, "", :message_queue_len, :desc)
140140
assert_patch(live, return_path, 1000)
141141
end
142142

test/phoenix/live_dashboard/reingold_tilford_test.exs

-4
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,6 @@ defmodule Phoenix.LiveDashboard.ReingoldTilfordTest do
130130
end
131131
end
132132

133-
defp validate_x_separation_between_nodes(%{children: []} = node, ancestor_x_coordinate) do
134-
if ancestor_x_coordinate + @node_x_separation <= node, do: true, else: false
135-
end
136-
137133
defp validate_x_separation_between_nodes(
138134
%{children: children} = ancestor,
139135
ancestor_x_coordinate

test/test_helper.exs

+22-4
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,28 @@ defmodule Phoenix.LiveDashboardTest.Router do
8787
live_dashboard "/dashboard",
8888
metrics: Phoenix.LiveDashboardTest.Telemetry
8989

90+
live_dashboard "/parent_cookie_domain",
91+
request_logger_cookie_domain: :parent,
92+
live_session_name: :cookie_dashboard
93+
end
94+
95+
# we only really support one live dashboard per router,
96+
# and some tests rely on correct redirect paths that wouldn't work with multiple dashboards;
97+
# as a workaround we forward all non matching requests to a separate router
98+
forward "/", Phoenix.LiveDashboardTest.RouterConfig
99+
end
100+
101+
defmodule Phoenix.LiveDashboardTest.RouterConfig do
102+
use Phoenix.Router
103+
import Phoenix.LiveDashboard.Router
104+
105+
pipeline :browser do
106+
plug :fetch_session
107+
end
108+
109+
scope "/", ThisWontBeUsed, as: :this_wont_be_used do
110+
pipe_through :browser
111+
90112
live_dashboard "/config",
91113
live_socket_path: "/custom/live",
92114
csp_nonce_assign_key: %{
@@ -100,10 +122,6 @@ defmodule Phoenix.LiveDashboardTest.Router do
100122
metrics_history: {TestHistory, :test_data, []},
101123
request_logger_cookie_domain: "my.domain",
102124
live_session_name: :config_dashboard
103-
104-
live_dashboard "/parent_cookie_domain",
105-
request_logger_cookie_domain: :parent,
106-
live_session_name: :cookie_dashboard
107125
end
108126
end
109127

0 commit comments

Comments
 (0)