Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.
TypeScript analyticsanalytics-dashboardclickhouseelixirgoogle-analyticsmarketingopen-source-analyticsphoenixplausible-analyticspostgresqlprivacyprivacy-friendlyself-hostedsimple-analyticsstatisticstailwindcssweb-analyticswebsite-analyticswebsite-statswebsite-tracking
update runtime to elixir-1.17.1 and erlang-27.0 (#4255)
ruslandoga5a0718aa7524
diff --git a/.tool-versions b/.tool-versionsindex 49e065e498..18cb90df08 100644--- a/.tool-versions+++ b/.tool-versions@@ -1,3 +1,3 @@-erlang 26.2.1-elixir 1.16.0-otp-26+erlang 27.0+elixir 1.17.1-otp-27nodejs 21.0.0diff --git a/Dockerfile b/Dockerfileindex 26e75aa97d..d86f7b25a3 100644--- a/Dockerfile+++ b/Dockerfile@@ -2,7 +2,7 @@# platform specific, it makes sense to build it in the docker#### Builder-FROM hexpm/elixir:1.16.0-erlang-26.2.1-alpine-3.18.4 as buildcontainer+FROM hexpm/elixir:1.17.1-erlang-27.0-alpine-3.18.6 as buildcontainerARG MIX_ENV=ce@@ -54,7 +54,7 @@ COPY rel relRUN mix release plausible# Main Docker Image-FROM alpine:3.18.4+FROM alpine:3.18.6LABEL maintainer="plausible.io <[email protected]>"ARG BUILD_METADATA={}diff --git a/lib/plausible_web/components/billing/plan_box.ex b/lib/plausible_web/components/billing/plan_box.exindex 574a0f046c..bef98a8b06 100644--- a/lib/plausible_web/components/billing/plan_box.ex+++ b/lib/plausible_web/components/billing/plan_box.ex@@ -330,7 +330,7 @@ defmodule PlausibleWeb.Components.Billing.PlanBox dodefp losing_features_message(features_to_lose) dofeatures_list_str =features_to_lose- |> Enum.map(& &1.display_name)+ |> Enum.map(fn feature_mod -> feature_mod.display_name() end)|> PlausibleWeb.TextHelpers.pretty_join()"This plan does not support #{features_list_str}, which you are currently using. Please note that by subscribing to this plan you will lose access to #{if length(features_to_lose) == 1, do: "this feature", else: "these features"}."diff --git a/lib/plausible_web/templates/layout/focus.html.heex b/lib/plausible_web/templates/layout/focus.html.heexindex 9adcb81e03..744647dec5 100644--- a/lib/plausible_web/templates/layout/focus.html.heex+++ b/lib/plausible_web/templates/layout/focus.html.heex@@ -49,7 +49,7 @@<%= if ee?() do %><p class="text-center text-gray-500 text-xs py-8">- © <%= DateTime.utc_now().year() %> Plausible Analytics. All rights reserved.+ © <%= DateTime.utc_now().year %> Plausible Analytics. All rights reserved.</p><% end %>diff --git a/mix.exs b/mix.exsindex f0f07d5e4d..b40e304b5a 100644--- a/mix.exs+++ b/mix.exs@@ -8,7 +8,7 @@ defmodule Plausible.MixProject dodocs: docs(),app: :plausible,version: System.get_env("APP_VERSION", "0.0.1"),- elixir: "~> 1.14",+ elixir: "~> 1.17",elixirc_paths: elixirc_paths(Mix.env()),start_permanent: Mix.env() in [:prod, :ce],aliases: aliases(),@@ -126,7 +126,7 @@ defmodule Plausible.MixProject do{:ua_inspector, "~> 3.0"},{:ex_doc, "~> 0.28", only: :dev, runtime: false},{:ex_money, "~> 5.12"},- {:mjml_eex, "~> 0.9.0"},+ {:mjml_eex, "~> 0.11.0"},{:mjml, "~> 1.5.0"},{:heroicons, "~> 0.5.0"},{:zxcvbn, git: "https://github.com/techgaun/zxcvbn-elixir.git"},diff --git a/mix.lock b/mix.lockindex fa2c27922e..9123696b18 100644--- a/mix.lock+++ b/mix.lock@@ -23,7 +23,7 @@"cowboy": {:hex, :cowboy, "2.10.0", "ff9ffeff91dae4ae270dd975642997afe2a1179d94b1887863e43f681a203e26", [:make, :rebar3], [{:cowlib, "2.12.1", [hex: :cowlib, repo: "hexpm", optional: false]}, {:ranch, "1.8.0", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "3afdccb7183cc6f143cb14d3cf51fa00e53db9ec80cdcd525482f5e99bc41d6b"},"cowboy_telemetry": {:hex, :cowboy_telemetry, "0.4.0", "f239f68b588efa7707abce16a84d0d2acf3a0f50571f8bb7f56a15865aae820c", [:rebar3], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "7d98bac1ee4565d31b62d59f8823dfd8356a169e7fcbb83831b8a5397404c9de"},"cowlib": {:hex, :cowlib, "2.12.1", "a9fa9a625f1d2025fe6b462cb865881329b5caff8f1854d1cbc9f9533f00e1e1", [:make, :rebar3], [], "hexpm", "163b73f6367a7341b33c794c4e88e7dbfe6498ac42dcd69ef44c5bc5507c8db0"},- "credo": {:hex, :credo, "1.7.3", "05bb11eaf2f2b8db370ecaa6a6bda2ec49b2acd5e0418bc106b73b07128c0436", [:mix], [{:bunt, "~> 0.2.1 or ~> 1.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2 or ~> 1.0", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "35ea675a094c934c22fb1dca3696f3c31f2728ae6ef5a53b5d648c11180a4535"},+ "credo": {:hex, :credo, "1.7.7", "771445037228f763f9b2afd612b6aa2fd8e28432a95dbbc60d8e03ce71ba4446", [:mix], [{:bunt, "~> 0.2.1 or ~> 1.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2 or ~> 1.0", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "8bc87496c9aaacdc3f90f01b7b0582467b69b4bd2441fe8aae3109d843cc2f2e"},"csv": {:hex, :csv, "2.5.0", "c47b5a5221bf2e56d6e8eb79e77884046d7fd516280dc7d9b674251e0ae46246", [:mix], [{:parallel_stream, "~> 1.0.4 or ~> 1.1.0", [hex: :parallel_stream, repo: "hexpm", optional: false]}], "hexpm", "e821f541487045c7591a1963eeb42afff0dfa99bdcdbeb3410795a2f59c77d34"},"ctx": {:hex, :ctx, "0.6.0", "8ff88b70e6400c4df90142e7f130625b82086077a45364a78d208ed3ed53c7fe", [:rebar3], [], "hexpm", "a14ed2d1b67723dbebbe423b28d7615eb0bdcba6ff28f2d1f1b0a7e1d4aa5fc2"},"db_connection": {:hex, :db_connection, "2.6.0", "77d835c472b5b67fc4f29556dee74bf511bbafecdcaf98c27d27fa5918152086", [:mix], [{:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "c2f992d15725e721ec7fbc1189d4ecdb8afef76648c746a8e1cad35e3b8a35f3"},@@ -83,7 +83,7 @@"mimerl": {:hex, :mimerl, "1.2.0", "67e2d3f571088d5cfd3e550c383094b47159f3eee8ffa08e64106cdf5e981be3", [:rebar3], [], "hexpm", "f278585650aa581986264638ebf698f8bb19df297f66ad91b18910dfc6e19323"},"mint": {:hex, :mint, "1.6.0", "88a4f91cd690508a04ff1c3e28952f322528934be541844d54e0ceb765f01d5e", [:mix], [{:castore, "~> 0.1.0 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:hpax, "~> 0.1.1 or ~> 0.2.0", [hex: :hpax, repo: "hexpm", optional: false]}], "hexpm", "3c5ae85d90a5aca0a49c0d8b67360bbe407f3b54f1030a111047ff988e8fefaa"},"mjml": {:hex, :mjml, "1.5.0", "20a4ed2490a60c6928d45a69b64fb45ce8d8bdac686ef689315b0adda69c6406", [:mix], [{:rustler, ">= 0.0.0", [hex: :rustler, repo: "hexpm", optional: true]}, {:rustler_precompiled, "~> 0.6.0", [hex: :rustler_precompiled, repo: "hexpm", optional: false]}], "hexpm", "44dc36c0fccf52eeb8e0afcb26a863ba41a5f9adcb71bb32e084619a13bb4cdf"},- "mjml_eex": {:hex, :mjml_eex, "0.9.1", "102b6b6e57bfd6db01e0feef801b573fcddb1ee34effb884695da8407544a5be", [:mix], [{:erlexec, "~> 2.0", [hex: :erlexec, repo: "hexpm", optional: true]}, {:mjml, "~> 1.5.0", [hex: :mjml, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 3.2", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "310f9364d4f1126170835db6fb8dad87e393b28860b0e710d870812fb0bd7892"},+ "mjml_eex": {:hex, :mjml_eex, "0.11.0", "f0845730f4caccddea7c98ab5ad1485831446b7c09896fa5ed54b3fa0c431e72", [:mix], [{:erlexec, "~> 2.0", [hex: :erlexec, repo: "hexpm", optional: true]}, {:mjml, "~> 1.0 or ~> 2.0 or ~> 3.0", [hex: :mjml, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 3.2 or ~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "0c60732fe766336ec504a94cad4ebf30405f05fa8920a544ff0ef936252438ac"},"mox": {:hex, :mox, "1.1.0", "0f5e399649ce9ab7602f72e718305c0f9cdc351190f72844599545e4996af73c", [:mix], [], "hexpm", "d44474c50be02d5b72131070281a5d3895c0e7a95c780e90bc0cfe712f633a13"},"mua": {:hex, :mua, "0.2.0", "ca7e7a00848719c95c6f72094b41e7b9af1ad85048b948d696d6a8f9e31dcdd3", [:mix], [{:castore, "~> 0.1.0 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}], "hexpm", "b8dc60683ff03ca85359ecd83db7f7da66cf2eada1289e0bb531b0724702c09a"},"nanoid": {:hex, :nanoid, "2.1.0", "d192a5bf1d774258bc49762b480fca0e3128178fa6d35a464af2a738526607fd", [:mix], [], "hexpm", "ebc7a342d02d213534a7f93a091d569b9fea7f26fcd3a638dc655060fc1f76ac"},diff --git a/test/plausible_web/components/billing/notice_test.exs b/test/plausible_web/components/billing/notice_test.exsindex 07eb69c38f..8431721031 100644--- a/test/plausible_web/components/billing/notice_test.exs+++ b/test/plausible_web/components/billing/notice_test.exs@@ -1,6 +1,6 @@defmodule PlausibleWeb.Components.Billing.NoticeTest douse Plausible.DataCase- import Phoenix.LiveViewTest+ import Plausible.LiveViewTest, only: [render_component: 2]alias PlausibleWeb.Components.Billing.Noticetest "premium_feature/1 does not render a notice when user is on trial" dodiff --git a/test/plausible_web/controllers/api/stats_controller/main_graph_test.exs b/test/plausible_web/controllers/api/stats_controller/main_graph_test.exsindex 773bc8cbf5..d4b0c36e8d 100644--- a/test/plausible_web/controllers/api/stats_controller/main_graph_test.exs+++ b/test/plausible_web/controllers/api/stats_controller/main_graph_test.exs@@ -1241,8 +1241,8 @@ defmodule PlausibleWeb.Api.StatsController.MainGraphTest doendend- @tag :ee_onlydescribe "GET /api/stats/main-graph - total_revenue plot" do+ @describetag :ee_onlysetup [:create_user, :log_in, :create_new_site, :create_legacy_site_import]test "plots total_revenue for a month", %{conn: conn, site: site} do@@ -1321,8 +1321,8 @@ defmodule PlausibleWeb.Api.StatsController.MainGraphTest doendend- @tag :ee_onlydescribe "GET /api/stats/main-graph - average_revenue plot" do+ @describetag :ee_onlysetup [:create_user, :log_in, :create_new_site, :create_legacy_site_import]test "plots total_revenue for a month", %{conn: conn, site: site} dodiff --git a/test/plausible_web/live/components/combo_box_test.exs b/test/plausible_web/live/components/combo_box_test.exsindex 156c920257..eca08effa8 100644--- a/test/plausible_web/live/components/combo_box_test.exs+++ b/test/plausible_web/live/components/combo_box_test.exs@@ -1,6 +1,7 @@defmodule PlausibleWeb.Live.Components.ComboBoxTest douse PlausibleWeb.ConnCase, async: true- import Phoenix.LiveViewTest+ import Phoenix.LiveViewTest, except: [render_component: 2]+ import Plausible.LiveViewTest, only: [render_component: 2]import Plausible.Test.Support.HTMLalias PlausibleWeb.Live.Components.ComboBoxdiff --git a/test/plausible_web/live/components/form_test.exs b/test/plausible_web/live/components/form_test.exsindex 04d060549e..c344add904 100644--- a/test/plausible_web/live/components/form_test.exs+++ b/test/plausible_web/live/components/form_test.exs@@ -1,6 +1,6 @@defmodule PlausibleWeb.Live.Components.FormTest douse PlausibleWeb.ConnCase, async: true- import Phoenix.LiveViewTest+ import Plausible.LiveViewTest, only: [render_component: 2]import Plausible.Test.Support.HTMLalias Plausible.Auth.Userdiff --git a/test/plausible_web/live/components/verification_test.exs b/test/plausible_web/live/components/verification_test.exsindex 44712121fe..4f10a5ed03 100644--- a/test/plausible_web/live/components/verification_test.exs+++ b/test/plausible_web/live/components/verification_test.exs@@ -1,6 +1,6 @@defmodule PlausibleWeb.Live.Components.VerificationTest douse PlausibleWeb.ConnCase, async: true- import Phoenix.LiveViewTest+ import Plausible.LiveViewTest, only: [render_component: 2]import Plausible.Test.Support.HTML@component PlausibleWeb.Live.Components.Verificationdiff --git a/test/support/live_view_test_fix.ex b/test/support/live_view_test_fix.exnew file mode 100644index 0000000000..2fba6e1858--- /dev/null+++ b/test/support/live_view_test_fix.ex@@ -0,0 +1,42 @@+defmodule Plausible.LiveViewTest do+ @moduledoc """+ Temporary fix for `Phoenix.LiveViewTest.render_component/2` failing CI with warnings.++ This module can be removed once Plausible switches to `phoenix_live_view ~> 1.0.0`+ """++ @doc """+ Same as `Phoenix.LiveViewTest.render_component/2` but with backported fixes from+ https://github.com/phoenixframework/phoenix_live_view/commit/489e8de024e03976e9ae38138eec517fbd456d27+ """+ defmacro render_component(component, assigns \\ Macro.escape(%{}), opts \\ []) do+ endpoint = Module.get_attribute(__CALLER__.module, :endpoint)++ component =+ if is_atom(component) do+ quote do+ unquote(component).__live__()+ unquote(component)+ end+ else+ component+ end++ quote do+ Plausible.LiveViewTest.__render_component__(+ unquote(endpoint),+ unquote(component),+ unquote(assigns),+ unquote(opts)+ )+ end+ end++ def __render_component__(endpoint, component, assigns, opts) when is_atom(component) do+ Phoenix.LiveViewTest.__render_component__(endpoint, %{module: component}, assigns, opts)+ end++ def __render_component__(endpoint, component, assigns, opts) do+ Phoenix.LiveViewTest.__render_component__(endpoint, component, assigns, opts)+ end+end