github kamadorueda/alejandra 1.0.0

latest releases: 3.1.0, 3.0.0, 2.0.0...
2 years ago

Added

  • NixOS installation instructions

Changed

  • The indentation for function applications was improved,
    so that indentation is now correct to the human eye in all cases:

    -  name2 = function arg {
    -    asdf = 1;
    -  }
    -  argument;
    +  name2 =
    +    function arg {
    +      asdf = 1;
    +    }
    +    argument;
  • String interpolations ("${something}")
    now follow the same logic as parentheses ((something)),
    since ultimately, they are the same family of elements.

  • Parentheses handling logic was rewritten
    and by extension string interpolations as well.

    - (
    -   self: super: {
    -     # ...
    -   }
    - )
    + (self: super: {
    +   # ...
    + })
    -      builtins.map (
    -        pkg: {
    -          name = "alejandra-${pkg.stdenv.targetPlatform.config}";
    -          value = pkg;
    -        }
    -      )
    +      builtins.map (pkg: {
    +        name = "alejandra-${pkg.stdenv.targetPlatform.config}";
    +        value = pkg;
    +      })
    -      (
    -        fenix.combine [
    -          fenix.latest.rustc
    -          fenix.latest.toolchain
    -          fenix.targets."wasm32-unknown-unknown".latest.rust-std
    -        ]
    -      )
    +      (fenix.combine [
    +        fenix.latest.rustc
    +        fenix.latest.toolchain
    +        fenix.targets."wasm32-unknown-unknown".latest.rust-std
    +      ])
       pkgs.writeText "other-modules.json"
       (l.toJSON
    -  (l.mapAttrs
    -  (pname: subOutputs: let
    -    pkg = subOutputs.packages."${pname}".overrideAttrs (old: {
    -      buildScript = "true";
    -      installMethod = "copy";
    -    });
    -  in "${pkg}/lib/node_modules/${pname}/node_modules")
    -  outputs.subPackages))
    +    (l.mapAttrs
    +      (pname: subOutputs:
    +        let
    +          pkg = subOutputs.packages."${pname}".overrideAttrs (old: {
    +            buildScript = "true";
    +            installMethod = "copy";
    +          });
    +        in
    +          "${pkg}/lib/node_modules/${pname}/node_modules")
    +      outputs.subPackages))
    -  (with a;
    -  /*
    -   comment
    -   */
    -  with b;
    -  with c; {
    -    a = 1;
    -    b = 2;
    -  })
    +  (with a;
    +    /*
    +      comment
    +      */
    +    with b;
    +    with c; {
    +      a = 1;
    +      b = 2;
    +    })

    In some cases it's possible to insert a newline after the
    opening element (either ( or ${) to force a tall formatting.

Removed

  • A few internal position counters, nothing visible from the outside.
  • The new features cost a little of runtime speed,
    but anyway we are still pretty fast. ⚡

What's Changed

Full Changelog: 0.7.0...1.0.0

Don't miss a new alejandra release

NewReleases is sending notifications on new releases.