Skip to content

Commit d2da61f

Browse files
committed
Support Elixir 1.15
1 parent 6845aa9 commit d2da61f

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.formatter.exs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
11
# Used by "mix format"
22
locals_without_parens = [error_tracker_dashboard: 1, error_tracker_dashboard: 2]
33

4+
# Parse SemVer minor elixir version from project configuration
5+
# eg `"~> 1.15"` version requirement will yield `"1.15"`
6+
elixir_minor_version = Regex.run(~r/([\d\.]+)/, Mix.Project.config()[:elixir])
7+
48
[
59
import_deps: [:ecto, :ecto_sql, :plug, :phoenix],
610
inputs: ["{mix,.formatter,dev,dev.*}.exs", "{config,lib,test}/**/*.{heex,ex,exs}"],
711
plugins: [Phoenix.LiveView.HTMLFormatter, Styler],
812
locals_without_parens: locals_without_parens,
9-
export: [locals_without_parens: locals_without_parens]
13+
export: [locals_without_parens: locals_without_parens],
14+
styler: [
15+
minimum_supported_elixir_version: "#{elixir_minor_version}.0"
16+
]
1017
]

lib/error_tracker/plugins/pruner.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ defmodule ErrorTracker.Plugins.Pruner do
119119
def init(state \\ []) do
120120
state = %{
121121
limit: state[:limit] || 200,
122-
max_age: state[:max_age] || to_timeout(day: 1),
123-
interval: state[:interval] || to_timeout(minute: 30)
122+
max_age: state[:max_age] || :timer.hours(24),
123+
interval: state[:interval] || :timer.minutes(30)
124124
}
125125

126126
{:ok, schedule_prune(state)}

0 commit comments

Comments
 (0)