Releases: kamadorueda/alejandra
4.0.0
Added
- (experimental) Configurable indentation (two spaces, four spaces and tabs).
- Pipe operators (
a |> banda <| b) are now supported. - Doc comments (
/** */) are handled more graciously.
Changed
- Upgraded dependencies to its latest version.
Pull Requests
- minor refactors by @kamadorueda in #421
- feat: add pkg readme by @kamadorueda in #422
- build(deps): bump the npm_and_yarn group across 1 directory with 15 updates by @dependabot in #427
- add formatting for doc-comments by @hsjobeki in #401
- build(deps): bump the npm_and_yarn group across 2 directories with 1 update by @dependabot in #432
- feat: configuration mechanism by @kamadorueda in #433
- feat: miscellaneous updates by @kamadorueda in #434
- refac: simplify config mechanism by @kamadorueda in #437
- feat: custom (experimental) indentation option by @kamadorueda in #435
- feat: docs, toml config, default location, and more by @kamadorueda in #438
- test: add cli tests by @kamadorueda in #439
- test: more tests by @kamadorueda in #441
- Make tests green on systems with different number of physical CPUs by @dbast in #443
- refac: use clap's builtin env reader by @kamadorueda in #445
- build(deps): bump nanoid from 3.3.6 to 3.3.8 in /front in the npm_and_yarn group across 1 directory by @dependabot in #440
- refac: single line message by @kamadorueda in #447
- feat: string: handle indentation modes by @exscientiafortis in #448
- feat: update rnix by @kamadorueda in #454
- test: add pipe operator tests by @kamadorueda in #455
- feat: support bin-op again by @kamadorueda in #456
New Contributors
- @hsjobeki made their first contribution in #401
- @dbast made their first contribution in #443
- @exscientiafortis made their first contribution in #448
Full Changelog: 3.1.0...4.0.0
3.1.0
Added
- Thank you messages for the different people
who have helped improving Alejandra. - Pre-commit hooks with no prerequisites and instructions on how to update the pre-commit hooks.
- A meta.mainProgram to our
flake.nix. - Refreshed docs (updated moved links, integrations instructions, maintainer instructions).
Changed
- The pre-commit option
alejandrawas renamed toalejandra-nix. - Upgraded dependencies to its latest version.
- Blank lines are no longer added after comments in
inherit.
Fixed
- A syntax error in one of the pre-commit hooks.
Pull Requests
- refactor: remove old asciinema by @kamadorueda in #347
- fix: Avoid syntax error by @l0b0 in #355
- Fix #354 by @tobiasBora in #358
- feat: add two new contributors by @kamadorueda in #359
- feat: upgrade dependencies by @kamadorueda in #362
- feat: pre-commit hook with no prerequisites by @l0b0 in #371
- Add ALE to list of neovim plugins by @n8henrie in #374
- Make test failures more informative by @9999years in #378
- Don't add blank lines after comments in
inheritby @9999years in #379 - Improve tests by @piegamesde in #384
- update dependencies by @kamadorueda in #391
- add thanks to contributors by @kamadorueda in #392
- Remove URL literal in inputs by @UserSv4 in #397
- flake: add meta.mainProgram by @ConnorBaker in #400
- Update instructions for Doom Emacs by @theutz in #413
- README: update link to current wiki. by @Mic92 in #414
- Update NixOS Wiki link by @nixos-wiki in #416
- feat: release 3.1.0 by @kamadorueda in #420
New Contributors
- @l0b0 made their first contribution in #355
- @tobiasBora made their first contribution in #358
- @n8henrie made their first contribution in #374
- @9999years made their first contribution in #378
- @piegamesde made their first contribution in #384
- @UserSv4 made their first contribution in #397
- @theutz made their first contribution in #413
- @nixos-wiki made their first contribution in #416
Full Changelog: 3.0.0...3.1.0
3.0.0
Added
-
Different levels of --quiet by repeating the
-qflag,
which makes Vim users have a better formatting experience by using:%!alejandra -qqto format the current buffer,
specially when the file has syntax errors. -
The possibility for companies to promote their business
by placing an add at the end of Alejandra's terminal output, and thank you messages for the sponsors of the project.You can obtain this benefits in @kamadorueda's sponsor page.
-
Thank you messages for the different people
who have helped improving Alejandra.
Changed
- Now big files are formatted first,
making faster the formatting process
when using many threads and
when formatting a big file is slower
than formatting all the other smaller files in the repository.
For instance in Nixpkgs. - The CLI was simplified,
removing the elements that people find less useful
and polishing those that people use the most.
The screen is not cleared anymore. - Upgraded dependencies to its latest version.
Fixed
- The name displayed in the CLI application used to be
alejandra_cli,
now it isAlejandra. - Typos here and there.
Pull Requests
- feat: release 2.0.0 by @kamadorueda in #328
- feat: upgrade front dependencies by @kamadorueda in #330
- refactor: apply formatter by @kamadorueda in #332
- docs: update benchmarks by @kamadorueda in #333
- fix: name in the cli by @kamadorueda in #334
- perf: format big files first by @kamadorueda in #335
- feat: minimalist cli by @kamadorueda in #336
- feat: add some random ads at the end by @kamadorueda in #337
- refactor: rename changed to formatted by @kamadorueda in #338
- docs: update timings after last perf improvement by @kamadorueda in #339
- feat: put ads in stderr and respect --quiet by @kamadorueda in #340
- typo by @mkenigs in #342
- feat: more levels of --quiet by @kamadorueda in #341
- feat: sponsor benefits by @kamadorueda in #343
- feat: thank sponsors by @kamadorueda in #345
New Contributors
Full Changelog: 2.0.0...3.0.0
2.0.0
Added
-
A Style Guide,
explaining why certain decisions were taken
and why they are optimal
from a productive Nix hacker point of view.This guide is a work in progress,
but the aim is that it eventually documents
all of the aspects of the Nix language,
so that we all have the peace of mind
that comes from knowing that the style in Alejandra
is the way it is for a reason. -
Integration guides for: Neovim and GNU Emacs.
-
Published Alejandra as a crate,
and added API documentation
so other tools and integrations can be built in top of it.
Changed
-
Now running:
$ alejandra -formats stdin,
as POSIX
suggests. -
Comments are now indented by a multiple of 2
issues/294:Previously
(notice how some lines are indented with 3 and 5 spaces):/* Bla bla bla. More bla: - Bla bla - Bla */ 123
Now (all lines are indented to 2 and 4 spaces):
/* Bla bla bla. More bla: - Bla bla - Bla */ 123
This makes it easier to write comments on major code editors,
where a<TAB>(or<Shift>+<Tab>)
moves the cursor/content to the next multiple of 2,
and so indenting the comment contents
to an odd number of spaces (like 3, 5, 7)
is uncomfortable and unproductive.This change also allows cooperation
with other tools
like EditorConfig,
to further exercise good practices over a codebase. -
Updated dependencies to its latest version.
Fixed
- Empty lines in comments are now effectively empty,
avoiding git from warning about extra whitespace:
issues/314.
Pull Requests
- feat: release 1.5.0 by @kamadorueda in #304
- docs: add neovim integration by @kamadorueda in #305
- feat: simplify nix stable installation by @kamadorueda in #307
- feat: rename alejandra_engine to alejandra by @kamadorueda in #308
- docs: null-ls for neovim by @kamadorueda in #309
- docs: emacs integration by @kamadorueda in #311
- docs: use proper capitalization by @kamadorueda in #312
- docs: add style guide by @kamadorueda in #313
- Use clap-derive by @Sciencentistguy in #315
- refactor: use more rustfmt rules by @kamadorueda in #316
- feat: respect - for stdin by @kamadorueda in #317
- docs: update changelog by @kamadorueda in #318
- docs: style guide of functions with destructuring by @kamadorueda in #319
- docs: link style guide in the readme by @kamadorueda in #320
- docs: add a contributing file [skip ci] by @kamadorueda in #321
- docs: add a code of conduct [skip ci] by @kamadorueda in #322
- docs: link discussions [skip ci] by @kamadorueda in #323
- feat: conform comments to editorconfig with
indent_size = 2by @blaggacao in #324 - feat: document crate by @kamadorueda in #325
- docs: update changelog [skip ci] by @kamadorueda in #326
- feat: update dependencies by @kamadorueda in #327
New Contributors
- @Sciencentistguy made their first contribution in #315
Full Changelog: 1.5.0...2.0.0
1.5.0
What's Changed
- docs: add pre-commit-hooks.nix example by @loicreynier in #296
- docs: publishing extension to open-vsx by @kamadorueda in #299
- docs: simplify readme by @kamadorueda in #300
- feat: update dependencies by @kamadorueda in #301
- feat: update dependencies by @kamadorueda in #303
Full Changelog: 1.4.0...1.5.0
1.4.0
Added
- A pre-commit hook (requires Alejandra to be installed in the host).
What's Changed
- feat: add an overlay by @kamadorueda in #287
- feat: add system pre-commit hook by @loicreynier in #289
- feat: document hook by @kamadorueda in #290
Full Changelog: 1.3.0...1.4.0
1.3.0
Added
- A pre-commit hook (requires Nix to be installed in the host).
Changed
- Updated dependencies to its latest version.
What's Changed
- feat: add licenses metadata by @kamadorueda in #278
- refactor: rm authors from help by @kamadorueda in #279
- feat: add pre-commit hook (without altering repo structure) by @loicreynier in #281
- docs: add pre-commit example by @kamadorueda in #282
- feat: more robust pre-commit hook by @kamadorueda in #283
- feat: push build deps to cachix by @kamadorueda in #284
- feat: release 1.3.0 by @kamadorueda in #285
New Contributors
- @loicreynier made their first contribution in #281
Full Changelog: 1.2.0...1.3.0
1.2.0
Added
- A new i686-linux system to the flake.
apps.${system}.defaultto the Flake
so that newer versions of Nix
understand this instead ofdefaultApp.${system}.
Fixed
- A typo in the documentation where
aarch64-linuxappeared twice
andaarch64-darwindidn't.
Security
- New CVEs were discovered in the third party dependencies of our website:
https://kamadorueda.github.io/alejandra/
and so we updated those front-end dependencies to their latest version.
What's Changed
- README: fix aarch64-linux appearing twice by @ConnorBaker in #261
- Supply an i686-linux package by @rehno-lindeque in #262
- Kamadorueda by @kamadorueda in #264
- build(deps): bump node-forge from 1.2.1 to 1.3.0 in /front by @dependabot in #265
- build(deps): bump minimist from 1.2.5 to 1.2.6 in /integrations/vscode by @dependabot in #266
- build(deps): bump minimist from 1.2.5 to 1.2.6 in /front by @dependabot in #267
- feat: update front dependencies by @kamadorueda in #268
- feat: update vscode deps by @kamadorueda in #269
- feat: update alejandra dependencies by @kamadorueda in #270
- feat: --check no longer modifies files in-place by @kamadorueda in #272
New Contributors
- @Mic92 made their first contribution in #256
- @ConnorBaker made their first contribution in #261
- @rehno-lindeque made their first contribution in #262
- @dependabot made their first contribution in #265
Full Changelog: 1.1.0...1.2.0
1.1.0
Added
- Emacs integration instructions.
- A
--quietflag to the CLI which hide output details,
disable the TUI
and only print error messages.
Changed
- Updated dependencies to its latest version.
Pull requests
- fix: plural conditions by @kamadorueda in #254
- feat: quiet mode by @kamadorueda in #255
- README: add doom-emacs integration by @Mic92 in #256
New Contributors
Full Changelog: 1.0.0...1.1.0
1.0.0
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
- feat: even more simplification by @kamadorueda in #231
- perf: no need for pos_new by @kamadorueda in #233
- feat: try parentheses heuristics by @kamadorueda in #234
- perf: split children rewrittes by @kamadorueda in #235
- feat: add rustc to dev shell by @kamadorueda in #236
- feat: improve parentheses handling by @kamadorueda in #237
- test: add more apply cases by @kamadorueda in #238
- feat: better apply indentation by @kamadorueda in #239
- docs: document nixos installation by @kamadorueda in #243
- refactor: reuse parens on string interpol by @kamadorueda in #244
- feat: allow choosing loose parens by @kamadorueda in #245
Full Changelog: 0.7.0...1.0.0