- Clean up
extra_applications
.
- Add option
ignore_missing_sub_formatters
inRewrite.DotFormatter.read/2
and friends.
- Added
:exclude
option toRewrite.new!/2
andRewrite.read!/2
.
- Set
locals_for_parens
to[]
forSourceror.to_string/2
if not set, to prevent Sourceror from trying to fetchlocals_for_parens
. - Add option
:ignore_unknown_deps
toDotFormatter.read/2
and friends.
Version 1.0.0
comes with a lot of breaking changes and some improvements.
The main change is to the formatting and handling of .formatter.exs
. For this
the module Rewrite.DotFormatter
has been added. This module provides an API to
the Elixir formatting functionality and the formatter configuration via
.formatter.exs
.
Other changes concern the argument list of some functions, here some arguments have been removed from the argument list and moved to the options.
-
Rewrite.TextDiff
has been moved to its own package (hex: text_diff). -
Add
Rewrite.DotFormatter
to handle the formatting of sources and files. -
The functions
Rewrite.Source.Ex.format/2
,Rewrite.Source.Ex.put_formatter_opts/2
andRewrite.Source.Ex.merge_formatter_opts/2
are removed. The formatting functionality has been moved toRewrite.DotFormatter
. -
Add
Rewrite.create_source/4
to create aSource
struct without adding it to theRewrite
project. -
Add
Rewrite.new_source/4
to cretae aSource
struct and add it to theRewrite
project. -
The
Rewrite.Source.update/4
function accepts now an updater function or a value. -
Add
Rewrite.dot_formatter/1/2
to set and get formatters. -
Add
Rewrite.format/2
andRewrite.fromat!/2
to format a project. -
Add
Rewrite.format_source/3
to format a source in a project. -
Add
Rewrite.Hook
, a behaviour to set as:hooks
in a%Rewrite{}
project. -
Add
Rewrite.Source.default_path/0
and callbackRewrite.Filetype.default_path/0
. -
Rewrite.new/1
,Rewrite.new!/2
andRewrite.read!/3
now expect an optional options list instead of a list ofRewrite.Filetype
s. -
The function
Rewrite.Source.form_string/3
and the callbackRewrite.Filetype.from_string/3
are changed tofrom_string/2
. The argumentpath
is now part of the options.
- Use file extension when filtering the formatter plugins.
- Honor
import_deps
informatter_opts
.
- Include files starting with
.
.
- Fix Elixir 1.17 deprecation warning.
- Update sourceror version.
- Add option
:sync_quoted
toSource.Ex
.
- Read and write files async.
- Add options to the list of file types in
Rewrite.new/1
andRewrite.read!/2
.
- Use
sourceror
version~> 0.13
.
- Update version requirement for
sourceror
to~> 0.12.0
. - Add function
Rewrite.Source.issues/1
.
-
The module
Rewrite.Project
moves toRewrite
. -
The
Rewrite.Source.hash
contains the hash of the read in file. The hash can be used to detect if the file was changed after the last reading. -
Rewrite
accetps onlysources
with a valid and unique path. From this, the handling of conflicting files is no longer part ofrewrite
. -
Source.content/2
andSource.path/2
is replaced bySource.get/3
. -
Add
Rewrite.Filetype
.
- Fix
Source.format/3
.
- Search for
:dot_formatter_opts
inSource.private
when formatting.
- Refactor source formatting.
- Add option
:colorizer
toRewrite.TextDiff.format/3
.
-
Update
sourceror
to ~> 0.12. -
Add
Rewrite.Source.put_private/3
, which allows for storing arbitrary data on a source.
-
Add fix for
Rewrite.Source.format/2
. -
Pin
sourceror
to 0.11.2.
- Support the
FreedomFormatter
. - Update
Rewrite.Source.save/1
to add a neline at the of file. Previously a newline was added atRewrite.Source.update/3
.
- Update
Rewrite.TextDiff.format/3
to include more formatting customization.
- Accept glob as
%GlobEx{}
as argument forRewrite.Project.read!/1
-
Remove
Rewrite.Issue
. The type of the fieldissues
forRewrite.Source
becomes[term()]
. -
Remove
Rewrite.Source.debug_info/2
andBeamFile
dependency. -
Add
Rewrite.Project.sources_by_module/2
,Rewrite.Project.source_by_module/2
andRewriteProject.source_by_module!/2
. -
Remove
Rewrite.Source.zipper/1
-
Update
Rewrite.Source.update
. An update can now be made with:path
,:ast
, and:code
. An update with aSourceror.Zipper.zipper()
is no longer supported. -
Add
Rewrite.Source.from_ast/3
. -
Add
Rewrite.Source.owner/1
.
- Update
Issue.new/4
.
-
The very first version.
-
This package was previously part of Recode. The extracted modules were also refactored when they were moved to their own package.