Skip to content

Commit

Permalink
Merge pull request #816 from avh4/release/0.8.7
Browse files Browse the repository at this point in the history
Prepare 0.8.7 release
  • Loading branch information
avh4 authored Apr 13, 2023
2 parents aded67f + 30ba1c7 commit af3f182
Show file tree
Hide file tree
Showing 12 changed files with 131 additions and 17 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
## main
## 0.8.7

New features:
- `case ... then` is now auto-corrected to `case ... of`
- `=>` is now auto-corrected to `->`

Bug fixes:
- Top-level declarations named "infix" no longer make files unprocessable
- The npm installer should now work correctly on Windows (was broken for 0.8.6)


## 0.8.6
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![Build Status](https://travis-ci.org/avh4/elm-format.svg?branch=master)](https://travis-ci.org/avh4/elm-format)
[![latest version: 0.8.6](https://img.shields.io/badge/version-0.8.6-orange.svg)](https://github.com/avh4/elm-format/releases/tag/0.8.6)
[![latest version: 0.8.7](https://img.shields.io/badge/version-0.8.7-orange.svg)](https://github.com/avh4/elm-format/releases/tag/0.8.7)

# elm-format

Expand All @@ -26,15 +26,15 @@ elm-format --help # See other command line options
```


## Installation [![(latest version: 0.8.6)](https://img.shields.io/badge/version-0.8.6-orange.svg)](https://github.com/avh4/elm-format/releases/tag/0.8.6)
## Installation [![(latest version: 0.8.7)](https://img.shields.io/badge/version-0.8.7-orange.svg)](https://github.com/avh4/elm-format/releases/tag/0.8.7)

To install `elm-format`:

```sh
npm install -g elm-format
```

or download the version appropriate for your OS from the [release page](https://github.com/avh4/elm-format/releases/tag/0.8.6),
or download the version appropriate for your OS from the [release page](https://github.com/avh4/elm-format/releases/tag/0.8.7),
unzip it,
and place `elm-format` or `elm-format.exe` (windows) on your `PATH`.

Expand Down
31 changes: 31 additions & 0 deletions Release Notes/0.8.7.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
## Small improvements and fixed npm installer for Windows

Version 0.8.6 was not widely announced because of an issue with the npm installer on Windows,
so check the [0.8.6 release notes](https://github.com/avh4/elm-format/releases/tag/0.8.6) as well.
Below are the additional changes in 0.8.7.

New features:
- `case ... then` is now auto-corrected to `case ... of`
- `=>` is now auto-corrected to `->`

Bug fixes:
- Top-level declarations named "infix" no longer make files unprocessable
- The npm installer should now work correctly on Windows (was broken for 0.8.6)


## Install

```sh
npm install -g elm-format
```

or [download from the release page](https://github.com/avh4/elm-format/releases/tag/0.8.7).


## Thanks to ...

- @kutyel for lenient parsing additions
- @emmabastas for the initial draft of test coverage scripts
- @jfmengels for continued thoughtful issue discussion across the Elm devtools community (only partially related to elm-format, but thank you!)
- @8n8 for code cleanup help
- [Lamdera](https://www.lamdera.com/) for providing CI runners to build the MacOS ARM64 release binaries
2 changes: 1 addition & 1 deletion Shakefile/src/Shakefiles/Haskell/Hpc.hs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ mergeTixFiles tixs out = do
rules :: String -> Rules ()
rules gitSha = do
let hpcConfig =
[ "--hpcdir=./dist-newstyle/_coverage/build/x86_64-linux/ghc-9.2.5/elm-format-0.8.6/hpc/vanilla/mix/elm-format"
[ "--hpcdir=./dist-newstyle/_coverage/build/x86_64-linux/ghc-9.2.5/elm-format-0.8.7/hpc/vanilla/mix/elm-format"
, "--hpcdir=./dist-newstyle/_coverage/build/x86_64-linux/ghc-9.2.5/avh4-lib-0.0.0.1/hpc/vanilla/mix/avh4-lib-0.0.0.1"
, "--hpcdir=./dist-newstyle/_coverage/build/x86_64-linux/ghc-9.2.5/elm-format-lib-0.0.0.1/hpc/vanilla/mix/elm-format-lib-0.0.0.1"
, "--hpcdir=./dist-newstyle/_coverage/build/x86_64-linux/ghc-9.2.5/elm-format-markdown-0.0.0.1/hpc/vanilla/mix/elm-format-markdown-0.0.0.1"
Expand Down
4 changes: 2 additions & 2 deletions Style Guide/CI.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ A FormattingError will be an object with the following fields:
### Example JSON

```json
[{"path":"./src/Fifo.elm","message":"File is not formatted with elm-format-0.8.6 --elm-version=0.19"}
,{"path":"./tests/Tests.elm","message":"File is not formatted with elm-format-0.8.6 --elm-version=0.19"}
[{"path":"./src/Fifo.elm","message":"File is not formatted with elm-format-0.8.7 --elm-version=0.19"}
,{"path":"./tests/Tests.elm","message":"File is not formatted with elm-format-0.8.7 --elm-version=0.19"}
]
```
2 changes: 1 addition & 1 deletion dev/Documentation/Publishing.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ cd package/nix
./build.sh
```

Then `cd nixpkgs`, push the resulting branch, and make a PR to <https://github.com/NixOS/nixpkgs> with the title "`elm-format: <old version> -> <new version>`"
Then `cd nixpkgs`, push the resulting branch, and make a PR to <https://github.com/NixOS/nixpkgs> with the title "`elmPackages.elm-format: <old version> -> <new version>`"


## Cleanup
Expand Down
2 changes: 1 addition & 1 deletion elm-format.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cabal-version: 2.2
-- see: https://github.com/sol/hpack

name: elm-format
version: 0.8.6
version: 0.8.7
synopsis: A source code formatter for Elm
description: A simple way to format your Elm code according to the official
style guide.
Expand Down
2 changes: 1 addition & 1 deletion package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: elm-format
version: 0.8.6
version: 0.8.7

synopsis: A source code formatter for Elm
description: |
Expand Down
14 changes: 8 additions & 6 deletions package/nix/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,24 @@ ELM_FORMAT_VERSION="$(git describe --abbrev=8)"
BRANCH="elm-format-$ELM_FORMAT_VERSION"

if [ ! -d nixpkgs ]; then
git clone --branch master https://github.com/NixOS/nixpkgs.git nixpkgs
git clone --branch nixpkgs-unstable https://github.com/NixOS/nixpkgs.git nixpkgs
fi

pushd nixpkgs
git fetch origin master
git fetch origin nixpkgs-unstable
git reset --hard
if git branch | grep " ${BRANCH}$"; then
git checkout "$BRANCH"
git reset --hard origin/master
git switch "$BRANCH"
git reset --hard origin/nixpkgs-unstable
else
git checkout -b "$BRANCH" origin/master
git switch -c "$BRANCH" origin/nixpkgs-unstable
git reset --hard
fi
popd

cabal2nix --no-haddock https://github.com/avh4/elm-format --revision "$REV" --subpath avh4-lib > nixpkgs/pkgs/development/compilers/elm/packages/avh4-lib.nix
cabal2nix --no-haddock --flag='--ghc-option=-Wno-error=unused-packages' https://github.com/avh4/elm-format --revision "$REV" --subpath avh4-lib \
| sed -e 's#-f--ghc-option=#--ghc-option=#;s#-wno-#-Wno-#' \
> nixpkgs/pkgs/development/compilers/elm/packages/avh4-lib.nix
cabal2nix --no-haddock https://github.com/avh4/elm-format --revision "$REV" --subpath elm-format-lib > nixpkgs/pkgs/development/compilers/elm/packages/elm-format-lib.nix
cabal2nix --no-haddock https://github.com/avh4/elm-format --revision "$REV" --subpath elm-format-test-lib > nixpkgs/pkgs/development/compilers/elm/packages/elm-format-test-lib.nix
cabal2nix --no-haddock https://github.com/avh4/elm-format --revision "$REV" --subpath elm-format-markdown > nixpkgs/pkgs/development/compilers/elm/packages/elm-format-markdown.nix
Expand Down
2 changes: 1 addition & 1 deletion package/npm/default.nix
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
{pkgs ? import <nixpkgs> {}}:
import ./workspace.nix pkgs (import ./elm-format-0.8.6-windows.nix)
import ./workspace.nix pkgs (import ./elm-format-0.8.7.nix)
40 changes: 40 additions & 0 deletions package/npm/elm-format-0.8.7-rc.1.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
name = "elm-format";
version = "0.8.7";
prerelease = "rc.1";
binaryPackageScope = "avh4";
experimental = false;
elmVersions = [
"0.18.0"
"0.19.0"
"0.19.1"
];

binaries = {
linux-x64 = {
v = "1";
url = "https://github.com/avh4/elm-format/releases/download/0.8.7-rc.1/elm-format-0.8.7-rc.1-linux-x64.tgz";
sha256 = "sha256-yMD57UqAAh9NzVL+7eZNLscvD1qnJ8CG5EqrJ1i6z78=";
};
linux-aarch64 = {
v = "1";
url = "https://github.com/avh4/elm-format/releases/download/0.8.7-rc.1/elm-format-0.8.7-rc.1-linux-aarch64.tgz";
sha256 = "sha256-fPEDXsK99vZbrf248f5uuEjzZK2a06GR34UBzw0WDvs=";
};
mac-x64 = {
v = "1";
url = "https://github.com/avh4/elm-format/releases/download/0.8.7-rc.1/elm-format-0.8.7-rc.1-mac-x64.tgz";
sha256 = "sha256-itMJlqommJJzchcYwUnQpci5KPRcctfzm+DKyKBzsp0=";
};
mac-arm64 = {
v = "1";
url = "https://github.com/avh4/elm-format/releases/download/0.8.7-rc.1/elm-format-0.8.7-rc.1-mac-arm64.tgz";
sha256 = "sha256-kdMTab6hR9mGN4pWoAztkhl4mflwO0K8U0BV+gbM7GM=";
};
win-x64 = {
v = "1";
url = "https://github.com/avh4/elm-format/releases/download/0.8.7-rc.1/elm-format-0.8.7-rc.1-win-x64.zip";
sha256 = "sha256-VXmZ5CU7HJpihKT+M7kRup8S+f3MtXu4w5dfkQlzOyM=";
};
};
}
40 changes: 40 additions & 0 deletions package/npm/elm-format-0.8.7.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
name = "elm-format";
version = "0.8.7";
prerelease = null;
binaryPackageScope = "avh4";
experimental = false;
elmVersions = [
"0.18.0"
"0.19.0"
"0.19.1"
];

binaries = {
linux-x64 = {
v = "2";
url = "https://github.com/avh4/elm-format/releases/download/0.8.7/elm-format-0.8.7-linux-x64.tgz";
sha256 = "sha256-4iIRtg4j1DjlVG8q/VLrEKDnR2CuUR1iE0J/IVOj/G0=";
};
linux-aarch64 = {
v = "2";
url = "https://github.com/avh4/elm-format/releases/download/0.8.7/elm-format-0.8.7-linux-aarch64.tgz";
sha256 = "sha256-jMvrk4AfyX/0Mzh/QZE605PZKnCLAYFVtmN4AprH+08=";
};
mac-x64 = {
v = "2";
url = "https://github.com/avh4/elm-format/releases/download/0.8.7/elm-format-0.8.7-mac-x64.tgz";
sha256 = "sha256-2Fz2jVFeUUz+c0laE/IvJSlQdDDIibOwHu82r/oXAhA=";
};
mac-arm64 = {
v = "2";
url = "https://github.com/avh4/elm-format/releases/download/0.8.7/elm-format-0.8.7-mac-arm64.tgz";
sha256 = "sha256-OqGWT5ybgon4xtFMpaz2MGtMSHTbHf7odhC3Ef9mh6E=";
};
win-x64 = {
v = "2";
url = "https://github.com/avh4/elm-format/releases/download/0.8.7/elm-format-0.8.7-win-x64.zip";
sha256 = "sha256-WZgJKDwGQhNcb8YvZn2AlmyxbtlHOdf3P22dv4ZdaxI=";
};
};
}

0 comments on commit af3f182

Please sign in to comment.