Version 1.0.0
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.TextDiffhas been moved to its own package
(hex: text_diff). -
Add
Rewrite.DotFormatterto handle the formatting of sources and files. -
The functions
Rewrite.Source.Ex.format/2,
Rewrite.Source.Ex.put_formatter_opts/2and
Rewrite.Source.Ex.merge_formatter_opts/2are removed.
The formatting functionality has been moved toRewrite.DotFormatter. -
Add
Rewrite.create_source/4to create aSourcestruct without adding it
to theRewriteproject. -
Add
Rewrite.new_source/4to cretae aSourcestruct and add it to the
Rewriteproject. -
The
Rewrite.Source.update/4function accepts now an updater function or a
value. -
Add
Rewrite.dot_formatter/1/2to set and get formatters. -
Add
Rewrite.format/2andRewrite.fromat!/2to format a project. -
Add
Rewrite.format_source/3to format a source in a project. -
Add
Rewrite.Hook, a behaviour to set as:hooksin a%Rewrite{}project. -
Add
Rewrite.Source.default_path/0and callback
Rewrite.Filetype.default_path/0. -
Rewrite.new/1,Rewrite.new!/2andRewrite.read!/3now expect an optional
options list instead of a list ofRewrite.Filetypes. -
The function
Rewrite.Source.form_string/3and the callback
Rewrite.Filetype.from_string/3are changed tofrom_string/2. The argument
pathis now part of the options.