diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d4cbfdc..7ac2b3a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,16 +14,12 @@ jobs: fail-fast: false matrix: include: - - elixir: 1.10.4 - otp: 21.0 - - elixir: 1.11.4 - otp: 23.0 - - elixir: 1.12.3 - otp: 24.0 - elixir: 1.13.0 otp: 24.0 - elixir: 1.14.0 otp: 25.0 + - elixir: 1.15.0 + otp: 26.0 check_formatted: true warnings_as_errors: true diff --git a/lib/mix/tasks/uniform.gen.app.ex b/lib/mix/tasks/uniform.gen.app.ex index 4b88982..6b0fd5f 100644 --- a/lib/mix/tasks/uniform.gen.app.ex +++ b/lib/mix/tasks/uniform.gen.app.ex @@ -32,7 +32,7 @@ defmodule Mix.Tasks.Uniform.Gen.App do path = "lib/#{lib}/uniform.exs" if File.exists?(path) do - Logger.warn("Did not create #{path} because it already exists") + Logger.warning("Did not create #{path} because it already exists") else File.write!(path, """ [ diff --git a/lib/mix/tasks/uniform.init.ex b/lib/mix/tasks/uniform.init.ex index c093526..39a23ce 100644 --- a/lib/mix/tasks/uniform.init.ex +++ b/lib/mix/tasks/uniform.init.ex @@ -55,7 +55,7 @@ defmodule Mix.Tasks.Uniform.Init do do_add_config(config, otp_app) {:error, reason} -> - Logger.warn("Could not patch config/config.exs – reason: #{reason}") + Logger.warning("Could not patch config/config.exs – reason: #{reason}") end end @@ -74,7 +74,7 @@ defmodule Mix.Tasks.Uniform.Init do IO.puts("Added configuration in config/config.exs") _ -> - Logger.warn( + Logger.warning( "Could not patch config/config.exs because it does not contain `import Config`" ) end @@ -82,7 +82,7 @@ defmodule Mix.Tasks.Uniform.Init do defp write_unless_exists(path, contents) do if File.exists?(path) do - Logger.warn("Did not create #{path} because it already exists") + Logger.warning("Did not create #{path} because it already exists") else File.write!(path, contents) IO.puts("Created #{path}") diff --git a/mix.exs b/mix.exs index 8222e9a..47a0425 100644 --- a/mix.exs +++ b/mix.exs @@ -8,7 +8,7 @@ defmodule Uniform.MixProject do [ app: :uniform, version: @version, - elixir: "~> 1.10", + elixir: "~> 1.13", start_permanent: Mix.env() == :prod, deps: deps(), elixirc_paths: elixirc_paths(Mix.env()), @@ -29,8 +29,8 @@ defmodule Uniform.MixProject do defp deps do [ - {:ex_doc, ">= 0.28.4", only: [:dev, :docs], runtime: false}, - {:sourceror, "~> 0.11"} + {:ex_doc, ">= 0.30.9", only: [:dev, :docs], runtime: false}, + {:sourceror, "~> 0.14"} ] end diff --git a/mix.lock b/mix.lock index 273e1de..9790cbc 100644 --- a/mix.lock +++ b/mix.lock @@ -1,9 +1,9 @@ %{ - "earmark_parser": {:hex, :earmark_parser, "1.4.26", "f4291134583f373c7d8755566122908eb9662df4c4b63caa66a0eabe06569b0a", [:mix], [], "hexpm", "48d460899f8a0c52c5470676611c01f64f3337bad0b26ddab43648428d94aabc"}, - "ex_doc": {:hex, :ex_doc, "0.28.4", "001a0ea6beac2f810f1abc3dbf4b123e9593eaa5f00dd13ded024eae7c523298", [:mix], [{:earmark_parser, "~> 1.4.19", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "bf85d003dd34911d89c8ddb8bda1a958af3471a274a4c2150a9c01c78ac3f8ed"}, + "earmark_parser": {:hex, :earmark_parser, "1.4.37", "2ad73550e27c8946648b06905a57e4d454e4d7229c2dafa72a0348c99d8be5f7", [:mix], [], "hexpm", "6b19783f2802f039806f375610faa22da130b8edc21209d0bff47918bb48360e"}, + "ex_doc": {:hex, :ex_doc, "0.30.9", "d691453495c47434c0f2052b08dd91cc32bc4e1a218f86884563448ee2502dd2", [:mix], [{:earmark_parser, "~> 1.4.31", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "d7aaaf21e95dc5cddabf89063327e96867d00013963eadf2c6ad135506a8bc10"}, "makeup": {:hex, :makeup, "1.1.0", "6b67c8bc2882a6b6a445859952a602afc1a41c2e08379ca057c0f525366fc3ca", [:mix], [{:nimble_parsec, "~> 1.2.2 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "0a45ed501f4a8897f580eabf99a2e5234ea3e75a4373c8a52824f6e873be57a6"}, - "makeup_elixir": {:hex, :makeup_elixir, "0.16.0", "f8c570a0d33f8039513fbccaf7108c5d750f47d8defd44088371191b76492b0b", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "28b2cbdc13960a46ae9a8858c4bebdec3c9a6d7b4b9e7f4ed1502f8159f338e7"}, - "makeup_erlang": {:hex, :makeup_erlang, "0.1.1", "3fcb7f09eb9d98dc4d208f49cc955a34218fc41ff6b84df7c75b3e6e533cc65f", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "174d0809e98a4ef0b3309256cbf97101c6ec01c4ab0b23e926a9e17df2077cbb"}, - "nimble_parsec": {:hex, :nimble_parsec, "1.2.3", "244836e6e3f1200c7f30cb56733fd808744eca61fd182f731eac4af635cc6d0b", [:mix], [], "hexpm", "c8d789e39b9131acf7b99291e93dae60ab48ef14a7ee9d58c6964f59efb570b0"}, - "sourceror": {:hex, :sourceror, "0.11.1", "1b80efe84330beefb6b3da95b75c1e1cdefe9dc785bf4c5064fae251a8af615c", [:mix], [], "hexpm", "22b6828ee5572f6cec75cc6357f3ca6c730a02954cef0302c428b3dba31e5e74"}, + "makeup_elixir": {:hex, :makeup_elixir, "0.16.1", "cc9e3ca312f1cfeccc572b37a09980287e243648108384b97ff2b76e505c3555", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "e127a341ad1b209bd80f7bd1620a15693a9908ed780c3b763bccf7d200c767c6"}, + "makeup_erlang": {:hex, :makeup_erlang, "0.1.2", "ad87296a092a46e03b7e9b0be7631ddcf64c790fa68a9ef5323b6cbb36affc72", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "f3f5a1ca93ce6e092d92b6d9c049bcda58a3b617a8d888f8e7231c85630e8108"}, + "nimble_parsec": {:hex, :nimble_parsec, "1.3.1", "2c54013ecf170e249e9291ed0a62e5832f70a476c61da16f6aac6dca0189f2af", [:mix], [], "hexpm", "2682e3c0b2eb58d90c6375fc0cc30bc7be06f365bf72608804fb9cffa5e1b167"}, + "sourceror": {:hex, :sourceror, "0.14.0", "b6b8552d0240400d66b6f107c1bab7ac1726e998efc797f178b7b517e928e314", [:mix], [], "hexpm", "809c71270ad48092d40bbe251a133e49ae229433ce103f762a2373b7a10a8d8b"}, } diff --git a/test/projects/empty/mix.lock b/test/projects/empty/mix.lock index 55bc722..20fc667 100644 --- a/test/projects/empty/mix.lock +++ b/test/projects/empty/mix.lock @@ -1,3 +1,3 @@ %{ - "sourceror": {:hex, :sourceror, "0.11.1", "1b80efe84330beefb6b3da95b75c1e1cdefe9dc785bf4c5064fae251a8af615c", [:mix], [], "hexpm", "22b6828ee5572f6cec75cc6357f3ca6c730a02954cef0302c428b3dba31e5e74"}, + "sourceror": {:hex, :sourceror, "0.14.0", "b6b8552d0240400d66b6f107c1bab7ac1726e998efc797f178b7b517e928e314", [:mix], [], "hexpm", "809c71270ad48092d40bbe251a133e49ae229433ce103f762a2373b7a10a8d8b"}, } diff --git a/test/projects/full/mix.exs b/test/projects/full/mix.exs index e375c48..e1184f1 100644 --- a/test/projects/full/mix.exs +++ b/test/projects/full/mix.exs @@ -25,8 +25,7 @@ defmodule Full.MixProject do # comment to remove {:esbuild, "~> 0.5", runtime: Mix.env() == :dev}, {:graphql_document, "~> 0.2.1"}, - # test that options are retained - {:sourceror, "~> 0.11.1", path: "../../../deps/sourceror", override: true}, + {:sourceror, "~> 0.14"}, {:decimal, "~> 2.0"} ] end diff --git a/test/projects/full/mix.lock b/test/projects/full/mix.lock index 20fe09c..b486b75 100644 --- a/test/projects/full/mix.lock +++ b/test/projects/full/mix.lock @@ -3,5 +3,5 @@ "decimal": {:hex, :decimal, "2.0.0", "a78296e617b0f5dd4c6caf57c714431347912ffb1d0842e998e9792b5642d697", [:mix], [], "hexpm", "34666e9c55dea81013e77d9d87370fe6cb6291d1ef32f46a1600230b1d44f577"}, "esbuild": {:hex, :esbuild, "0.5.0", "d5bb08ff049d7880ee3609ed5c4b864bd2f46445ea40b16b4acead724fb4c4a3", [:mix], [{:castore, ">= 0.0.0", [hex: :castore, repo: "hexpm", optional: false]}], "hexpm", "f183a0b332d963c4cfaf585477695ea59eef9a6f2204fdd0efa00e099694ffe5"}, "graphql_document": {:hex, :graphql_document, "0.2.1", "84c3b2efcab12b5b4caedebae525611ca2401b4e5cbd9b9194dd165b0c909423", [:mix], [{:decimal, ">= 0.2.5", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "14eb32729cae244a4921571bd2cd820cfe966171a7ba179cd6341b703d995bdc"}, - "sourceror": {:hex, :sourceror, "0.11.1", "1b80efe84330beefb6b3da95b75c1e1cdefe9dc785bf4c5064fae251a8af615c", [:mix], [], "hexpm", "22b6828ee5572f6cec75cc6357f3ca6c730a02954cef0302c428b3dba31e5e74"}, + "sourceror": {:hex, :sourceror, "0.14.0", "b6b8552d0240400d66b6f107c1bab7ac1726e998efc797f178b7b517e928e314", [:mix], [], "hexpm", "809c71270ad48092d40bbe251a133e49ae229433ce103f762a2373b7a10a8d8b"}, } diff --git a/test/projects/initable/mix.lock b/test/projects/initable/mix.lock index 55bc722..20fc667 100644 --- a/test/projects/initable/mix.lock +++ b/test/projects/initable/mix.lock @@ -1,3 +1,3 @@ %{ - "sourceror": {:hex, :sourceror, "0.11.1", "1b80efe84330beefb6b3da95b75c1e1cdefe9dc785bf4c5064fae251a8af615c", [:mix], [], "hexpm", "22b6828ee5572f6cec75cc6357f3ca6c730a02954cef0302c428b3dba31e5e74"}, + "sourceror": {:hex, :sourceror, "0.14.0", "b6b8552d0240400d66b6f107c1bab7ac1726e998efc797f178b7b517e928e314", [:mix], [], "hexpm", "809c71270ad48092d40bbe251a133e49ae229433ce103f762a2373b7a10a8d8b"}, } diff --git a/test/projects/missing_template/mix.lock b/test/projects/missing_template/mix.lock index 55bc722..20fc667 100644 --- a/test/projects/missing_template/mix.lock +++ b/test/projects/missing_template/mix.lock @@ -1,3 +1,3 @@ %{ - "sourceror": {:hex, :sourceror, "0.11.1", "1b80efe84330beefb6b3da95b75c1e1cdefe9dc785bf4c5064fae251a8af615c", [:mix], [], "hexpm", "22b6828ee5572f6cec75cc6357f3ca6c730a02954cef0302c428b3dba31e5e74"}, + "sourceror": {:hex, :sourceror, "0.14.0", "b6b8552d0240400d66b6f107c1bab7ac1726e998efc797f178b7b517e928e314", [:mix], [], "hexpm", "809c71270ad48092d40bbe251a133e49ae229433ce103f762a2373b7a10a8d8b"}, } diff --git a/test/projects/missing_template_dir/mix.lock b/test/projects/missing_template_dir/mix.lock index 55bc722..20fc667 100644 --- a/test/projects/missing_template_dir/mix.lock +++ b/test/projects/missing_template_dir/mix.lock @@ -1,3 +1,3 @@ %{ - "sourceror": {:hex, :sourceror, "0.11.1", "1b80efe84330beefb6b3da95b75c1e1cdefe9dc785bf4c5064fae251a8af615c", [:mix], [], "hexpm", "22b6828ee5572f6cec75cc6357f3ca6c730a02954cef0302c428b3dba31e5e74"}, + "sourceror": {:hex, :sourceror, "0.14.0", "b6b8552d0240400d66b6f107c1bab7ac1726e998efc797f178b7b517e928e314", [:mix], [], "hexpm", "809c71270ad48092d40bbe251a133e49ae229433ce103f762a2373b7a10a8d8b"}, } diff --git a/test/uniform/app_test.exs b/test/uniform/app_test.exs index 4d51079..7dc9e56 100644 --- a/test/uniform/app_test.exs +++ b/test/uniform/app_test.exs @@ -83,19 +83,19 @@ defmodule Uniform.AppTest do assert %MixDep{mix_deps: [:indirect_mix]} = app.internal.deps.mix.included_mix assert %MixDep{mix_deps: []} = app.internal.deps.mix.indirect_mix - assert app.internal.deps.included.lib == [ + assert Enum.sort(app.internal.deps.included.lib) == [ :always_included_lib, :included_lib, :indirectly_included_lib ] - assert app.internal.deps.included.mix == [ + assert Enum.sort(app.internal.deps.included.mix) == [ :always_included_mix, :included_mix, :indirect_mix ] - assert app.internal.deps.all.lib == [ + assert Enum.sort(app.internal.deps.all.lib) == [ :always_included_lib, :excluded_lib, :included_lib, @@ -105,7 +105,7 @@ defmodule Uniform.AppTest do :with_only ] - assert app.internal.deps.all.mix == [ + assert Enum.sort(app.internal.deps.all.mix) == [ :always_included_mix, :excluded_mix, :included_mix,