Skip to content

Commit

Permalink
Upgrade dependencies 2024-10 (#2205)
Browse files Browse the repository at this point in the history
* upgrade dependencies

* add dialyzer ignore file and live reload to test for dialyzer

* rearrange envs
  • Loading branch information
anthonyshull authored Oct 25, 2024
1 parent 1e0cf60 commit c892bd1
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 71 deletions.
Empty file added .dialyzer_ignore.exs
Empty file.
52 changes: 19 additions & 33 deletions lib/dotcom_web.ex
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ defmodule DotcomWeb do

def controller do
quote do
use Gettext, backend: DotcomWeb.Gettext
use Phoenix.Controller, namespace: DotcomWeb
import Phoenix.LiveView.Controller

import DotcomWeb.{CmsRouterHelpers, ControllerHelpers}

import DotcomWeb.Router.Helpers,
except: [
Expand All @@ -43,26 +45,23 @@ defmodule DotcomWeb do
project_update_path: 4
]

import DotcomWeb.CmsRouterHelpers
import DotcomWeb.ControllerHelpers
import DotcomWeb.Gettext
import Phoenix.LiveView.Controller
import Util.AsyncAssign

alias Util.Breadcrumb
end
end

def view do
quote do
use Dotcom.Components.Precompiler

use Phoenix.View,
root: "lib/dotcom_web/templates",
namespace: DotcomWeb

# Import convenience functions from controllers
import Phoenix.Controller, only: [view_module: 1]

use Dotcom.Components.Precompiler

import DotcomWeb.Components
import DotcomWeb.{Components, CmsRouterHelpers, ViewHelpers}
import DotcomWeb.PartialView.SvgIconWithCircle, only: [svg_icon_with_circle: 1]

import DotcomWeb.Router.Helpers,
except: [
Expand All @@ -79,11 +78,8 @@ defmodule DotcomWeb do
static_url: 2
]

import DotcomWeb.CmsRouterHelpers
import DotcomWeb.ViewHelpers
import DotcomWeb.Views.Helpers.StopHelpers
import DotcomWeb.Views.Helpers.AlertHelpers
import DotcomWeb.PartialView.SvgIconWithCircle, only: [svg_icon_with_circle: 1]
import DotcomWeb.Views.Helpers.{AlertHelpers, StopHelpers}
import Phoenix.Controller, only: [view_module: 1]
import UrlHelpers

# Include shared imports and aliases for views
Expand Down Expand Up @@ -128,33 +124,23 @@ defmodule DotcomWeb do

def channel do
quote do
use Gettext, backend: DotcomWeb.Gettext
use Phoenix.Channel
import DotcomWeb.Gettext
end
end

defp view_helpers do
quote do
# Use all HTML functionality (forms, tags, etc)
import Phoenix.HTML
import PhoenixHTMLHelpers.Form, except: [label: 1]
import PhoenixHTMLHelpers.Link
import PhoenixHTMLHelpers.Tag
import PhoenixHTMLHelpers.Format

# Import LiveView and .heex helpers (live_render, live_patch, <.form>, etc)
import Phoenix.LiveView.Helpers
alias Phoenix.LiveView.JS
use Gettext, backend: DotcomWeb.Gettext
use MbtaMetro

# Import basic rendering functionality (render, render_layout, etc)
import Phoenix.View
import DotcomWeb.{Components, ErrorHelpers}
import Phoenix.{HTML, LiveView.Helpers, View}
import PhoenixHTMLHelpers.Form, except: [label: 1]
import PhoenixHTMLHelpers.{Format, Link, Tag}

import DotcomWeb.ErrorHelpers
import DotcomWeb.Gettext
alias DotcomWeb.Router.Helpers

use MbtaMetro
import DotcomWeb.Components
alias Phoenix.LiveView.JS

# Routes generation with the ~p sigil
unquote(verified_routes())
Expand Down
6 changes: 4 additions & 2 deletions lib/dotcom_web/gettext.ex
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ defmodule DotcomWeb.Gettext do
By using [Gettext](http://hexdocs.pm/gettext),
your module gains a set of macros for translations, for example:
import DotcomWeb.Gettext
use Gettext, backend: DotcomWeb.Gettext
# Simple translation
gettext "Here is the string to translate"
Expand All @@ -20,8 +20,10 @@ defmodule DotcomWeb.Gettext do
See the [Gettext Docs](http://hexdocs.pm/gettext) for detailed usage.
"""

@dialyzer [
{:nowarn_function, lngettext: 6}
]
use Gettext, otp_app: :dotcom

use Gettext.Backend, otp_app: :dotcom
end
39 changes: 20 additions & 19 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -70,44 +70,45 @@ defmodule DotCom.Mixfile do
defp deps do
[
{:absinthe_client, "0.1.1"},
{:address_us, "0.4.2"},
{:address_us, "0.4.3"},
{:aws, "1.0.2"},
{:aws_credentials, "0.3.2", optional: true},
{:castore, "1.0.8"},
{:castore, "1.0.9"},
{:crc, "0.10.5"},
{:credo, "1.7.7", only: [:dev, :test]},
{:credo, "1.7.8", only: [:dev, :test]},
{:csv, "3.2.1"},
{:decorator, "1.4.0"},
{:dialyxir, "1.4.3", [only: [:test, :dev], runtime: false]},
{:dialyxir, "1.4.4", [only: [:dev, :test], runtime: false]},
{:diskusage_logger, "0.2.0"},
{:ecto, "3.12.1"},
{:ecto, "3.12.4"},
{:eflame, "1.0.1", only: :dev},
{:ehmon, [github: "mbta/ehmon", only: :prod]},
{:ex_doc, "0.34.2", only: :dev},
{:ex_machina, "2.8.0", only: [:dev, :test]},
{:ex_unit_summary, "0.1.0", only: [:dev, :test]},
{:excoveralls, "0.18.2", only: :test},
{:excoveralls, "0.18.3", only: :test},
{:faker,
git: "https://github.com/elixirs/faker.git",
override: true,
branch: "master",
only: [:dev, :test]},
# Latest 0.36.3 breaks the trip planner test
{:floki, "0.36.2"},
{:gen_stage, "1.2.1"},
{:gettext, "0.25.0"},
{:gettext, "0.26.1"},
{:hackney, "1.20.1"},
{:hammer, "6.2.1"},
{:html_sanitize_ex, "1.4.3"},
{:httpoison, "2.2.1"},
{:inflex, "2.1.0"},
{:jason, "1.4.4", override: true},
{:logster, "1.1.1"},
{:mail, "0.3.1"},
{:mail, "0.4.1"},
{:mbta_metro, "0.0.50"},
{:mock, "0.3.8", [only: :test]},
{:mox, "1.1.0", [only: :test]},
{:nebulex, "2.6.3"},
{:nebulex_redis_adapter, "2.4.0"},
{:mox, "1.2.0", [only: :test]},
{:nebulex, "2.6.4"},
{:nebulex_redis_adapter, "2.4.1"},
{
:open_trip_planner_client,
[github: "thecristen/open_trip_planner_client", tag: "v0.10.4"]
Expand All @@ -118,13 +119,13 @@ defmodule DotCom.Mixfile do
{:phoenix_ecto, "4.6.2"},
{:phoenix_html_helpers, "1.0.1"},
{:phoenix_live_dashboard, "0.8.4"},
{:phoenix_live_reload, "1.5.3", [only: :dev]},
{:phoenix_live_reload, "1.5.3", only: [:dev, :test]},
# currently release candidate, but used in Phoenix 1.7 generator: https://github.com/phoenix-diff/phoenix-diff/blob/f320791d24bc3248fbdde557978235829313aa06/priv/data/sample-app/1.7.14/default/mix.exs#L42
{:phoenix_live_view, "~> 1.0.0-rc.6", override: true},
{:phoenix_pubsub, "2.1.3"},
{:phoenix_view, "~> 2.0"},
{:plug, "1.16.1"},
{:plug_cowboy, "2.7.1"},
{:plug_cowboy, "2.7.2"},
{:poison, "6.0.0"},
{:polyline, "1.4.0"},
{:poolboy, "1.5.2"},
Expand All @@ -133,15 +134,15 @@ defmodule DotCom.Mixfile do
{:quixir, "0.9.3", [only: :test]},
{:recaptcha, "3.1.0"},
{:recase, "0.8.1"},
{:recon, "2.5.5", [only: :prod]},
{:redix, "1.5.1"},
{:recon, "2.5.6", [only: :prod]},
{:redix, "1.5.2"},
{:req, "0.5.6"},
{:rstar, github: "armon/erl-rstar"},
{:sentry, "10.7.0"},
{:sentry, "10.7.1"},
{:server_sent_event_stage, "1.2.1"},
{:sizeable, "1.0.2"},
{:sweet_xml, "0.7.4", only: [:prod, :dev]},
{:telemetry, "1.2.1", override: true},
{:sweet_xml, "0.7.4", only: [:dev, :prod]},
{:telemetry, "1.3.0", override: true},
{:telemetry_metrics, "1.0.0", override: true},
{:telemetry_metrics_splunk, "0.0.6-alpha"},
{:telemetry_poller, "1.1.0"},
Expand All @@ -150,7 +151,7 @@ defmodule DotCom.Mixfile do
{:typed_ecto_schema, "0.4.1"},
{:unrooted_polytree, "0.1.1"},
{:uuid, "1.1.8"},
{:wallaby, "0.30.9", [runtime: false, only: [:test, :dev]]},
{:wallaby, "0.30.9", [runtime: false, only: [:dev, :test]]},
{:yaml_elixir, "2.11.0", only: [:dev]},
{:ymlr, "5.1.3", only: [:dev]}
]
Expand Down
Loading

0 comments on commit c892bd1

Please sign in to comment.