mirror of
https://github.com/RGBCube/alejandra
synced 2025-07-31 04:27:45 +00:00
feat: release 0.4.0
This commit is contained in:
parent
eb7c058318
commit
2cf592a4d6
15 changed files with 67 additions and 87 deletions
|
@ -1,29 +0,0 @@
|
||||||
# Editor configuration, see http://editorconfig.org
|
|
||||||
root = true
|
|
||||||
|
|
||||||
[*]
|
|
||||||
end_of_line = lf
|
|
||||||
insert_final_newline = true
|
|
||||||
trim_trailing_whitespace = true
|
|
||||||
charset = utf-8
|
|
||||||
indent_style = space
|
|
||||||
indent_size = 2
|
|
||||||
|
|
||||||
# Ignore diffs/patches
|
|
||||||
[*.{diff,patch}]
|
|
||||||
end_of_line = unset
|
|
||||||
insert_final_newline = unset
|
|
||||||
trim_trailing_whitespace = unset
|
|
||||||
indent_size = unset
|
|
||||||
|
|
||||||
[*.md]
|
|
||||||
max_line_length = off
|
|
||||||
trim_trailing_whitespace = false
|
|
||||||
|
|
||||||
[tests/cases/**]
|
|
||||||
end_of_line = unset
|
|
||||||
insert_final_newline = unset
|
|
||||||
trim_trailing_whitespace = unset
|
|
||||||
charset = unset
|
|
||||||
indent_style = unset
|
|
||||||
indent_size = unset
|
|
36
CHANGELOG.md
36
CHANGELOG.md
|
@ -17,9 +17,40 @@ Types of changes
|
||||||
- Security in case of vulnerabilities.
|
- Security in case of vulnerabilities.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
## [0.4.0] - 2022-02-21
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- A text user interface with progress-bars and modern output (requires a TTY).
|
- A text user interface with a progress-bar
|
||||||
|
and modern, colorful output (requires a tty).
|
||||||
|
|
||||||
|
When no tty is available
|
||||||
|
or in non-interactive environments like a CI/CD
|
||||||
|
or when piping alejandra to other commands (`$ alejandra 2> file`, `$ alejandra | cat`)
|
||||||
|
the old school program output will be used.
|
||||||
|
|
||||||
|
- A `--exclude` option to the CLI.
|
||||||
|
|
||||||
|
- Refactors to the codebase. We now comply with `clippy`, a Rust linter.
|
||||||
|
|
||||||
|
- A new structure to the codebase and link time optimizations.
|
||||||
|
|
||||||
|
Binaries were reduced in size by 15%
|
||||||
|
with respect to the previous release
|
||||||
|
(even with the added features),
|
||||||
|
performance was improved in the reference machine
|
||||||
|
from 45 seconds to 35 while formatting Nixpkgs on a single core.
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- The old school program output is now less verbose.
|
||||||
|
|
||||||
|
It prints only the path of files that were changed,
|
||||||
|
and a summary of the number of errors and files changed during formatting.
|
||||||
|
|
||||||
|
### Removed
|
||||||
|
|
||||||
|
- The `--debug` flag in the CLI.
|
||||||
|
|
||||||
## [0.3.1] - 2022-02-20
|
## [0.3.1] - 2022-02-20
|
||||||
|
|
||||||
|
@ -175,7 +206,8 @@ Types of changes
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
[unreleased]: https://github.com/kamadorueda/alejandra/compare/0.3.1...HEAD
|
[unreleased]: https://github.com/kamadorueda/alejandra/compare/0.4.0...HEAD
|
||||||
|
[0.4.0]: https://github.com/kamadorueda/alejandra/compare/0.3.1...0.4.0
|
||||||
[0.3.1]: https://github.com/kamadorueda/alejandra/compare/0.3.0...0.3.1
|
[0.3.1]: https://github.com/kamadorueda/alejandra/compare/0.3.0...0.3.1
|
||||||
[0.3.0]: https://github.com/kamadorueda/alejandra/compare/0.2.0...0.3.0
|
[0.3.0]: https://github.com/kamadorueda/alejandra/compare/0.2.0...0.3.0
|
||||||
[0.2.0]: https://github.com/kamadorueda/alejandra/compare/0.1.0...0.2.0
|
[0.2.0]: https://github.com/kamadorueda/alejandra/compare/0.1.0...0.2.0
|
||||||
|
|
4
Cargo.lock
generated
4
Cargo.lock
generated
|
@ -4,7 +4,7 @@ version = 3
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "alejandra_cli"
|
name = "alejandra_cli"
|
||||||
version = "0.3.1"
|
version = "0.4.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"alejandra_engine",
|
"alejandra_engine",
|
||||||
"atty",
|
"atty",
|
||||||
|
@ -18,7 +18,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "alejandra_engine"
|
name = "alejandra_engine"
|
||||||
version = "0.3.1"
|
version = "0.4.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"clap",
|
"clap",
|
||||||
"rand",
|
"rand",
|
||||||
|
|
20
README.md
20
README.md
|
@ -109,11 +109,11 @@ You can download a binary for your platform,
|
||||||
make it executable (`$ chmod +x`)
|
make it executable (`$ chmod +x`)
|
||||||
and have fun!
|
and have fun!
|
||||||
|
|
||||||
- [aarch64-unknown-linux-musl](https://github.com/kamadorueda/alejandra/releases/download/0.3.1/alejandra-aarch64-unknown-linux-musl)
|
- [aarch64-unknown-linux-musl](https://github.com/kamadorueda/alejandra/releases/download/0.4.0/alejandra-aarch64-unknown-linux-musl)
|
||||||
- [armv6l-unknown-linux-musleabihf](https://github.com/kamadorueda/alejandra/releases/download/0.3.1/alejandra-armv6l-unknown-linux-musleabihf)
|
- [armv6l-unknown-linux-musleabihf](https://github.com/kamadorueda/alejandra/releases/download/0.4.0/alejandra-armv6l-unknown-linux-musleabihf)
|
||||||
- [armv7l-unknown-linux-musleabihf](https://github.com/kamadorueda/alejandra/releases/download/0.3.1/alejandra-armv7l-unknown-linux-musleabihf)
|
- [armv7l-unknown-linux-musleabihf](https://github.com/kamadorueda/alejandra/releases/download/0.4.0/alejandra-armv7l-unknown-linux-musleabihf)
|
||||||
- [i686-unknown-linux-musl](https://github.com/kamadorueda/alejandra/releases/download/0.3.1/alejandra-i686-unknown-linux-musl)
|
- [i686-unknown-linux-musl](https://github.com/kamadorueda/alejandra/releases/download/0.4.0/alejandra-i686-unknown-linux-musl)
|
||||||
- [x86_64-unknown-linux-musl](https://github.com/kamadorueda/alejandra/releases/download/0.3.1/alejandra-x86_64-unknown-linux-musl)
|
- [x86_64-unknown-linux-musl](https://github.com/kamadorueda/alejandra/releases/download/0.4.0/alejandra-x86_64-unknown-linux-musl)
|
||||||
|
|
||||||
Alternatively there is an automated method for some platforms.
|
Alternatively there is an automated method for some platforms.
|
||||||
It needs:
|
It needs:
|
||||||
|
@ -144,7 +144,7 @@ $ /path/to/alejandra --help
|
||||||
- Nix with [Flakes](https://nixos.wiki/wiki/Flakes):
|
- Nix with [Flakes](https://nixos.wiki/wiki/Flakes):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ nix profile install github:kamadorueda/alejandra/0.3.1
|
$ nix profile install github:kamadorueda/alejandra/0.4.0
|
||||||
```
|
```
|
||||||
|
|
||||||
- Nix stable:
|
- Nix stable:
|
||||||
|
@ -152,10 +152,10 @@ $ /path/to/alejandra --help
|
||||||
Pick one depending on your platform:
|
Pick one depending on your platform:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ nix-env -ivA aarch64-darwin -f https://github.com/kamadorueda/alejandra/tarball/0.3.1
|
$ nix-env -ivA aarch64-darwin -f https://github.com/kamadorueda/alejandra/tarball/0.4.0
|
||||||
$ nix-env -ivA aarch64-linux -f https://github.com/kamadorueda/alejandra/tarball/0.3.1
|
$ nix-env -ivA aarch64-linux -f https://github.com/kamadorueda/alejandra/tarball/0.4.0
|
||||||
$ nix-env -ivA x86_64-darwin -f https://github.com/kamadorueda/alejandra/tarball/0.3.1
|
$ nix-env -ivA x86_64-darwin -f https://github.com/kamadorueda/alejandra/tarball/0.4.0
|
||||||
$ nix-env -ivA x86_64-linux -f https://github.com/kamadorueda/alejandra/tarball/0.3.1
|
$ nix-env -ivA x86_64-linux -f https://github.com/kamadorueda/alejandra/tarball/0.4.0
|
||||||
```
|
```
|
||||||
|
|
||||||
Then run Alejandra with:
|
Then run Alejandra with:
|
||||||
|
|
6
flake.lock
generated
6
flake.lock
generated
|
@ -18,11 +18,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1645013224,
|
"lastModified": 1645347465,
|
||||||
"narHash": "sha256-b7OEC8vwzJv3rsz9pwnTX2LQDkeOWz2DbKypkVvNHXc=",
|
"narHash": "sha256-GoNcKieZf86tFzuVY7+kfEGw0rjgBrdfwRj4l7zOfZw=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "b66b39216b1fef2d8c33cc7a5c72d8da80b79970",
|
"rev": "7feed2c0bec4161c83509d18089784cfcef49667",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
outputs = inputs: let
|
outputs = inputs: let
|
||||||
commit = inputs.self.shortRev or "dirty";
|
commit = inputs.self.shortRev or "dirty";
|
||||||
date = inputs.self.lastModifiedDate or inputs.self.lastModified or "19700101";
|
date = inputs.self.lastModifiedDate or inputs.self.lastModified or "19700101";
|
||||||
version = "0.3.1+${builtins.substring 0 8 date}.${commit}";
|
version = "0.4.0+${builtins.substring 0 8 date}.${commit}";
|
||||||
|
|
||||||
nixpkgsForHost = host:
|
nixpkgsForHost = host:
|
||||||
import inputs.nixpkgs {
|
import inputs.nixpkgs {
|
||||||
|
|
4
front/Cargo.lock
generated
4
front/Cargo.lock
generated
|
@ -4,7 +4,7 @@ version = 3
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "alejandra_engine"
|
name = "alejandra_engine"
|
||||||
version = "0.3.1"
|
version = "0.4.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"clap",
|
"clap",
|
||||||
"rand",
|
"rand",
|
||||||
|
@ -14,7 +14,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "alejandra_front"
|
name = "alejandra_front"
|
||||||
version = "0.3.1"
|
version = "0.4.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"alejandra_engine",
|
"alejandra_engine",
|
||||||
"console_error_panic_hook",
|
"console_error_panic_hook",
|
||||||
|
|
|
@ -14,7 +14,7 @@ description = "The Uncompromising Nix Code Formatter"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
name = "alejandra_front"
|
name = "alejandra_front"
|
||||||
repository = "https://github.com/kamadorueda/alejandra"
|
repository = "https://github.com/kamadorueda/alejandra"
|
||||||
version = "0.3.1"
|
version = "0.4.0"
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
lto = true
|
lto = true
|
||||||
|
|
18
front/flake.lock
generated
18
front/flake.lock
generated
|
@ -8,11 +8,11 @@
|
||||||
"rust-analyzer-src": "rust-analyzer-src"
|
"rust-analyzer-src": "rust-analyzer-src"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1645338193,
|
"lastModified": 1645424702,
|
||||||
"narHash": "sha256-BTajZF5xFmO3+MZE29C6JRLSM6PXdoFrpTlaMZr0Ljc=",
|
"narHash": "sha256-qxT0Mu7/xnMWDygGhctmvQvG1+xz+mmV692GRBkjDFk=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "fenix",
|
"repo": "fenix",
|
||||||
"rev": "f15f0f9fedd87e265e49585463df72c1257f1ae8",
|
"rev": "882a812300adcd85a5e10dc26e5d7a1d6acc7575",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -23,11 +23,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1645013224,
|
"lastModified": 1645347465,
|
||||||
"narHash": "sha256-b7OEC8vwzJv3rsz9pwnTX2LQDkeOWz2DbKypkVvNHXc=",
|
"narHash": "sha256-GoNcKieZf86tFzuVY7+kfEGw0rjgBrdfwRj4l7zOfZw=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "b66b39216b1fef2d8c33cc7a5c72d8da80b79970",
|
"rev": "7feed2c0bec4161c83509d18089784cfcef49667",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -46,11 +46,11 @@
|
||||||
"rust-analyzer-src": {
|
"rust-analyzer-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1645265362,
|
"lastModified": 1645399019,
|
||||||
"narHash": "sha256-6z88g8cyw6Ae9SxgGUmT+jMuMadrJ4IgVV+UHdK4ook=",
|
"narHash": "sha256-O9onJrAJY0TWxEZZcTWuF7SGPypRtSo0ZbpzDLC5+os=",
|
||||||
"owner": "rust-analyzer",
|
"owner": "rust-analyzer",
|
||||||
"repo": "rust-analyzer",
|
"repo": "rust-analyzer",
|
||||||
"rev": "1d53f695f0408f47c5cce5cefa471eb0e86b0db7",
|
"rev": "d6ed146a1caa41c65a831efbc80d79067c8f5955",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
releases=https://github.com/kamadorueda/alejandra/releases/download/
|
releases=https://github.com/kamadorueda/alejandra/releases/download/
|
||||||
target=alejandra-aarch64-unknown-linux-musl
|
target=alejandra-aarch64-unknown-linux-musl
|
||||||
version=0.3.1
|
version=0.4.0
|
||||||
|
|
||||||
curl -o alejandra -L "${releases}/${version}/${target}"
|
curl -o alejandra -L "${releases}/${version}/${target}"
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
releases=https://github.com/kamadorueda/alejandra/releases/download/
|
releases=https://github.com/kamadorueda/alejandra/releases/download/
|
||||||
target=alejandra-x86_64-unknown-linux-musl
|
target=alejandra-x86_64-unknown-linux-musl
|
||||||
version=0.3.1
|
version=0.4.0
|
||||||
|
|
||||||
curl -o alejandra -L "${releases}/${version}/${target}"
|
curl -o alejandra -L "${releases}/${version}/${target}"
|
||||||
|
|
||||||
|
|
|
@ -1,23 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
if git rev-parse --verify HEAD > /dev/null 2>&1; then
|
|
||||||
against=HEAD
|
|
||||||
else
|
|
||||||
# Initial commit: diff against an empty tree object
|
|
||||||
against=$(${git}/bin/git hash-object -t tree /dev/null)
|
|
||||||
fi
|
|
||||||
|
|
||||||
diff="git diff-index --name-only --cached $against --diff-filter d"
|
|
||||||
all_files=($($diff))
|
|
||||||
|
|
||||||
# Format the entire tree.
|
|
||||||
treefmt
|
|
||||||
|
|
||||||
# check editorconfig
|
|
||||||
editorconfig-checker -- "${all_files[@]}"
|
|
||||||
if [[ $? != '0' ]]; then
|
|
||||||
printf "%b\n" \
|
|
||||||
"\nCode is not aligned with .editorconfig" \
|
|
||||||
"Review the output and commit your fixes" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
|
@ -18,4 +18,4 @@ description = "The Uncompromising Nix Code Formatter"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
name = "alejandra_cli"
|
name = "alejandra_cli"
|
||||||
repository = "https://github.com/kamadorueda/alejandra"
|
repository = "https://github.com/kamadorueda/alejandra"
|
||||||
version = "0.3.1"
|
version = "0.4.0"
|
||||||
|
|
|
@ -10,4 +10,4 @@ description = "The Uncompromising Nix Code Formatter"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
name = "alejandra_engine"
|
name = "alejandra_engine"
|
||||||
repository = "https://github.com/kamadorueda/alejandra"
|
repository = "https://github.com/kamadorueda/alejandra"
|
||||||
version = "0.3.1"
|
version = "0.4.0"
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
pub const VERSION: &str = "0.3.1";
|
pub const VERSION: &str = "0.4.0";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue