lightsystemdarkgreen
current commit
260927.42 · (chore): Add arm64 support to multiple manifests (#8554)
{
    "version": "2.0.2",
    "description": "Volta is a hassle-free way to manage your JavaScript command-line tools",
    "homepage": "https://volta.sh/",
    "license": "BSD-2-Clause",
    "notes": [
        "To use volta tab-completions, add following code to your PowerShell PROFILE:",
        "",
        "(& volta completions powershell) | Out-String | Invoke-Expression"
    ],
    "architecture": {
        "64bit": {
            "url": "https://github.com/volta-cli/volta/releases/download/v2.0.2/volta-2.0.2-windows.zip",
            "hash": "d7678a485e2fc9b1a3f7e9da256d8b88a97d7e4c45e63701c4874f6c2a587e0f"
        },
        "arm64": {
            "url": "https://github.com/volta-cli/volta/releases/download/v2.0.2/volta-2.0.2-windows-arm64.zip",
            "hash": "a996918b7a7bf2af9ceffce005208943f4eeaf779757ca73f5dfaa91a0072ad7"
        }
    },
    "installer": {
        "script": [
            "function UpdateExeFile([String] $original, [String] $file, [Switch] $Removal) {",
            "    if (Test-Path \"$persist_dir\\appdata\\bin\\$file\") { # persist new volta shims",
            "        Remove-Item \"$persist_dir\\appdata\\bin\\$file\" -Force",
            "        Copy-Item \"$dir\\$original\" \"$persist_dir\\appdata\\bin\\$file\"",
            "    } else { # or create new shims",
            "        if (!(Test-Path \"$persist_dir\\appdata\\bin\")) {",
            "            New-Item -Path \"$persist_dir\\appdata\\bin\" -ItemType Directory | Out-Null",
            "        }",
            "        Copy-Item \"$dir\\$original\" \"$persist_dir\\appdata\\bin\\$file\"",
            "    }",
            "    if ($Removal) {",
            "        Remove-Item \"$dir\\$original\" -Force",
            "    }",
            "}",
            "@('node', 'npm', 'npx', 'pnpm', 'yarn') | ForEach-Object {",
            "    UpdateExeFile 'volta-shim.exe' \"$_.exe\"",
            "    $content = \"@echo off`n`\"%~dpn0.exe`\" %*\"",
            "    Set-Content \"$persist_dir\\appdata\\bin\\$_.cmd\" $content -Encoding ascii",
            "}",
            "@('volta', 'volta-migrate', 'volta-shim') | ForEach-Object {",
            "    UpdateExeFile \"$_.exe\" \"$_.exe\" -Removal",
            "}"
        ]
    },
    "env_add_path": "appdata\\bin",
    "env_set": {
        "VOLTA_HOME": "$dir\\appdata"
    },
    "persist": "appdata",
    "checkver": {
        "github": "https://github.com/volta-cli/volta"
    },
    "autoupdate": {
        "architecture": {
            "64bit": {
                "url": "https://github.com/volta-cli/volta/releases/download/v$version/volta-$version-windows.zip"
            },
            "arm64": {
                "url": "https://github.com/volta-cli/volta/releases/download/v$version/volta-$version-windows-arm64.zip"
            }
        }
    }
}