From 1063c86e4128f4a9430507c1beb655cfaf547ff3 Mon Sep 17 00:00:00 2001 From: Aaron VonderHaar Date: Wed, 18 Jun 2025 14:10:46 -0700 Subject: [PATCH 1/4] Bump version to 0.8.8 --- CHANGELOG.md | 6 ++++++ README.md | 6 +++--- Release Notes/0.8.8.md | 23 +++++++++++++++++++++++ elm-format.cabal | 2 +- package.yaml | 2 +- 5 files changed, 34 insertions(+), 5 deletions(-) create mode 100644 Release Notes/0.8.8.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 8931d4d41..566cec2de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 0.8.8 + +Bug fixes: + - `case` expressions with multiline patterns are now formatted correctly + + ## 0.8.7 New features: diff --git a/README.md b/README.md index 686dbc261..d8223813f 100644 --- a/README.md +++ b/README.md @@ -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.7](https://img.shields.io/badge/version-0.8.7-orange.svg)](https://github.com/avh4/elm-format/releases/tag/0.8.7) +[![latest version: 0.8.8](https://img.shields.io/badge/version-0.8.8-orange.svg)](https://github.com/avh4/elm-format/releases/tag/0.8.8) # elm-format @@ -26,7 +26,7 @@ elm-format --help # See other command line options ``` -## 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) +## Installation [![(latest version: 0.8.8)](https://img.shields.io/badge/version-0.8.8-orange.svg)](https://github.com/avh4/elm-format/releases/tag/0.8.8) To install `elm-format`: @@ -34,7 +34,7 @@ To install `elm-format`: 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.7), +or download the version appropriate for your OS from the [release page](https://github.com/avh4/elm-format/releases/tag/0.8.8), unzip it, and place `elm-format` or `elm-format.exe` (windows) on your `PATH`. diff --git a/Release Notes/0.8.8.md b/Release Notes/0.8.8.md new file mode 100644 index 000000000..cddeff2fe --- /dev/null +++ b/Release Notes/0.8.8.md @@ -0,0 +1,23 @@ +## Update to GHC 9.6 + +The main purpose for this update is to upgrade to GHC 9.6 to avoid falling too far behind +on breaking changes in Haskell libraries. + +Bug fixes: + - `case` expressions with multiline patterns are now formatted correctly + + +## Install + +```sh +npm install -g elm-format +``` + +or [download from the release page](https://github.com/avh4/elm-format/releases/tag/0.8.8). + + +## Thanks to ... + + - @sandydoo for Haskell dependency updates and bugfix + - @perkee for code review and github config + - [Lamdera](https://www.lamdera.com/) for providing CI runners to build the MacOS ARM64 release binaries diff --git a/elm-format.cabal b/elm-format.cabal index 6aa96eb7c..28dcc8325 100644 --- a/elm-format.cabal +++ b/elm-format.cabal @@ -5,7 +5,7 @@ cabal-version: 2.2 -- see: https://github.com/sol/hpack name: elm-format -version: 0.8.7 +version: 0.8.8 synopsis: A source code formatter for Elm description: A simple way to format your Elm code according to the official style guide. diff --git a/package.yaml b/package.yaml index 37a778446..4a0d62dbf 100644 --- a/package.yaml +++ b/package.yaml @@ -1,5 +1,5 @@ name: elm-format -version: 0.8.7 +version: 0.8.8 synopsis: A source code formatter for Elm description: | From a3caa77e753f040c01c0490b27397e51127f6895 Mon Sep 17 00:00:00 2001 From: Aaron VonderHaar Date: Wed, 18 Jun 2025 14:37:56 -0700 Subject: [PATCH 2/4] github workflow: switch to upload-artifact@v4 --- .github/actions/release-artifact/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/release-artifact/action.yml b/.github/actions/release-artifact/action.yml index f2824377a..63f393318 100644 --- a/.github/actions/release-artifact/action.yml +++ b/.github/actions/release-artifact/action.yml @@ -35,7 +35,7 @@ runs: rm -v private.key env: MINISIGN_PRIVATE_KEY: ${{ inputs.minisign-key }} - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: elm-format-${{ github.sha }}-${{ matrix.build.archive-label }} path: dist/ From d07fddc8c0eef412dba07be4ab8768d6abcca796 Mon Sep 17 00:00:00 2001 From: Aaron VonderHaar Date: Wed, 18 Jun 2025 14:38:16 -0700 Subject: [PATCH 3/4] Use github hosted runners for macOS-ARM64 --- .../Build release (lamdera-community).yml | 85 ------------------- .github/workflows/Build release.yml | 5 +- 2 files changed, 4 insertions(+), 86 deletions(-) delete mode 100644 .github/workflows/Build release (lamdera-community).yml diff --git a/.github/workflows/Build release (lamdera-community).yml b/.github/workflows/Build release (lamdera-community).yml deleted file mode 100644 index 5bc240ec2..000000000 --- a/.github/workflows/Build release (lamdera-community).yml +++ /dev/null @@ -1,85 +0,0 @@ -name: Build release (lamdera-community) - -on: - push: - tags: '*' - branches: 'release/*' - -defaults: - run: - shell: bash - -jobs: - build: - strategy: - fail-fast: false - matrix: - build: - - name: macOS-ARM64 - runner: [ self-hosted, macOS, ARM64 ] - archive-label: macOS-arm64 - ghc: - version: "9.6.7" - build-platform: aarch64-apple-darwin - - name: release-${{ matrix.build.name }} - runs-on: ${{ matrix.build.runner }} - - steps: - - name: Configure environment - run: | - git config --global core.autocrlf false - - uses: actions/checkout@v3 - - uses: ./.github/actions/git-tags - - name: Check platform - run: | - uname -m - arch - arch -arm64 uname -m - file ~/runner-setups/elm-format/_work/_tool/ghcup/0.1.19.0/arm64/ghcup - - name: Setup Haskell - id: setup-haskell - run: | - curl -o ghcup https://downloads.haskell.org/~ghcup/0.1.19.0/aarch64-apple-darwin-ghcup-0.1.19.0 - chmod 0555 ./ghcup - file ./ghcup - export GHCUP_USE_XDG_DIRS=1 - ./ghcup list - export GHCUP_SKIP_UPDATE_CHECK=1 - ./ghcup unset ghc || true - ./ghcup install ghc "${{ matrix.build.ghc.version }}" - ./ghcup set ghc "${{ matrix.build.ghc.version }}" - ./ghcup install cabal recommended - ./ghcup set cabal recommended - echo "$HOME/.local/bin" >> "$GITHUB_PATH" - export PATH="$HOME/.local/bin:$PATH" - cabalStore="$GITHUB_WORKSPACE/_cabal-store" - ~/.local/bin/cabal --store-dir="$cabalStore" v2-configure - echo "cabal-store=$cabalStore" >> "$GITHUB_OUTPUT" - - name: Workaround for https://gitlab.haskell.org/ghc/ghc/-/issues/20592#note_436353 - run: | - echo "C_INCLUDE_PATH=$(xcrun --show-sdk-path)/usr/include/ffi" >> "$GITHUB_ENV" - cat "$GITHUB_ENV" - - name: Verify Haskell version - run: | - file "$(which cabal)" - cabal --version - ghc --version - ghc --print-build-platform - [[ $(ghc --numeric-version) == "${{ matrix.build.ghc.version }}" ]] - [[ $(ghc --print-build-platform) == "${{ matrix.build.ghc.build-platform }}" ]] - - uses: ./.github/actions/cache-haskell-deps - - run: cabal v2-update - - name: Install hpack - shell: bash - run: | - cabal install --installdir=./.bin hpack - echo "$(pwd)/.bin" >> "$GITHUB_PATH" - export PATH="$(pwd)/.bin:$PATH" - which hpack - hpack --version - - run: ./dev/build.sh -- dist-dependencies - - run: ./dev/build.sh -- dist - - uses: ./.github/actions/release-artifact - with: - minisign-key: ${{ secrets.MINISIGN_PRIVATE_KEY }} diff --git a/.github/workflows/Build release.yml b/.github/workflows/Build release.yml index 932f4b05d..9a8e8c207 100644 --- a/.github/workflows/Build release.yml +++ b/.github/workflows/Build release.yml @@ -19,8 +19,11 @@ jobs: runner: windows-latest archive-label: Windows - name: macOS-x86 - runner: macOS-latest + runner: macOS-13 archive-label: macOS-x86 + - name: macOS-ARM64 + runner: macOS-15 + archive-label: macOS-arm64 name: release-${{ matrix.build.name }} runs-on: ${{ matrix.build.runner }} From b06902f1e450f8be1e7b318caab7ccb1950893fa Mon Sep 17 00:00:00 2001 From: Aaron VonderHaar Date: Wed, 18 Jun 2025 19:56:15 -0700 Subject: [PATCH 4/4] Prepare 0.8.8 release --- Release Notes/0.8.8.md | 1 - dev/Documentation/Publishing.md | 2 +- package/npm/default.nix | 2 +- package/npm/elm-format-0.8.8.nix | 40 ++++++++++++++++++++++++++++++++ 4 files changed, 42 insertions(+), 3 deletions(-) create mode 100644 package/npm/elm-format-0.8.8.nix diff --git a/Release Notes/0.8.8.md b/Release Notes/0.8.8.md index cddeff2fe..0b646d0dd 100644 --- a/Release Notes/0.8.8.md +++ b/Release Notes/0.8.8.md @@ -20,4 +20,3 @@ or [download from the release page](https://github.com/avh4/elm-format/releases/ - @sandydoo for Haskell dependency updates and bugfix - @perkee for code review and github config - - [Lamdera](https://www.lamdera.com/) for providing CI runners to build the MacOS ARM64 release binaries diff --git a/dev/Documentation/Publishing.md b/dev/Documentation/Publishing.md index 1c98ede46..74c7650f3 100644 --- a/dev/Documentation/Publishing.md +++ b/dev/Documentation/Publishing.md @@ -62,7 +62,7 @@ Then `cd elm-tooling`, push the resulting branch, and make a PR to ` + - To get the sha256, run `nix-prefetch-url --unpack | xargs nix hash convert --hash-algo sha256` - `v` is the sub-patch version for this binary and can be incremented as needed (but should be reset to `"1"` on each new elm-format version) 1. Update `default.nix` to point to the new `elm-format-.nix` 1. `nix-shell --pure` diff --git a/package/npm/default.nix b/package/npm/default.nix index 75d646cbf..1190237b6 100644 --- a/package/npm/default.nix +++ b/package/npm/default.nix @@ -1,2 +1,2 @@ {pkgs ? import {}}: -import ./workspace.nix pkgs (import ./elm-format-0.8.7.nix) +import ./workspace.nix pkgs (import ./elm-format-0.8.8.nix) diff --git a/package/npm/elm-format-0.8.8.nix b/package/npm/elm-format-0.8.8.nix new file mode 100644 index 000000000..e17925136 --- /dev/null +++ b/package/npm/elm-format-0.8.8.nix @@ -0,0 +1,40 @@ +{ + name = "elm-format"; + version = "0.8.8"; + prerelease = null; + 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.8/elm-format-0.8.8-linux-x64.tgz"; + sha256 = "sha256-InbNKkpQnmmHQYE7oZ4mf8YCvg5jYK2uK0XcnRqHGhw="; + }; + linux-aarch64 = { + v = "1"; + url = "https://github.com/avh4/elm-format/releases/download/0.8.8/elm-format-0.8.8-linux-aarch64.tgz"; + sha256 = "sha256-STfNmMG+yh2wXhFGFuxDmVpWY5J5xSw+l0s0JtdSkZ0="; + }; + mac-x64 = { + v = "1"; + url = "https://github.com/avh4/elm-format/releases/download/0.8.8/elm-format-0.8.8-mac-x64.tgz"; + sha256 = "sha256-HNgaT/nveUklH6MK209iGeZhKbvU7p7/l/6MDp18r10="; + }; + mac-arm64 = { + v = "1"; + url = "https://github.com/avh4/elm-format/releases/download/0.8.8/elm-format-0.8.8-mac-arm64.tgz"; + sha256 = "sha256-U5/fLt+zxJbCaCNSrXM9kR+QYh4+kUjJS9Hhcuxlq3w="; + }; + win-x64 = { + v = "1"; + url = "https://github.com/avh4/elm-format/releases/download/0.8.8/elm-format-0.8.8-win-x64.zip"; + sha256 = "sha256-2ssJQEWDVozdlTZZFqJimfOJV3bmHgw93iOorM9guc4="; + }; + }; +}