diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..7e464ae --- /dev/null +++ b/.editorconfig @@ -0,0 +1,14 @@ +# EditorConfig is awesome: https://editorconfig.org + +# top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file +[*] +end_of_line = lf +insert_final_newline = true +charset = utf-8 + +[*.yaml] +indent_style = space +indent_size = 2 diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index e9364a7..d5b20cf 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -2,7 +2,7 @@ name: build on: push: - pull_request_target: + pull_request: branches: - main diff --git a/.github/workflows/format.yaml b/.github/workflows/format.yaml index ed2bfbc..e9d96ac 100644 --- a/.github/workflows/format.yaml +++ b/.github/workflows/format.yaml @@ -1,12 +1,19 @@ -name: Format +name: format on: [push, pull_request] jobs: - all: - runs-on: ubuntu-latest + rust: + runs-on: ubuntu-22.04 steps: - uses: dtolnay/rust-toolchain@nightly with: components: rustfmt - uses: actions/checkout@v4 - - name: Check format - run: cargo +nightly fmt --all -- --check --verbose \ No newline at end of file + - name: rustfmt + run: cargo +nightly fmt --all -- --check + nix: + runs-on: ubuntu-22.04 + steps: + - uses: cachix/install-nix-action@v31 + - uses: actions/checkout@v4 + - name: alejandra + run: nix shell nixpkgs#alejandra -c alejandra -c . diff --git a/.github/workflows/nix.yaml b/.github/workflows/nix.yaml new file mode 100644 index 0000000..41a5ab8 --- /dev/null +++ b/.github/workflows/nix.yaml @@ -0,0 +1,11 @@ +name: nix build +on: [push, pull_request] +jobs: + all: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + - uses: cachix/install-nix-action@v25 + with: + nix_path: nixpkgs=channel:nixos-unstable + - run: nix-build diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index a75c4f9..b908321 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -25,7 +25,7 @@ on: jobs: publish-init: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 outputs: github-release-id: ${{ steps.init-step.outputs.github-release-id }} steps: diff --git a/.github/workflows/setup-linux.yaml b/.github/workflows/setup-linux.yaml index 1da039b..1a104cf 100644 --- a/.github/workflows/setup-linux.yaml +++ b/.github/workflows/setup-linux.yaml @@ -14,7 +14,7 @@ on: jobs: run-on-linux: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 timeout-minutes: 60 steps: - run: sudo apt-get update diff --git a/.github/workflows/setup-windows.yaml b/.github/workflows/setup-windows.yaml index e71f519..51d2e8a 100644 --- a/.github/workflows/setup-windows.yaml +++ b/.github/workflows/setup-windows.yaml @@ -14,7 +14,7 @@ on: jobs: run-on-windows: - runs-on: windows-latest + runs-on: windows-2022 timeout-minutes: 60 steps: - uses: actions/checkout@v4 @@ -27,7 +27,7 @@ jobs: - uses: dtolnay/rust-toolchain@stable - run: choco install protoc - - run: dotnet tool install --global wix + - run: dotnet tool install --global wix --version 5.0.2 - run: wix extension add -g WixToolset.Util.wixext/5.0.2 - uses: Swatinem/rust-cache@v2 diff --git a/.github/workflows/winget.yaml b/.github/workflows/winget.yaml new file mode 100644 index 0000000..33b4387 --- /dev/null +++ b/.github/workflows/winget.yaml @@ -0,0 +1,27 @@ +name: Publish to WinGet + +on: + release: + types: [published] + +env: + VERSION_REGEX: '^v(\d+)$' + # winget-create will read the following environment variable to access the GitHub token needed for submitting a PR + # See https://aka.ms/winget-create-token + WINGET_CREATE_GITHUB_TOKEN: ${{ secrets.WINGET_TOKEN }} + +jobs: + publish: + runs-on: windows-latest # Action can only run on Windows + steps: + - name: Publish To WinGet + run: | + $release = '${{ toJSON(github.event.release) }}' | ConvertFrom-Json + $wingetRelevantAsset = $release | Select-Object -Property assets | Where-Object { $_.name -like '*.msi' } | Select-Object -First 1 + $regex = [Regex]::New($env:VERSION_REGEX) + $version = $regex.Match($release.tag_name).Groups[1].Value + + $wingetPackage = "Exidex.Gauntlet" + + & curl.exe -JLO https://aka.ms/wingetcreate/latest + & .\wingetcreate.exe update $wingetPackage -s -v $version -u $wingetRelevantAsset.browser_download_url diff --git a/CHANGELOG.md b/CHANGELOG.md index 4af99fe..c747466 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,12 +3,148 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), -and this project doesn't adhere to Semantic Versioning, see [Versioning](./README.md#versioning) +and this project doesn't adhere to Semantic Versioning, see [Versioning](https://gauntlet.sh/docs/information/versioning) For changes in `@project-gauntlet/tools` see [separate CHANGELOG.md](https://github.com/project-gauntlet/tools/blob/main/CHANGELOG.md) ## [Unreleased] +## [21] - 2025-08-16 + +### General + +- When opening `Opened windows` view second item is now focused by default + - Because the window ordering is "most recently focused on the top", second can be considered as an "alternative" application that was focused before the last one +- Implemented native hud notifications on Linux + - Enabled by default + - `linux.native_hud` boolean configuration option is available to disable this +- Restricted JavaScript runtime heap size to 50 MB per plugin + +### Plugins +- It is now possible to programmatically control which item in grid/list is focused + - `` and `` now have new property `focusedItemId` + - If `focusedItemId` property is `undefined` the focus is uncontrolled + - if `focusedItemId` property is `null` the focus is controlled and unset + - if `focusedItemId` property is `string` the focus is controlled and set to item with specified `id` +- Refine nullability of event function arguments on React components + - **BREAKING CHANGE**: Following function properties now return `null` as an argument instead of `undefined` + - ``'s `onAction` + - ``'s `onItemFocusChange` + - ``'s `onItemFocusChange` + - For following function property arguments `undefined` was removed from type signature + - ``'s `onChange` + - ``'s `onChange` + - ``'s `onChange` + - `