Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ jobs:
otp: '24.3'
- elixir: '1.15.8'
otp: '24.3'
- elixir: '1.14.5'
otp: '24.3'
- elixir: '1.13.4'
otp: '24.3'
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 0.9.0 - 2026/10/26

+ Change sorting in the `AliasOrder` task
+ Require Elixir 1.15

## 0.8.0 - 2025/10/10

+ Use `Rewrite` version `~> 1.0`
Expand Down
2 changes: 1 addition & 1 deletion lib/recode/config.ex
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ defmodule Recode.Config do

@config_filename ".recode.exs"

@config_version "0.8.0"
@config_version "0.9.0"

# The minimum version of the config to run recode. This version marks the last
# breaking change for handle the config.
Expand Down
4 changes: 2 additions & 2 deletions mix.exs
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
defmodule Recode.MixProject do
use Mix.Project

@version "0.8.0"
@version "0.9.0"
@source_url "https://github.com/hrzndhrn/recode"
@docs_extras ["README.md", "CHANGELOG.md"]

def project do
[
app: :recode,
version: @version,
elixir: "~> 1.13",
elixir: "~> 1.15",
name: "Recode",
description: description(),
elixirc_paths: elixirc_paths(),
Expand Down
59 changes: 5 additions & 54 deletions test/recode/context_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -255,60 +255,11 @@ defmodule Recode.ContextTest do

acc = Enum.reverse(acc)

assert strip(Enum.at(acc, 0)) == %Context{
aliases: [],
assigns: %{},
definition: nil,
imports: [],
module:
{Traverse.Simple,
[do: [line: 1, column: 27], end: [line: 7, column: 1], line: 1, column: 1]},
requirements: [],
usages: [],
node:
{:defmodule,
[
do: [line: 1, column: 27],
end: [line: 7, column: 1],
line: 1,
column: 1
],
[
{:__aliases__, [line: 1, column: 11], [:Traverse, :Simple]},
[
{{:__block__, [line: 1, column: 27], [:do]},
{:__block__, [],
[
{:def,
[
do: [line: 2, column: 14],
end: [line: 4, column: 3],
line: 2,
column: 3
],
[
{:foo, [line: 2, column: 7], [{:x, [line: 2, column: 11], nil}]},
[
{{:__block__, [line: 2, column: 14], [:do]},
{:*, [line: 3, column: 7],
[
{:x, [line: 3, column: 5], nil},
{:__block__, [line: 3, column: 9], [2]}
]}}
]
]},
{:def, [line: 6, column: 3],
[
{:baz, [line: 6, column: 7], nil},
[
{{:__block__, [line: 6, column: 12], [:do]},
{:__block__, [line: 6, column: 16], [:baz]}}
]
]}
]}}
]
]}
}
assert %Context{} = context = strip(Enum.at(acc, 0))

assert context.module ==
{Traverse.Simple,
[do: [line: 1, column: 27], end: [line: 7, column: 1], line: 1, column: 1]}

assert %{
definition:
Expand Down
12 changes: 4 additions & 8 deletions test/support/recode_case.ex
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,10 @@ defmodule RecodeCase do
end
end

defmacro assert_config_error(error_tuple, expected_message \\ nil) do
quote bind_quoted: [error_tuple: error_tuple, expected_message: expected_message] do
if expected_message do
assert error_tuple == {:error, expected_message}
else
assert {:error, error_message} = error_tuple
assert is_binary(error_message)
end
defmacro assert_config_error(error_tuple) do
quote bind_quoted: [error_tuple: error_tuple] do
assert {:error, error_message} = error_tuple
assert is_binary(error_message)
end
end

Expand Down
Loading