From cfd3eff0db9b65b940f150b6d1b5e0b8c87cdec5 Mon Sep 17 00:00:00 2001 From: Justin Ma Date: Sat, 24 May 2025 08:13:41 +0800 Subject: [PATCH 01/61] Make release for Nu 0.104.1 (#53) Make release for Nu 0.104.1 --- meta.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta.json b/meta.json index bff379f65..4236e7eb8 100644 --- a/meta.json +++ b/meta.json @@ -1,6 +1,6 @@ { "name": "nushell", - "version": "0.104.0", + "version": "0.104.1", "revision": "0", "pkgs": { "deb": true, From b1611f9e1e32f96b936264fe442708c52f126ef7 Mon Sep 17 00:00:00 2001 From: Justin Ma Date: Mon, 2 Jun 2025 10:51:10 +0800 Subject: [PATCH 02/61] Update MSI packages' installation tests for the latest nightly version (#55) Update MSI packages' installation tests for the latest nightly version, fixes #52 --- .github/workflows/test-msi.yml | 46 ------------------ .github/workflows/test-winget.yml | 48 ++++--------------- .../0.104.1/Nushell.Nushell.installer.yaml | 37 -------------- .../0.104.1/Nushell.Nushell.locale.en-US.yaml | 32 ------------- .../Nushell/0.104.1/Nushell.Nushell.yaml | 8 ---- tests/common.nu | 8 ++++ tests/test-msi.nu | 12 +++-- tests/winget-install.nu | 32 ++++++++++--- 8 files changed, 51 insertions(+), 172 deletions(-) delete mode 100644 manifests/n/Nushell/Nushell/0.104.1/Nushell.Nushell.installer.yaml delete mode 100644 manifests/n/Nushell/Nushell/0.104.1/Nushell.Nushell.locale.en-US.yaml delete mode 100644 manifests/n/Nushell/Nushell/0.104.1/Nushell.Nushell.yaml diff --git a/.github/workflows/test-msi.yml b/.github/workflows/test-msi.yml index 78a04fa32..45f59f920 100644 --- a/.github/workflows/test-msi.yml +++ b/.github/workflows/test-msi.yml @@ -67,49 +67,3 @@ jobs: --returns summary | to json | save --force test-summary.json ) - # machine-scope: - # name: Install with Machine Scope - - # strategy: - # fail-fast: false - # matrix: - # os: [windows-latest] - - # runs-on: ${{ matrix.os }} - - # steps: - # - uses: actions/checkout@v4 - - # - name: Setup Nu - # uses: hustcer/setup-nu@v3 - # with: - # version: 'nightly' - - # - name: Download MSI - # shell: nu {0} - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # run: | - # const RELEASE_TAG = 'v0.104.1' - # mkdir msi-pkgs; cd msi-pkgs - # let arch = $nu.os-info.arch - # gh release download $RELEASE_TAG --repo nushell/nightly --pattern $"*-($arch)-*.msi" - - # - name: Test MSI Install with Machine Scope - # shell: powershell - # run: | - # # Create a temporary script that will be run with elevation - # @" - # `$ErrorActionPreference = 'Stop' - # `$msi = Get-ChildItem -Path ./msi-pkgs -Filter *.msi | Select-Object -First 1 - # Start-Process msiexec.exe -ArgumentList "/i `$(`$msi.FullName) ALLUSERS=1 /qn /norestart /L*V install.txt" -Wait -NoNewWindow -Verb RunAs - # "@ | Out-File -FilePath elevate-install.ps1 - - # # Run the script with elevation - # Start-Process powershell.exe -ArgumentList "-File elevate-install.ps1" -Verb RunAs -Wait - - # - name: Try Running Nu - # shell: nu {0} - # run: | - # # ^'C:\Program Files\nu\bin\nu.exe' -c 'version' - # ^'C:\Users\runneradmin\AppData\Local\Programs\nu\bin\nu.exe' -c 'version' diff --git a/.github/workflows/test-winget.yml b/.github/workflows/test-winget.yml index b050c7565..e9d379ebf 100644 --- a/.github/workflows/test-winget.yml +++ b/.github/workflows/test-winget.yml @@ -56,11 +56,16 @@ jobs: with: version: 'nightly' + - name: Install komac + run: | + winget install komac --accept-source-agreements --accept-package-agreements --disable-interactivity + - name: Test Winget Install with Default Scope shell: nu {0} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | + ls C:\Users\runneradmin\AppData\Local\Programs\Komac\bin\ | print nu tests/winget-install.nu user-scope: @@ -85,47 +90,14 @@ jobs: with: version: 'nightly' + - name: Install komac + run: | + winget install komac --accept-source-agreements --accept-package-agreements --disable-interactivity + - name: Test Winget Install with User Scope shell: nu {0} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | + ls C:\Users\runneradmin\AppData\Local\Programs\Komac\bin\ | print nu tests/winget-install.nu --scope user - - # machine-scope: - # name: Install with Machine Scope - - # strategy: - # fail-fast: false - # matrix: - # os: [windows-latest, windows-2025] - - # runs-on: ${{ matrix.os }} - - # steps: - # - uses: actions/checkout@v4 - - # - name: Install winget - # if: ${{ matrix.os == 'windows-latest' }} - # uses: Cyberboss/install-winget@v1 - - # - name: Setup Nu - # uses: hustcer/setup-nu@v3 - # with: - # version: 'nightly' - - # - name: Test Winget Install with Machine Scope - # shell: powershell - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # run: | - # winget settings --enable LocalManifestFiles - # Start-Process -FilePath "powershell.exe" -Verb RunAs -ArgumentList @( - # "-Command", - # "'winget install --manifest manifests/n/Nushell/Nushell/0.104.1 --scope machine --accept-source-agreements --accept-package-agreements'" - # ) - - # - name: Try Running Nu - # shell: nu {0} - # run: | - # ^'C:\Program Files\nu\bin\nu.exe' -c 'version' diff --git a/manifests/n/Nushell/Nushell/0.104.1/Nushell.Nushell.installer.yaml b/manifests/n/Nushell/Nushell/0.104.1/Nushell.Nushell.installer.yaml deleted file mode 100644 index cedffead2..000000000 --- a/manifests/n/Nushell/Nushell/0.104.1/Nushell.Nushell.installer.yaml +++ /dev/null @@ -1,37 +0,0 @@ -# Created with WinGet Releaser using komac v2.11.2 -# yaml-language-server: $schema=https://aka.ms/winget-manifest.installer.1.9.0.schema.json - -PackageIdentifier: Nushell.Nushell -PackageVersion: 0.104.1 -InstallerLocale: en-US -InstallerType: wix -Scope: user -InstallModes: -- interactive -- silent -- silentWithProgress -UpgradeBehavior: install -Commands: -- nu -ReleaseDate: 2025-05-15 -InstallationMetadata: - DefaultInstallLocation: nu -Installers: -- Architecture: x64 - InstallerUrl: https://github.com/nushell/nightly/releases/download/v0.104.1/nu-0.104.1-x86_64-pc-windows-msvc.msi - InstallerSha256: EF8FDC307EF9BFDC1D6AC50E2C5EF5CF4D232B0D55CC59F27CD73B753091149A - ProductCode: '{E2BC2C5B-BA10-478F-8554-FAE782BA3CBA}' - AppsAndFeaturesEntries: - - DisplayName: Nushell - ProductCode: '{E2BC2C5B-BA10-478F-8554-FAE782BA3CBA}' - UpgradeCode: '{82D756D2-19FA-4F09-B10F-64942E89F364}' -- Architecture: arm64 - InstallerUrl: https://github.com/nushell/nightly/releases/download/v0.104.1/nu-0.104.1-aarch64-pc-windows-msvc.msi - InstallerSha256: 95A9C9BCAB8FEC7E763F3C42380150598C9DB1511746DEF81187D17EDBD4C71B - ProductCode: '{22E058B2-6A33-43F2-8D25-203711F9BF50}' - AppsAndFeaturesEntries: - - DisplayName: Nushell - ProductCode: '{22E058B2-6A33-43F2-8D25-203711F9BF50}' - UpgradeCode: '{82D756D2-19FA-4F09-B10F-64942E89F364}' -ManifestType: installer -ManifestVersion: 1.9.0 diff --git a/manifests/n/Nushell/Nushell/0.104.1/Nushell.Nushell.locale.en-US.yaml b/manifests/n/Nushell/Nushell/0.104.1/Nushell.Nushell.locale.en-US.yaml deleted file mode 100644 index 331279c75..000000000 --- a/manifests/n/Nushell/Nushell/0.104.1/Nushell.Nushell.locale.en-US.yaml +++ /dev/null @@ -1,32 +0,0 @@ -# Created with WinGet Releaser using komac v2.11.2 -# yaml-language-server: $schema=https://aka.ms/winget-manifest.defaultLocale.1.9.0.schema.json - -PackageIdentifier: Nushell.Nushell -PackageVersion: 0.104.1 -PackageLocale: en-US -Publisher: The Nushell Project Developers -PublisherUrl: https://www.nushell.sh/ -PublisherSupportUrl: https://github.com/nushell/nushell/issues -Author: The Nu Project Contributors -PackageName: nu -PackageUrl: https://github.com/nushell/nushell -License: MIT -LicenseUrl: https://github.com/nushell/nushell/blob/HEAD/LICENSE -Copyright: Copyright (c) 2019 - 2021 Yehuda Katz, Jonathan Turner -CopyrightUrl: https://raw.githubusercontent.com/nushell/nushell/main/LICENSE -ShortDescription: A new type of shell -Description: |- - Hello, and welcome to the Nushell project. - The goal of this project is to take the Unix philosophy of shells, where pipes connect simple commands together, and bring it to the modern style of development. - Nu takes cues from a lot of familiar territory, traditional shells like bash, object based shells like PowerShell, functional programming, systems programming, and more. -Moniker: nushell -Tags: -- rust -- shell -ReleaseNotes: |- - This is the 0.104.0 release of Nushell. You can learn more about this release here: https://www.nushell.sh/blog/2025-04-29-nushell_0_104_0.html - For convenience, we are providing full builds for Windows, Linux, and macOS. Be sure you have the requirements to enable all capabilities: https://www.nushell.sh/book/installation.html#dependencies - This release was made possible by PR contributions from @0x4D5352, @132ikl, @app/dependabot, @AucaCoyan, @ayax79, @Bahex, @blindFS, @cosineblast, @cptpiepmatz, @fdncred, @fennewald, @g2p, @hfrentzel, @hustcer, @IanManske, @jjflash95, @kidrigger, @lazenga, @LoicRiegel, @migraine-user, @MMesch, @mokurin000, @Mrfiregem, @mztikk, @NotTheDr01ds, @pyz4, @scarlet-storm, @sebasnallar, @sgvictorino, @sholderbach, @SkillFlame, @suimong, @Tyarel8, @vansh284, @whiter001, @WindSoilder, @ysthakur, @zhiburt -ReleaseNotesUrl: https://github.com/nushell/nightly/releases/tag/v0.104.1 -ManifestType: defaultLocale -ManifestVersion: 1.9.0 diff --git a/manifests/n/Nushell/Nushell/0.104.1/Nushell.Nushell.yaml b/manifests/n/Nushell/Nushell/0.104.1/Nushell.Nushell.yaml deleted file mode 100644 index 411858959..000000000 --- a/manifests/n/Nushell/Nushell/0.104.1/Nushell.Nushell.yaml +++ /dev/null @@ -1,8 +0,0 @@ -# Created with WinGet Releaser using komac v2.11.2 -# yaml-language-server: $schema=https://aka.ms/winget-manifest.version.1.9.0.schema.json - -PackageIdentifier: Nushell.Nushell -PackageVersion: 0.104.1 -DefaultLocale: en-US -ManifestType: version -ManifestVersion: 1.9.0 diff --git a/tests/common.nu b/tests/common.nu index c1a73a3fc..a7a84e526 100644 --- a/tests/common.nu +++ b/tests/common.nu @@ -88,3 +88,11 @@ export def check-version-match [version_expected: string, install_dir = $USER_IN assert equal ($version_expected | str contains $version) true print $'(ansi g)Installed Nu of the specified version: ($version)(ansi reset)' } + +export def get-latest-tag [] { + http get https://api.github.com/repos/nushell/nightly/releases + | sort-by -r created_at + | where tag_name =~ nightly + | get tag_name?.0? + | default '' +} diff --git a/tests/test-msi.nu b/tests/test-msi.nu index 64af20f49..ddfd4aae8 100644 --- a/tests/test-msi.nu +++ b/tests/test-msi.nu @@ -1,20 +1,20 @@ use std/assert use std/testing * -use common.nu [check-user-install, check-version-match] +use common.nu [check-user-install, check-version-match, get-latest-tag] -const RELEASE_TAG = 'v0.104.1' @before-all def setup [] { mkdir msi-pkgs cd msi-pkgs let arch = $nu.os-info.arch - gh release download $RELEASE_TAG --repo nushell/nightly --pattern $"*-($arch)-*.msi" + let release_tag = get-latest-tag + gh release download $release_tag --repo nushell/nightly --pattern $"*-($arch)-*.msi" let msi = ls | where name =~ msi | get name.0 print $'MSI File: ($msi)' let install_dir = $'($nu.home-path)\AppData\Local\Programs\nu' - { msi: $msi, install_dir: $install_dir } + { msi: $msi, install_dir: $install_dir, release_tag: $release_tag } } @test @@ -30,6 +30,7 @@ def 'msi-install:MSI should exists' [] { def 'msi-install:MSI should install successfully for per-user' [] { let pkg = $in.msi let install_dir = $in.install_dir + let release_tag = $in.release_tag cd msi-pkgs @@ -38,5 +39,6 @@ def 'msi-install:MSI should install successfully for per-user' [] { msiexec /i $pkg MSIINSTALLPERUSER=1 /quiet /qn /L*V install.txt # print (open -r install.txt) check-user-install $install_dir - check-version-match $RELEASE_TAG $install_dir + check-version-match $release_tag $install_dir } + diff --git a/tests/winget-install.nu b/tests/winget-install.nu index ec9791af8..668df6626 100644 --- a/tests/winget-install.nu +++ b/tests/winget-install.nu @@ -1,19 +1,39 @@ use std/assert -use common.nu [check-user-install, check-version-match] +use common.nu [check-user-install, check-version-match, get-latest-tag] -const VERSION = '0.104.1' +const KOMAC = 'C:\Users\runneradmin\AppData\Local\Programs\Komac\bin\komac.exe' def main [--scope: string] { - + prepare-manifest let install_dir = $'($nu.home-path)\AppData\Local\Programs\nu' let scope_tip = if $scope in [user, machine] { $'($scope) scope' } else { $'default scope' } print $'Using winget to test MSI (ansi g)($scope_tip)(ansi reset) installation' - let args = [--accept-source-agreements --accept-package-agreements --ignore-security-hash --silent] + let args = [ + --silent + --ignore-security-hash + --disable-interactivity + --accept-source-agreements + --accept-package-agreements + ] + let version = get-latest-tag | split row + | first let scope_arg = if $scope in [user, machine] { [--scope $scope] } else { [] } winget settings --enable LocalManifestFiles winget settings --enable InstallerHashOverride - winget install --manifest manifests\n\Nushell\Nushell\($VERSION) ...$args ...$scope_arg + winget install --manifest $'manifests\n\Nushell\Nushell\($version)\' ...$args ...$scope_arg check-user-install $install_dir - check-version-match $VERSION $install_dir + check-version-match $version $install_dir +} + +def prepare-manifest [] { + let version = get-latest-tag | split row + | first + let urls = get-download-url + ^$KOMAC update Nushell.Nushell --dry-run -v $version -u ...$urls -o (pwd) +} + +def get-download-url [] { + http get https://api.github.com/repos/nushell/nightly/releases + | sort-by -r created_at + | where tag_name =~ nightly | get assets.0.browser_download_url + | where $it =~ 'msi' } From 9193c6d6a52b9b3c7bdce7cbed65787a2deefc46 Mon Sep 17 00:00:00 2001 From: hustcer Date: Mon, 2 Jun 2025 11:03:45 +0800 Subject: [PATCH 03/61] Update MSI installation test schedule --- .github/workflows/test-msi.yml | 2 +- .github/workflows/test-winget.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-msi.yml b/.github/workflows/test-msi.yml index 45f59f920..d077b61ae 100644 --- a/.github/workflows/test-msi.yml +++ b/.github/workflows/test-msi.yml @@ -21,7 +21,7 @@ on: - '**.md' - 'docs/**' schedule: - - cron: '0 0 * * *' # Run every morning at 0am UTC + - cron: '0 2 * * *' # Run every morning at 2am UTC permissions: contents: read diff --git a/.github/workflows/test-winget.yml b/.github/workflows/test-winget.yml index e9d379ebf..7300c1dfe 100644 --- a/.github/workflows/test-winget.yml +++ b/.github/workflows/test-winget.yml @@ -21,7 +21,7 @@ on: - '**.md' - 'docs/**' schedule: - - cron: '0 0 * * *' # Run every morning at 0am UTC + - cron: '0 2 * * *' # Run every morning at 2am UTC permissions: contents: read From 22f5b23809a43dd3fd367fb9419d064b652bd915 Mon Sep 17 00:00:00 2001 From: Justin Ma Date: Mon, 2 Jun 2025 13:14:34 +0800 Subject: [PATCH 04/61] Improve winget installation tests for latest nightly release (#56) Improve winget installation tests for latest nightly release --- .github/workflows/test-msi.yml | 2 +- .github/workflows/test-winget.yml | 12 ++---------- tests/winget-install.nu | 23 ++++++++++++++--------- 3 files changed, 17 insertions(+), 20 deletions(-) diff --git a/.github/workflows/test-msi.yml b/.github/workflows/test-msi.yml index d077b61ae..b15ec7876 100644 --- a/.github/workflows/test-msi.yml +++ b/.github/workflows/test-msi.yml @@ -33,7 +33,7 @@ jobs: strategy: fail-fast: false matrix: - os: [windows-2019, windows-latest, windows-2025, windows-11-arm] + os: [windows-latest, windows-2025, windows-11-arm] runs-on: ${{ matrix.os }} diff --git a/.github/workflows/test-winget.yml b/.github/workflows/test-winget.yml index 7300c1dfe..f3c5b71c4 100644 --- a/.github/workflows/test-winget.yml +++ b/.github/workflows/test-winget.yml @@ -56,16 +56,12 @@ jobs: with: version: 'nightly' - - name: Install komac - run: | - winget install komac --accept-source-agreements --accept-package-agreements --disable-interactivity - - name: Test Winget Install with Default Scope shell: nu {0} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - ls C:\Users\runneradmin\AppData\Local\Programs\Komac\bin\ | print + winget install komac --accept-source-agreements --accept-package-agreements --disable-interactivity nu tests/winget-install.nu user-scope: @@ -90,14 +86,10 @@ jobs: with: version: 'nightly' - - name: Install komac - run: | - winget install komac --accept-source-agreements --accept-package-agreements --disable-interactivity - - name: Test Winget Install with User Scope shell: nu {0} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - ls C:\Users\runneradmin\AppData\Local\Programs\Komac\bin\ | print + winget install komac --accept-source-agreements --accept-package-agreements --disable-interactivity nu tests/winget-install.nu --scope user diff --git a/tests/winget-install.nu b/tests/winget-install.nu index 668df6626..1b95ac4dc 100644 --- a/tests/winget-install.nu +++ b/tests/winget-install.nu @@ -1,26 +1,28 @@ use std/assert +use std/util ['path add'] use common.nu [check-user-install, check-version-match, get-latest-tag] -const KOMAC = 'C:\Users\runneradmin\AppData\Local\Programs\Komac\bin\komac.exe' +const KOMAC_PATH = $'($nu.home-path)\AppData\Local\Programs\Komac\bin\' -def main [--scope: string] { - prepare-manifest - let install_dir = $'($nu.home-path)\AppData\Local\Programs\nu' - let scope_tip = if $scope in [user, machine] { $'($scope) scope' } else { $'default scope' } - print $'Using winget to test MSI (ansi g)($scope_tip)(ansi reset) installation' - let args = [ +const WINGET_ARGS = [ --silent --ignore-security-hash --disable-interactivity --accept-source-agreements --accept-package-agreements ] + +def main [--scope: string] { + prepare-manifest + let install_dir = $'($nu.home-path)\AppData\Local\Programs\nu' + let scope_tip = if $scope in [user, machine] { $'($scope) scope' } else { $'default scope' } + print $'Using winget to test MSI (ansi g)($scope_tip)(ansi reset) installation' let version = get-latest-tag | split row + | first let scope_arg = if $scope in [user, machine] { [--scope $scope] } else { [] } winget settings --enable LocalManifestFiles winget settings --enable InstallerHashOverride - winget install --manifest $'manifests\n\Nushell\Nushell\($version)\' ...$args ...$scope_arg + winget install --manifest $'manifests\n\Nushell\Nushell\($version)\' ...$WINGET_ARGS ...$scope_arg check-user-install $install_dir check-version-match $version $install_dir } @@ -28,7 +30,10 @@ def main [--scope: string] { def prepare-manifest [] { let version = get-latest-tag | split row + | first let urls = get-download-url - ^$KOMAC update Nushell.Nushell --dry-run -v $version -u ...$urls -o (pwd) + path add $KOMAC_PATH + ls $KOMAC_PATH | print + komac --version | print + komac update Nushell.Nushell --dry-run -v $version -u ...$urls -o (pwd) } def get-download-url [] { From 9852118bfd79c39bb484ec8ccaa597cac8076a25 Mon Sep 17 00:00:00 2001 From: hustcer Date: Mon, 2 Jun 2025 13:18:05 +0800 Subject: [PATCH 05/61] [ci skip] --- tests/winget-install.nu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/winget-install.nu b/tests/winget-install.nu index 1b95ac4dc..e58a5194d 100644 --- a/tests/winget-install.nu +++ b/tests/winget-install.nu @@ -33,7 +33,7 @@ def prepare-manifest [] { path add $KOMAC_PATH ls $KOMAC_PATH | print komac --version | print - komac update Nushell.Nushell --dry-run -v $version -u ...$urls -o (pwd) + komac update Nushell.Nushell --dry-run -v $version -u ...$urls -o (pwd) } def get-download-url [] { From 57b7650f3f13d211fd37fe80c67c307dfa5e4d71 Mon Sep 17 00:00:00 2001 From: "Rong \"Mantle\" Bao" Date: Wed, 4 Jun 2025 20:43:24 +0800 Subject: [PATCH 06/61] Adapt cmdline assert for nushell/nushell#15881 (#57) --- tests/common.nu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/common.nu b/tests/common.nu index a7a84e526..e488ed3d4 100644 --- a/tests/common.nu +++ b/tests/common.nu @@ -74,7 +74,7 @@ export def check-common-install [install_dir = $USER_INSTALL_DIR: string] { assert greater ($contents | length) 3 assert equal ($PROFILE | path exists) true assert equal ($profile | get profiles.0.icon | path exists) true - assert equal ($profile | get profiles.0.commandline | path exists) true + assert equal ($profile | get profiles.0.commandline | str trim --char '"' | path exists) true print $'(ansi g)Windows Terminal Profile setup successfully...(ansi reset)' assert equal ($BINS | all {|it| $it in ($bins | get name) }) true print $'(ansi g)Nu binaries installed successfully...(ansi reset)' From 6a8210d6eaef35fdd076a6b58b2c8e4f0b2a62d4 Mon Sep 17 00:00:00 2001 From: hustcer Date: Tue, 10 Jun 2025 20:19:35 +0800 Subject: [PATCH 07/61] chore: Show /etc/shells after installation --- nu/tests.nu | 1 + 1 file changed, 1 insertion(+) diff --git a/nu/tests.nu b/nu/tests.nu index 1d160f57a..578c9a3c2 100644 --- a/nu/tests.nu +++ b/nu/tests.nu @@ -100,6 +100,7 @@ def "test Nu version is correct" [] { } def "test nu is added as a shell" [] { + cat /etc/shells | print let shell = cat /etc/shells | lines | where ($it | str contains "nu") From 92fa325e676d6a3bd9eae8d5201f40d0b823cc0f Mon Sep 17 00:00:00 2001 From: hustcer Date: Tue, 10 Jun 2025 20:37:27 +0800 Subject: [PATCH 08/61] chore: Test nu is not the only shell --- nu/tests.nu | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/nu/tests.nu b/nu/tests.nu index 578c9a3c2..0c6c8216e 100644 --- a/nu/tests.nu +++ b/nu/tests.nu @@ -109,6 +109,15 @@ def "test nu is added as a shell" [] { assert str contains $shell "/nu" } +def 'test nu is not the only shell' [] { + let shells = cat /etc/shells + | lines + | where not ($it | str contains "nu") + | length + + assert greater $shells 1 +} + def "test main plugins are installed" [] { let plugins = (plugin list) | get name From 657dc5a38038885a1e6bd80d73cbc628c445e446 Mon Sep 17 00:00:00 2001 From: Justin Ma Date: Wed, 11 Jun 2025 07:45:12 +0800 Subject: [PATCH 09/61] Add just bump task to bump version and create tag automatically (#59) Add just bump task to bump version and create tag automatically, fixes #54 --- .github/workflows/publish.yml | 8 +++++--- Justfile | 5 +++++ meta.json | 6 +++--- nu/bump-ver.nu | 38 +++++++++++++++++++++++++++++++++++ nu/release.nu | 6 ++++-- 5 files changed, 55 insertions(+), 8 deletions(-) create mode 100644 nu/bump-ver.nu diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 36c55d28e..2c6eddc7a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -50,6 +50,7 @@ jobs: run: | use ${{ github.workspace }}/nu/release.nu * version | print + let version = open meta.json | get version echo $env.SIGNING_KEY o> key.gpg # $env | print let arch = match $env.RUNNER_ARCH { @@ -57,7 +58,7 @@ jobs: 'ARM64' => 'arm64', _ => 'amd64' } - fetch release $arch + fetch release $arch $version publish pkg $arch --create-release rm key.gpg @@ -93,10 +94,11 @@ jobs: run: | use ${{ github.workspace }}/nu/release.nu * version | print + let version = open meta.json | get version echo $env.SIGNING_KEY o> key.gpg - fetch release riscv64 + fetch release riscv64 $version publish pkg riscv64 --create-release - fetch release loongarch64 + fetch release loongarch64 $version publish pkg loongarch64 --create-release rm key.gpg diff --git a/Justfile b/Justfile index e6e0eb690..f7eaffb78 100644 --- a/Justfile +++ b/Justfile @@ -35,6 +35,11 @@ _query_plugin := if os_family() == 'windows' { 'nu_plugin_query.exe' } else { 'n default: @just --list --list-prefix "··· " +# Bump Nushell version for supported Linux distributions +bump *OPTIONS: + @overlay use {{ join(NU_DISTRO_PATH, 'nu', 'bump-ver.nu') }}; \ + bump-version {{OPTIONS}} + # Release a new version for Nushell release *OPTIONS: @overlay use {{ join(NU_DISTRO_PATH, 'nu', 'release.nu') }}; \ diff --git a/meta.json b/meta.json index 4236e7eb8..af4545f12 100644 --- a/meta.json +++ b/meta.json @@ -1,7 +1,7 @@ { "name": "nushell", - "version": "0.104.1", - "revision": "0", + "version": "0.105.1", + "revision": 0, "pkgs": { "deb": true, "rpm": true, @@ -13,4 +13,4 @@ "github": "https://github.com/nushell/nushell", "home": "https://www.nushell.sh", "description": "A new type of shell." -} +} \ No newline at end of file diff --git a/nu/bump-ver.nu b/nu/bump-ver.nu new file mode 100644 index 000000000..c344db220 --- /dev/null +++ b/nu/bump-ver.nu @@ -0,0 +1,38 @@ +#!/usr/bin/env nu + +# TODO: +# - [√] Check if the tag of the specified version already exists in local git repository + +export def bump-version [ + version: string, + --revision: int = 0, # Revision number for the version, default is 0 +] { + if not ($version | str replace -ar '^(\d+\.)?(\d+\.)?(\*|\d+)$' '' | is-empty) { + print $'(ansi r)Invalid version number: ($version)(ansi reset)' + exit 7 + } + + if (has-ref $'($version)-($revision)') { + print $'(ansi r)The tag of the specified version already exists: ($version)(ansi reset)' + exit 5 + } + + open meta.json + | update version $version + | update revision $revision + | save -f meta.json + git commit -am $'chore: bump version to ($version) of revision ($revision)' + git tag -am $'chore: bump version to ($version)' $'($version)-($revision)' + git push --follow-tags +} + +# Check if a git repo has the specified ref: could be a branch or tag, etc. +export def has-ref [ + ref: string # The git ref to check +] { + let checkRepo = (do -i { git rev-parse --is-inside-work-tree } | complete) + if not ($checkRepo.stdout =~ 'true') { return false } + # Brackets were required here, or error will occur + let parse = (do -i { git rev-parse --verify -q $ref } | complete) + if ($parse.stdout | is-empty) { false } else { true } +} diff --git a/nu/release.nu b/nu/release.nu index 8d630643c..29f61a12c 100644 --- a/nu/release.nu +++ b/nu/release.nu @@ -24,7 +24,8 @@ const RELEASE_QUERY_URL = 'https://api.github.com/repos/nushell/nushell/releases # Fetch the latest Nushell release package from GitHub export def 'fetch release' [ - arch: string, # The target architecture, e.g. amd64 & arm64 + arch: string, # The target architecture, e.g. amd64 & arm64 + version: string, # The Nushell version to fetch, e.g. 0.105.0 ] { const ARCH_MAP = { amd64: 'x86_64-unknown-linux-musl', @@ -41,7 +42,8 @@ export def 'fetch release' [ ] let assets = http get -H $BASE_HEADER $RELEASE_QUERY_URL | sort-by -r created_at - | select name created_at assets + | select name tag_name created_at assets + | where tag_name =~ $version | get 0 | get assets.browser_download_url let download_url = $assets | where $it =~ ($ARCH_MAP | get $arch) | get 0 From bc834fbbbae931071e0edbba09b11f83cc704cff Mon Sep 17 00:00:00 2001 From: hustcer Date: Wed, 11 Jun 2025 07:45:41 +0800 Subject: [PATCH 10/61] chore: bump version to 0.105.0 of revision 0 --- meta.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta.json b/meta.json index af4545f12..85d7ac7eb 100644 --- a/meta.json +++ b/meta.json @@ -1,6 +1,6 @@ { "name": "nushell", - "version": "0.105.1", + "version": "0.105.0", "revision": 0, "pkgs": { "deb": true, From 7ea886a97b1ee577eae11ff1f3b2ce9d4db7b998 Mon Sep 17 00:00:00 2001 From: hustcer Date: Wed, 11 Jun 2025 07:58:00 +0800 Subject: [PATCH 11/61] chore: bump version to 0.105.1 of revision 0 --- meta.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta.json b/meta.json index 85d7ac7eb..af4545f12 100644 --- a/meta.json +++ b/meta.json @@ -1,6 +1,6 @@ { "name": "nushell", - "version": "0.105.0", + "version": "0.105.1", "revision": 0, "pkgs": { "deb": true, From 67cdea80af32f856111d98acf7cb1db81f34ce1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20H=E1=BB=93ng=20Qu=C3=A2n?= Date: Wed, 11 Jun 2025 12:38:30 +0700 Subject: [PATCH 12/61] Fix: Maintainer script make /etc/shells empty (#60) Fix #58 --- nu/tests.nu | 14 +++++++++----- scripts/post-install.nu | 14 +++++++++++--- scripts/pre-remove.nu | 6 ++++-- 3 files changed, 24 insertions(+), 10 deletions(-) diff --git a/nu/tests.nu b/nu/tests.nu index 0c6c8216e..2cadf4c5e 100644 --- a/nu/tests.nu +++ b/nu/tests.nu @@ -72,9 +72,13 @@ def run_test [test: record]: nothing -> record> /etc/shells + let content = open /etc/shells + const nu_bin = '/usr/bin/nu' + if ($content | str contains $nu_bin) { + return } + mut $new_line = $"($nu_bin)\n" + # Handle edge case when the content doesn't have ending newline, + # blindly appending the $new_line will end up writing to the same line. + if not ($content | str ends-with "\n") { + $new_line = "\n" ++ $new_line + } + echo $new_line o>> /etc/shells } def main [] { diff --git a/scripts/pre-remove.nu b/scripts/pre-remove.nu index 862469d56..24c32a7d5 100755 --- a/scripts/pre-remove.nu +++ b/scripts/pre-remove.nu @@ -5,11 +5,13 @@ # Remove /usr/bin/nu from /etc/shells def 'remove-nu-from-shells' [] { - open /etc/shells + let new_content = open /etc/shells | lines | where $it !~ '/usr/bin/nu' | str join "\n" - | save -rf /etc/shells + # Keep a new line at the end of file to prevent other packages from making mistake + # when modifying this file. + $new_content ++ "\n" | save -rf /etc/shells } def main [] { From d0be44639a38dc7bb49dd2e140ac89cd9b0b0131 Mon Sep 17 00:00:00 2001 From: hustcer Date: Wed, 11 Jun 2025 13:41:15 +0800 Subject: [PATCH 13/61] chore: bump version to 0.105.0 of revision 1 --- meta.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta.json b/meta.json index af4545f12..6fa51f956 100644 --- a/meta.json +++ b/meta.json @@ -1,7 +1,7 @@ { "name": "nushell", - "version": "0.105.1", - "revision": 0, + "version": "0.105.0", + "revision": 1, "pkgs": { "deb": true, "rpm": true, From 4f3ae7f04266cfd1461ea8de008ff2ab5eab9401 Mon Sep 17 00:00:00 2001 From: hustcer Date: Wed, 11 Jun 2025 13:42:55 +0800 Subject: [PATCH 14/61] chore: bump version to 0.105.1 of revision 1 --- meta.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta.json b/meta.json index 6fa51f956..64d9f6548 100644 --- a/meta.json +++ b/meta.json @@ -1,6 +1,6 @@ { "name": "nushell", - "version": "0.105.0", + "version": "0.105.1", "revision": 1, "pkgs": { "deb": true, From 6e7ae819f68ab5d1fcb330c8c06d4a472ba08f07 Mon Sep 17 00:00:00 2001 From: hustcer Date: Wed, 11 Jun 2025 14:31:20 +0800 Subject: [PATCH 15/61] chore: Update NU_VERSION for tests and fix some typos --- cspell.yml | 10 ++++++++++ nu/tests.nu | 11 +++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/cspell.yml b/cspell.yml index c80e8db00..54a45de7e 100644 --- a/cspell.yml +++ b/cspell.yml @@ -11,13 +11,16 @@ words: - dpkg - hkcu - hklm +- nvim - maint - rsort - cnqoj - ECODE +- KOMAC - riscv - gstat - loong +- keymap - DISTRO - endfor - trixie @@ -30,6 +33,7 @@ words: - nutest - winget - gpgkey +- autocmd - debsign - msiexec - dearmor @@ -38,6 +42,7 @@ words: - Gemfury - hustcer - rsbuild +- APPNAME - ALLUSERS - modeline - gpgcheck @@ -45,6 +50,7 @@ words: - lefthook - linewise - deepseek +- lspconfig - Cyberboss - softprops - noconfirm @@ -58,5 +64,9 @@ words: - goreleaser - rockylinux - Infinigence +- autoloaded +- Autocommands +- LOCALAPPDATA - MSIINSTALLPERUSER ignorePaths: +- nvim/init.lua diff --git a/nu/tests.nu b/nu/tests.nu index 2cadf4c5e..804d9e3e0 100644 --- a/nu/tests.nu +++ b/nu/tests.nu @@ -1,13 +1,8 @@ #!/usr/bin/env nu -# Description: -# This script is used to test the Docker image of termix-nu. -# Usage: -# Change to the directory where the Dockerfile is located and run: -# docker run -it --rm -v $"(pwd):/work" hustcer/termix:latest-alpine /work/tests/test-docker.nu use std assert -const NU_VERSION = '0.104.0' +const NU_VERSION = '0.105.0' def main [] { let test_plan = ( @@ -85,7 +80,7 @@ def format_error [error: string] { | str replace --all --regex " +" " " } -def "test bin installed correctely" [] { +def "test bin installed correctly" [] { const paths = [ /usr/bin/nu, /usr/libexec/nushell/nu_plugin_inc, @@ -132,7 +127,7 @@ def "test main plugins are installed" [] { assert ("query" in $plugins) } -def "test config initialised" [] { +def "test config initialized" [] { let files = ls ~/.config/nushell | select name size | where name ends-with '.nu' From 1bfe626eca09a7238333fb13be9d52de05607d99 Mon Sep 17 00:00:00 2001 From: Justin Ma Date: Tue, 17 Jun 2025 22:13:41 +0800 Subject: [PATCH 16/61] feat: Add Nu RPM installation tests for more distributions (#61) feat: Add Nu RPM installation test for more distributions --- .github/workflows/test.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cbd76f1d3..800643305 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -50,10 +50,13 @@ jobs: - fedora:39 - rockylinux:9 - rockylinux:8 + - redhat/ubi10:latest - redhat/ubi9:latest - redhat/ubi8:latest - - almalinux:latest + # - almalinux:10 + - almalinux:9 - almalinux:8 + - openeuler/openeuler:25.03 - openeuler/openeuler:latest - openeuler/openeuler:22.03-lts runs-on: ${{ matrix.os }} From 662c06112de5128df2798eea7d20d4d3d51f1000 Mon Sep 17 00:00:00 2001 From: Justin Ma Date: Sun, 22 Jun 2025 18:24:51 +0800 Subject: [PATCH 17/61] Add new updated manifests for 0.105.0 and 0.105.1 (#62) Add new updated manifests for 0.105.0 and 0.105.1 --- .../0.105.0/Nushell.Nushell.installer.yaml | 64 +++++++++++++++++++ .../0.105.0/Nushell.Nushell.locale.en-US.yaml | 32 ++++++++++ .../Nushell/0.105.0/Nushell.Nushell.yaml | 8 +++ .../0.105.1/Nushell.Nushell.installer.yaml | 64 +++++++++++++++++++ .../0.105.1/Nushell.Nushell.locale.en-US.yaml | 32 ++++++++++ .../Nushell/0.105.1/Nushell.Nushell.yaml | 8 +++ nu/rewinged.nu | 7 ++ 7 files changed, 215 insertions(+) create mode 100644 manifests/n/Nushell/Nushell/0.105.0/Nushell.Nushell.installer.yaml create mode 100644 manifests/n/Nushell/Nushell/0.105.0/Nushell.Nushell.locale.en-US.yaml create mode 100644 manifests/n/Nushell/Nushell/0.105.0/Nushell.Nushell.yaml create mode 100644 manifests/n/Nushell/Nushell/0.105.1/Nushell.Nushell.installer.yaml create mode 100644 manifests/n/Nushell/Nushell/0.105.1/Nushell.Nushell.locale.en-US.yaml create mode 100644 manifests/n/Nushell/Nushell/0.105.1/Nushell.Nushell.yaml create mode 100644 nu/rewinged.nu diff --git a/manifests/n/Nushell/Nushell/0.105.0/Nushell.Nushell.installer.yaml b/manifests/n/Nushell/Nushell/0.105.0/Nushell.Nushell.installer.yaml new file mode 100644 index 000000000..73487131c --- /dev/null +++ b/manifests/n/Nushell/Nushell/0.105.0/Nushell.Nushell.installer.yaml @@ -0,0 +1,64 @@ +# Created with WinGet Releaser using komac v2.11.2 +# yaml-language-server: $schema=https://aka.ms/winget-manifest.installer.1.10.0.schema.json + +PackageIdentifier: Nushell.Nushell +PackageVersion: 0.105.0 +InstallerLocale: en-US +InstallerType: wix +InstallModes: +- interactive +- silent +- silentWithProgress +UpgradeBehavior: install +Commands: +- nu +ReleaseDate: 2025-06-10 +InstallationMetadata: + DefaultInstallLocation: nu +Installers: +- Architecture: x64 + Scope: user + InstallerSwitches: + Custom: ALLUSERS=2 MSIINSTALLPERUSER=1 + InstallerUrl: https://github.com/nushell/nushell/releases/download/0.105.0/nu-0.105.0-x86_64-pc-windows-msvc.msi + InstallerSha256: 0580682DC237E7919347666274BE65377E62115863100341DEC92FEF8E018B2E + ProductCode: '{E5A818C7-FD84-4011-B147-2ADE34D0F940}' + AppsAndFeaturesEntries: + - DisplayName: Nushell + ProductCode: '{E5A818C7-FD84-4011-B147-2ADE34D0F940}' + UpgradeCode: '{82D756D2-19FA-4F09-B10F-64942E89F364}' +- Architecture: x64 + Scope: machine + InstallerSwitches: + Custom: ALLUSERS=1 + InstallerUrl: https://github.com/nushell/nushell/releases/download/0.105.0/nu-0.105.0-x86_64-pc-windows-msvc.msi + InstallerSha256: 0580682DC237E7919347666274BE65377E62115863100341DEC92FEF8E018B2E + ProductCode: '{E5A818C7-FD84-4011-B147-2ADE34D0F940}' + AppsAndFeaturesEntries: + - DisplayName: Nushell + ProductCode: '{E5A818C7-FD84-4011-B147-2ADE34D0F940}' + UpgradeCode: '{82D756D2-19FA-4F09-B10F-64942E89F364}' +- Architecture: arm64 + Scope: user + InstallerSwitches: + Custom: ALLUSERS=2 MSIINSTALLPERUSER=1 + InstallerUrl: https://github.com/nushell/nushell/releases/download/0.105.0/nu-0.105.0-aarch64-pc-windows-msvc.msi + InstallerSha256: 37681B3E0E6585E016BFF503F119DA6EA39A6337C882D61164FC44AB075D1D80 + ProductCode: '{F7F161F2-F0BD-46EF-90D7-602FF59C5A8D}' + AppsAndFeaturesEntries: + - DisplayName: Nushell + ProductCode: '{F7F161F2-F0BD-46EF-90D7-602FF59C5A8D}' + UpgradeCode: '{82D756D2-19FA-4F09-B10F-64942E89F364}' +- Architecture: arm64 + Scope: machine + InstallerSwitches: + Custom: ALLUSERS=1 + InstallerUrl: https://github.com/nushell/nushell/releases/download/0.105.0/nu-0.105.0-aarch64-pc-windows-msvc.msi + InstallerSha256: 37681B3E0E6585E016BFF503F119DA6EA39A6337C882D61164FC44AB075D1D80 + ProductCode: '{F7F161F2-F0BD-46EF-90D7-602FF59C5A8D}' + AppsAndFeaturesEntries: + - DisplayName: Nushell + ProductCode: '{F7F161F2-F0BD-46EF-90D7-602FF59C5A8D}' + UpgradeCode: '{82D756D2-19FA-4F09-B10F-64942E89F364}' +ManifestType: installer +ManifestVersion: 1.10.0 diff --git a/manifests/n/Nushell/Nushell/0.105.0/Nushell.Nushell.locale.en-US.yaml b/manifests/n/Nushell/Nushell/0.105.0/Nushell.Nushell.locale.en-US.yaml new file mode 100644 index 000000000..f3593dbf8 --- /dev/null +++ b/manifests/n/Nushell/Nushell/0.105.0/Nushell.Nushell.locale.en-US.yaml @@ -0,0 +1,32 @@ +# Created with WinGet Releaser using komac v2.11.2 +# yaml-language-server: $schema=https://aka.ms/winget-manifest.defaultLocale.1.10.0.schema.json + +PackageIdentifier: Nushell.Nushell +PackageVersion: 0.105.0 +PackageLocale: en-US +Publisher: The Nushell Project Developers +PublisherUrl: https://www.nushell.sh/ +PublisherSupportUrl: https://github.com/nushell/nushell/issues +Author: The Nushell Project Developers +PackageName: nu +PackageUrl: https://github.com/nushell/nushell +License: MIT +LicenseUrl: https://github.com/nushell/nushell/blob/HEAD/LICENSE +Copyright: Copyright (c) 2019 - 2025 The Nushell Project Developers +CopyrightUrl: https://raw.githubusercontent.com/nushell/nushell/main/LICENSE +ShortDescription: A new type of shell +Description: |- + Hello, and welcome to the Nushell project. + The goal of this project is to take the Unix philosophy of shells, where pipes connect simple commands together, and bring it to the modern style of development. + Nu takes cues from a lot of familiar territory, traditional shells like bash, object based shells like PowerShell, functional programming, systems programming, and more. +Moniker: nushell +Tags: +- rust +- shell +ReleaseNotes: |- + This is the 0.105.0 release of Nushell. You can learn more about this release here: https://www.nushell.sh/blog/2025-06-10-nushell_0_105_0.html + For convenience, we are providing full builds for Windows, Linux, and macOS. Be sure you have the requirements to enable all capabilities: https://www.nushell.sh/book/installation.html#dependencies + This release was made possible by PR contributions from @132ikl, @app/dependabot, @atahabaki, @ayax79, @Bahex, @blindFS, @cablehead, @Cattle0Horse, @colececil, @cptpiepmatz, @CSharperMantle, @Dorumin, @fdncred, @FlippinBerger, @flovilmart, @gmr458, @hackeryarn, @hustcer, @jjflash95, @kamek-pf, @Kissaki, @kumarUjjawal, @lazenga, @LazyPluto, @liquid-dragons, @LoicRiegel, @luismeyer95, @luong-komorebi, @Mrfiregem, @musicinmybrain, @new-years-eve, @noahfraiture, @ofek, @pyz4, @raoulkent, @rritik772, @sholderbach, @snickerdoodle2, @tindzk, @Tyarel8, @Villa01, @vivainio, @weirdan, @WindSoilder, @ysthakur, @zhiburt +ReleaseNotesUrl: https://github.com/nushell/nushell/releases/tag/0.105.0 +ManifestType: defaultLocale +ManifestVersion: 1.10.0 diff --git a/manifests/n/Nushell/Nushell/0.105.0/Nushell.Nushell.yaml b/manifests/n/Nushell/Nushell/0.105.0/Nushell.Nushell.yaml new file mode 100644 index 000000000..0a9d89508 --- /dev/null +++ b/manifests/n/Nushell/Nushell/0.105.0/Nushell.Nushell.yaml @@ -0,0 +1,8 @@ +# Created with WinGet Releaser using komac v2.11.2 +# yaml-language-server: $schema=https://aka.ms/winget-manifest.version.1.10.0.schema.json + +PackageIdentifier: Nushell.Nushell +PackageVersion: 0.105.0 +DefaultLocale: en-US +ManifestType: version +ManifestVersion: 1.10.0 diff --git a/manifests/n/Nushell/Nushell/0.105.1/Nushell.Nushell.installer.yaml b/manifests/n/Nushell/Nushell/0.105.1/Nushell.Nushell.installer.yaml new file mode 100644 index 000000000..1b74f4553 --- /dev/null +++ b/manifests/n/Nushell/Nushell/0.105.1/Nushell.Nushell.installer.yaml @@ -0,0 +1,64 @@ +# Created with WinGet Releaser using komac v2.11.2 +# yaml-language-server: $schema=https://aka.ms/winget-manifest.installer.1.10.0.schema.json + +PackageIdentifier: Nushell.Nushell +PackageVersion: 0.105.1 +InstallerLocale: en-US +InstallerType: wix +InstallModes: +- interactive +- silent +- silentWithProgress +UpgradeBehavior: install +Commands: +- nu +ReleaseDate: 2025-06-10 +InstallationMetadata: + DefaultInstallLocation: nu +Installers: +- Architecture: x64 + Scope: user + InstallerSwitches: + Custom: ALLUSERS=2 MSIINSTALLPERUSER=1 + InstallerUrl: https://github.com/nushell/nushell/releases/download/0.105.1/nu-0.105.1-x86_64-pc-windows-msvc.msi + InstallerSha256: 1087C8FDF5AD3F2540BEC6DFC246826D2F2F6378C857946B0A0729AAE5DA7C3A + ProductCode: '{DEE37CEE-80F7-42E4-95ED-92A6E12E19B1}' + AppsAndFeaturesEntries: + - DisplayName: Nushell + ProductCode: '{DEE37CEE-80F7-42E4-95ED-92A6E12E19B1}' + UpgradeCode: '{82D756D2-19FA-4F09-B10F-64942E89F364}' +- Architecture: x64 + Scope: machine + InstallerSwitches: + Custom: ALLUSERS=1 + InstallerUrl: https://github.com/nushell/nushell/releases/download/0.105.1/nu-0.105.1-x86_64-pc-windows-msvc.msi + InstallerSha256: 1087C8FDF5AD3F2540BEC6DFC246826D2F2F6378C857946B0A0729AAE5DA7C3A + ProductCode: '{DEE37CEE-80F7-42E4-95ED-92A6E12E19B1}' + AppsAndFeaturesEntries: + - DisplayName: Nushell + ProductCode: '{DEE37CEE-80F7-42E4-95ED-92A6E12E19B1}' + UpgradeCode: '{82D756D2-19FA-4F09-B10F-64942E89F364}' +- Architecture: arm64 + Scope: user + InstallerSwitches: + Custom: ALLUSERS=2 MSIINSTALLPERUSER=1 + InstallerUrl: https://github.com/nushell/nushell/releases/download/0.105.1/nu-0.105.1-aarch64-pc-windows-msvc.msi + InstallerSha256: 8B2FBC9F64F792670B9F849897DA101CAAAA9AE753404E02B268AAE8FEA5BEF8 + ProductCode: '{61785607-1DF2-4C66-BC98-B01E757FCBB4}' + AppsAndFeaturesEntries: + - DisplayName: Nushell + ProductCode: '{61785607-1DF2-4C66-BC98-B01E757FCBB4}' + UpgradeCode: '{82D756D2-19FA-4F09-B10F-64942E89F364}' +- Architecture: arm64 + Scope: machine + InstallerSwitches: + Custom: ALLUSERS=1 + InstallerUrl: https://github.com/nushell/nushell/releases/download/0.105.1/nu-0.105.1-aarch64-pc-windows-msvc.msi + InstallerSha256: 8B2FBC9F64F792670B9F849897DA101CAAAA9AE753404E02B268AAE8FEA5BEF8 + ProductCode: '{61785607-1DF2-4C66-BC98-B01E757FCBB4}' + AppsAndFeaturesEntries: + - DisplayName: Nushell + ProductCode: '{61785607-1DF2-4C66-BC98-B01E757FCBB4}' + UpgradeCode: '{82D756D2-19FA-4F09-B10F-64942E89F364}' +ManifestType: installer +ManifestVersion: 1.10.0 diff --git a/manifests/n/Nushell/Nushell/0.105.1/Nushell.Nushell.locale.en-US.yaml b/manifests/n/Nushell/Nushell/0.105.1/Nushell.Nushell.locale.en-US.yaml new file mode 100644 index 000000000..d4a7acf15 --- /dev/null +++ b/manifests/n/Nushell/Nushell/0.105.1/Nushell.Nushell.locale.en-US.yaml @@ -0,0 +1,32 @@ +# Created with WinGet Releaser using komac v2.11.2 +# yaml-language-server: $schema=https://aka.ms/winget-manifest.defaultLocale.1.10.0.schema.json + +PackageIdentifier: Nushell.Nushell +PackageVersion: 0.105.1 +PackageLocale: en-US +Publisher: The Nushell Project Developers +PublisherUrl: https://www.nushell.sh/ +PublisherSupportUrl: https://github.com/nushell/nushell/issues +Author: The Nushell Project Developers +PackageName: nu +PackageUrl: https://github.com/nushell/nushell +License: MIT +LicenseUrl: https://github.com/nushell/nushell/blob/HEAD/LICENSE +Copyright: Copyright (c) 2019 - 2025 The Nushell Project Developers +CopyrightUrl: https://raw.githubusercontent.com/nushell/nushell/main/LICENSE +ShortDescription: A new type of shell +Description: |- + Hello, and welcome to the Nushell project. + The goal of this project is to take the Unix philosophy of shells, where pipes connect simple commands together, and bring it to the modern style of development. + Nu takes cues from a lot of familiar territory, traditional shells like bash, object based shells like PowerShell, functional programming, systems programming, and more. +Moniker: nushell +Tags: +- rust +- shell +ReleaseNotes: |- + This is the 0.105.1 release of Nushell. You can learn more about this release here: https://www.nushell.sh/blog/2025-06-10-nushell_0_105_1.html + For convenience, we are providing full builds for Windows, Linux, and macOS. Be sure you have the requirements to enable all capabilities: https://www.nushell.sh/book/installation.html#dependencies + This release was made possible by PR contributions from @cptpiepmatz +ReleaseNotesUrl: https://github.com/nushell/nushell/releases/tag/0.105.1 +ManifestType: defaultLocale +ManifestVersion: 1.10.0 diff --git a/manifests/n/Nushell/Nushell/0.105.1/Nushell.Nushell.yaml b/manifests/n/Nushell/Nushell/0.105.1/Nushell.Nushell.yaml new file mode 100644 index 000000000..988343d3e --- /dev/null +++ b/manifests/n/Nushell/Nushell/0.105.1/Nushell.Nushell.yaml @@ -0,0 +1,8 @@ +# Created with WinGet Releaser using komac v2.11.2 +# yaml-language-server: $schema=https://aka.ms/winget-manifest.version.1.10.0.schema.json + +PackageIdentifier: Nushell.Nushell +PackageVersion: 0.105.1 +DefaultLocale: en-US +ManifestType: version +ManifestVersion: 1.10.0 diff --git a/nu/rewinged.nu b/nu/rewinged.nu new file mode 100644 index 000000000..e007e8394 --- /dev/null +++ b/nu/rewinged.nu @@ -0,0 +1,7 @@ +( + docker run + -p 8080:8080 + -e REWINGED_LISTEN='0.0.0.0:8080' + -v $'(pwd)/manifests:/packages:ro' + ghcr.io/jantari/rewinged:latest +) From cc5560ac9f45d402f832150b845b8d50aced0cf2 Mon Sep 17 00:00:00 2001 From: hustcer Date: Mon, 30 Jun 2025 23:32:26 +0800 Subject: [PATCH 18/61] chore: bump version to 0.105.1 of revision 2 --- meta.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta.json b/meta.json index 64d9f6548..a376db812 100644 --- a/meta.json +++ b/meta.json @@ -1,7 +1,7 @@ { "name": "nushell", "version": "0.105.1", - "revision": 1, + "revision": 2, "pkgs": { "deb": true, "rpm": true, From 7b5dabb9200bd2938b526145e0e636496615d5d5 Mon Sep 17 00:00:00 2001 From: Justin Ma Date: Sat, 5 Jul 2025 21:56:39 +0800 Subject: [PATCH 19/61] Add workflow for Nushell install and upgrade tests by winget (#63) Add workflow for Nushell install and upgrade tests by winget --- .github/workflows/test-upgrade.yml | 71 +++++++++++++++ .../0.105.0/Nushell.Nushell.installer.yaml | 20 ++--- .../0.105.1/Nushell.Nushell.installer.yaml | 20 ++--- tests/test-all.nu | 89 +++++++++++++++++++ 4 files changed, 176 insertions(+), 24 deletions(-) create mode 100644 .github/workflows/test-upgrade.yml create mode 100644 tests/test-all.nu diff --git a/.github/workflows/test-upgrade.yml b/.github/workflows/test-upgrade.yml new file mode 100644 index 000000000..32ca06a83 --- /dev/null +++ b/.github/workflows/test-upgrade.yml @@ -0,0 +1,71 @@ +# Description: This workflow runs tests for hustcer/deepseek-review. +# REF: +# - https://github.com/vyadh/nutest/blob/main/.github/workflows/tests.yaml +# - https://github.com/fdncred/winget-pkgs/blob/master/doc/manifest/schema/1.10.0/installer.md +# - https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/store-information-in-variables#default-environment-variables + +name: Run Nushell Upgrade Tests + +on: + pull_request: + paths-ignore: + - '**.md' + - 'docs/**' + workflow_dispatch: + push: + branches: + - main + - develop + - feature/msi-test + paths-ignore: + - '**.md' + - 'docs/**' + schedule: + - cron: '0 2 * * *' # Run every morning at 2am UTC + +permissions: + contents: read + +jobs: + default: + name: Install and Upgrade Nushell + + strategy: + fail-fast: false + matrix: + os: [windows-latest, windows-2025] + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v4 + + - name: Install winget + if: ${{ matrix.os == 'windows-latest' }} + uses: Cyberboss/install-winget@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Setup Winget + run: | + winget --version + winget settings --enable LocalManifestFiles + winget settings --enable InstallerHashOverride + + - name: Setup Nu + uses: hustcer/setup-nu@v3 + with: + version: 'nightly' + + - name: Test Nushell Upgrade + shell: nu {0} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + use ${{ github.workspace }}/tests/test-all.nu * + test-winget-per-user-install + test-winget-per-user-upgrade + test-winget-per-machine-install + test-winget-per-machine-upgrade + + diff --git a/manifests/n/Nushell/Nushell/0.105.0/Nushell.Nushell.installer.yaml b/manifests/n/Nushell/Nushell/0.105.0/Nushell.Nushell.installer.yaml index 73487131c..005e4276c 100644 --- a/manifests/n/Nushell/Nushell/0.105.0/Nushell.Nushell.installer.yaml +++ b/manifests/n/Nushell/Nushell/0.105.0/Nushell.Nushell.installer.yaml @@ -20,45 +20,41 @@ Installers: Scope: user InstallerSwitches: Custom: ALLUSERS=2 MSIINSTALLPERUSER=1 - InstallerUrl: https://github.com/nushell/nushell/releases/download/0.105.0/nu-0.105.0-x86_64-pc-windows-msvc.msi - InstallerSha256: 0580682DC237E7919347666274BE65377E62115863100341DEC92FEF8E018B2E + InstallerUrl: https://github.com/nushell/integrations/releases/download/v0.105.0/nu-0.105.0-x86_64-pc-windows-msvc.msi + InstallerSha256: 3e911c7ef31c3e1c8594911f3462ddd221475a24af30fb814233978331e8f648 ProductCode: '{E5A818C7-FD84-4011-B147-2ADE34D0F940}' AppsAndFeaturesEntries: - DisplayName: Nushell - ProductCode: '{E5A818C7-FD84-4011-B147-2ADE34D0F940}' UpgradeCode: '{82D756D2-19FA-4F09-B10F-64942E89F364}' - Architecture: x64 Scope: machine InstallerSwitches: Custom: ALLUSERS=1 - InstallerUrl: https://github.com/nushell/nushell/releases/download/0.105.0/nu-0.105.0-x86_64-pc-windows-msvc.msi - InstallerSha256: 0580682DC237E7919347666274BE65377E62115863100341DEC92FEF8E018B2E + InstallerUrl: https://github.com/nushell/integrations/releases/download/v0.105.0/nu-0.105.0-x86_64-pc-windows-msvc.msi + InstallerSha256: 3e911c7ef31c3e1c8594911f3462ddd221475a24af30fb814233978331e8f648 ProductCode: '{E5A818C7-FD84-4011-B147-2ADE34D0F940}' AppsAndFeaturesEntries: - DisplayName: Nushell - ProductCode: '{E5A818C7-FD84-4011-B147-2ADE34D0F940}' UpgradeCode: '{82D756D2-19FA-4F09-B10F-64942E89F364}' - Architecture: arm64 Scope: user InstallerSwitches: Custom: ALLUSERS=2 MSIINSTALLPERUSER=1 - InstallerUrl: https://github.com/nushell/nushell/releases/download/0.105.0/nu-0.105.0-aarch64-pc-windows-msvc.msi - InstallerSha256: 37681B3E0E6585E016BFF503F119DA6EA39A6337C882D61164FC44AB075D1D80 + InstallerUrl: https://github.com/nushell/integrations/releases/download/v0.105.0/nu-0.105.0-aarch64-pc-windows-msvc.msi + InstallerSha256: fccb3ce296a181df205c5d5a0081b976f822228b5ac2a2b51f3cc1314fc2b665 ProductCode: '{F7F161F2-F0BD-46EF-90D7-602FF59C5A8D}' AppsAndFeaturesEntries: - DisplayName: Nushell - ProductCode: '{F7F161F2-F0BD-46EF-90D7-602FF59C5A8D}' UpgradeCode: '{82D756D2-19FA-4F09-B10F-64942E89F364}' - Architecture: arm64 Scope: machine InstallerSwitches: Custom: ALLUSERS=1 - InstallerUrl: https://github.com/nushell/nushell/releases/download/0.105.0/nu-0.105.0-aarch64-pc-windows-msvc.msi - InstallerSha256: 37681B3E0E6585E016BFF503F119DA6EA39A6337C882D61164FC44AB075D1D80 + InstallerUrl: https://github.com/nushell/integrations/releases/download/v0.105.0/nu-0.105.0-aarch64-pc-windows-msvc.msi + InstallerSha256: fccb3ce296a181df205c5d5a0081b976f822228b5ac2a2b51f3cc1314fc2b665 ProductCode: '{F7F161F2-F0BD-46EF-90D7-602FF59C5A8D}' AppsAndFeaturesEntries: - DisplayName: Nushell - ProductCode: '{F7F161F2-F0BD-46EF-90D7-602FF59C5A8D}' UpgradeCode: '{82D756D2-19FA-4F09-B10F-64942E89F364}' ManifestType: installer ManifestVersion: 1.10.0 diff --git a/manifests/n/Nushell/Nushell/0.105.1/Nushell.Nushell.installer.yaml b/manifests/n/Nushell/Nushell/0.105.1/Nushell.Nushell.installer.yaml index 1b74f4553..f72baffe2 100644 --- a/manifests/n/Nushell/Nushell/0.105.1/Nushell.Nushell.installer.yaml +++ b/manifests/n/Nushell/Nushell/0.105.1/Nushell.Nushell.installer.yaml @@ -20,45 +20,41 @@ Installers: Scope: user InstallerSwitches: Custom: ALLUSERS=2 MSIINSTALLPERUSER=1 - InstallerUrl: https://github.com/nushell/nushell/releases/download/0.105.1/nu-0.105.1-x86_64-pc-windows-msvc.msi - InstallerSha256: 1087C8FDF5AD3F2540BEC6DFC246826D2F2F6378C857946B0A0729AAE5DA7C3A + InstallerUrl: https://github.com/nushell/integrations/releases/download/v0.105.1/nu-0.105.1-x86_64-pc-windows-msvc.msi + InstallerSha256: f60bcba3674d737bc8f2ce8a47b6bd9599a846806125795024059f68b3f70565 ProductCode: '{DEE37CEE-80F7-42E4-95ED-92A6E12E19B1}' AppsAndFeaturesEntries: - DisplayName: Nushell - ProductCode: '{DEE37CEE-80F7-42E4-95ED-92A6E12E19B1}' UpgradeCode: '{82D756D2-19FA-4F09-B10F-64942E89F364}' - Architecture: x64 Scope: machine InstallerSwitches: Custom: ALLUSERS=1 - InstallerUrl: https://github.com/nushell/nushell/releases/download/0.105.1/nu-0.105.1-x86_64-pc-windows-msvc.msi - InstallerSha256: 1087C8FDF5AD3F2540BEC6DFC246826D2F2F6378C857946B0A0729AAE5DA7C3A + InstallerUrl: https://github.com/nushell/integrations/releases/download/v0.105.1/nu-0.105.1-x86_64-pc-windows-msvc.msi + InstallerSha256: f60bcba3674d737bc8f2ce8a47b6bd9599a846806125795024059f68b3f70565 ProductCode: '{DEE37CEE-80F7-42E4-95ED-92A6E12E19B1}' AppsAndFeaturesEntries: - DisplayName: Nushell - ProductCode: '{DEE37CEE-80F7-42E4-95ED-92A6E12E19B1}' UpgradeCode: '{82D756D2-19FA-4F09-B10F-64942E89F364}' - Architecture: arm64 Scope: user InstallerSwitches: Custom: ALLUSERS=2 MSIINSTALLPERUSER=1 - InstallerUrl: https://github.com/nushell/nushell/releases/download/0.105.1/nu-0.105.1-aarch64-pc-windows-msvc.msi - InstallerSha256: 8B2FBC9F64F792670B9F849897DA101CAAAA9AE753404E02B268AAE8FEA5BEF8 + InstallerUrl: https://github.com/nushell/integrations/releases/download/v0.105.1/nu-0.105.1-aarch64-pc-windows-msvc.msi + InstallerSha256: 419e293bb80bbce828ce4c8a323cba6125b8d18e1cc549aa847b480659fe300c ProductCode: '{61785607-1DF2-4C66-BC98-B01E757FCBB4}' AppsAndFeaturesEntries: - DisplayName: Nushell - ProductCode: '{61785607-1DF2-4C66-BC98-B01E757FCBB4}' UpgradeCode: '{82D756D2-19FA-4F09-B10F-64942E89F364}' - Architecture: arm64 Scope: machine InstallerSwitches: Custom: ALLUSERS=1 - InstallerUrl: https://github.com/nushell/nushell/releases/download/0.105.1/nu-0.105.1-aarch64-pc-windows-msvc.msi - InstallerSha256: 8B2FBC9F64F792670B9F849897DA101CAAAA9AE753404E02B268AAE8FEA5BEF8 + InstallerUrl: https://github.com/nushell/integrations/releases/download/v0.105.1/nu-0.105.1-aarch64-pc-windows-msvc.msi + InstallerSha256: 419e293bb80bbce828ce4c8a323cba6125b8d18e1cc549aa847b480659fe300c ProductCode: '{61785607-1DF2-4C66-BC98-B01E757FCBB4}' AppsAndFeaturesEntries: - DisplayName: Nushell - ProductCode: '{61785607-1DF2-4C66-BC98-B01E757FCBB4}' UpgradeCode: '{82D756D2-19FA-4F09-B10F-64942E89F364}' ManifestType: installer ManifestVersion: 1.10.0 diff --git a/tests/test-all.nu b/tests/test-all.nu new file mode 100644 index 000000000..ea84b8db1 --- /dev/null +++ b/tests/test-all.nu @@ -0,0 +1,89 @@ +# Usage: +# Run the following commands to enable local manifest files and installer hash override with admin privileges: +# winget settings --enable LocalManifestFiles +# winget settings --enable InstallerHashOverride + +use common.nu [check-user-install, check-version-match, check-local-machine-install] + +const VERSION = '0.105.1' +const PREV_VERSION = '0.105.0' +const LAST_VERSION = '0.105.1' +const MSI_PKG = 'wix\bin\x64\Release\nu-x64.msi' +const PER_MACHINE_INSTALL_DIR = 'C:\Program Files\nu' +const PER_USER_INSTALL_DIR = $'($nu.home-path)\AppData\Local\Programs\nu' +const WINGET_ARGS = [ + --silent + --ignore-security-hash + --disable-interactivity + --accept-source-agreements + --accept-package-agreements + ] + +def main [--msi(-m)] { + if $msi { + test-msi-per-user-install + test-msi-per-machine-install + } + test-winget-per-user-install + test-winget-per-user-upgrade + test-winget-per-machine-install + test-winget-per-machine-upgrade +} + +export def test-msi-per-user-install [] { + winget uninstall nushell | complete + print $'Using msiexec to test MSI (ansi g)per-user(ansi reset) installation' + print '-------------------------------------------------------------------' + msiexec /i $MSI_PKG MSIINSTALLPERUSER=1 /quiet /qn /L*V install.txt + check-user-install $PER_USER_INSTALL_DIR + check-version-match $VERSION $PER_USER_INSTALL_DIR + winget list nushell --accept-source-agreements +} + +export def test-msi-per-machine-install [] { + winget uninstall nushell | complete + print $'(char nl)Using msiexec to test MSI (ansi g)machine scope(ansi reset) installation' + print '-------------------------------------------------------------------' + msiexec /i $MSI_PKG ALLUSERS=1 /L*V install.txt + check-local-machine-install + check-version-match $VERSION $PER_MACHINE_INSTALL_DIR + winget list nushell --accept-source-agreements +} + +export def test-winget-per-user-install [] { + winget uninstall nushell | complete + print $'(char nl)Using winget to test MSI (ansi g)user scope(ansi reset) installation' + print '-------------------------------------------------------------------' + winget install --manifest $'manifests\n\Nushell\Nushell\($PREV_VERSION)\' ...$WINGET_ARGS --scope user + check-user-install $PER_USER_INSTALL_DIR + check-version-match $PREV_VERSION $PER_USER_INSTALL_DIR + winget list nushell --accept-source-agreements +} + +export def test-winget-per-user-upgrade [] { + print $'(char nl)Using winget to test MSI (ansi g)user scope(ansi reset) upgrade' + print '-------------------------------------------------------------------' + winget install --manifest $'manifests\n\Nushell\Nushell\($LAST_VERSION)\' ...$WINGET_ARGS --scope user + check-user-install $PER_USER_INSTALL_DIR + check-version-match $LAST_VERSION $PER_USER_INSTALL_DIR + winget list nushell --accept-source-agreements +} + +export def test-winget-per-machine-install [] { + winget uninstall nushell | complete + print $'(char nl)Using winget to test MSI (ansi g)machine scope(ansi reset) installation' + print '-------------------------------------------------------------------' + winget install --manifest $'manifests\n\Nushell\Nushell\($PREV_VERSION)\' ...$WINGET_ARGS --scope machine + check-local-machine-install + check-version-match $PREV_VERSION $PER_MACHINE_INSTALL_DIR + winget list nushell --accept-source-agreements +} + +export def test-winget-per-machine-upgrade [] { + print $'(char nl)Using winget to test MSI (ansi g)machine scope(ansi reset) upgrade' + print '-------------------------------------------------------------------' + winget install --manifest $'manifests\n\Nushell\Nushell\($LAST_VERSION)\' ...$WINGET_ARGS --scope machine + check-local-machine-install + check-version-match $LAST_VERSION $PER_MACHINE_INSTALL_DIR + winget list nushell --accept-source-agreements +} From 20bcac6550b8b9d1238fdf8252c4134b001aed26 Mon Sep 17 00:00:00 2001 From: hustcer Date: Sat, 5 Jul 2025 22:14:29 +0800 Subject: [PATCH 20/61] fix: Fix winget upgrade tests --- tests/test-all.nu | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test-all.nu b/tests/test-all.nu index ea84b8db1..56b037b29 100644 --- a/tests/test-all.nu +++ b/tests/test-all.nu @@ -63,6 +63,7 @@ export def test-winget-per-user-install [] { export def test-winget-per-user-upgrade [] { print $'(char nl)Using winget to test MSI (ansi g)user scope(ansi reset) upgrade' print '-------------------------------------------------------------------' + # winget upgrade does not work for user scope due to https://github.com/microsoft/winget-cli/issues/3011 winget install --manifest $'manifests\n\Nushell\Nushell\($LAST_VERSION)\' ...$WINGET_ARGS --scope user check-user-install $PER_USER_INSTALL_DIR check-version-match $LAST_VERSION $PER_USER_INSTALL_DIR @@ -82,7 +83,7 @@ export def test-winget-per-machine-install [] { export def test-winget-per-machine-upgrade [] { print $'(char nl)Using winget to test MSI (ansi g)machine scope(ansi reset) upgrade' print '-------------------------------------------------------------------' - winget install --manifest $'manifests\n\Nushell\Nushell\($LAST_VERSION)\' ...$WINGET_ARGS --scope machine + winget upgrade --manifest $'manifests\n\Nushell\Nushell\($LAST_VERSION)\' ...$WINGET_ARGS check-local-machine-install check-version-match $LAST_VERSION $PER_MACHINE_INSTALL_DIR winget list nushell --accept-source-agreements From bb8f983af1447315572aa628eefeb83420bd41a6 Mon Sep 17 00:00:00 2001 From: hustcer Date: Tue, 15 Jul 2025 19:59:41 +0800 Subject: [PATCH 21/61] fix: Fix getting Nu binary path for Nushell 0.106 --- Justfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Justfile b/Justfile index f7eaffb78..fdf41d57d 100644 --- a/Justfile +++ b/Justfile @@ -24,7 +24,7 @@ set positional-arguments := true # Used to handle the path separator issue NU_DISTRO_PATH := parent_directory(justfile()) -NU_DIR := parent_directory(`(which nu).path.0`) +NU_DIR := parent_directory(`$nu.current-exe`) _query_plugin := if os_family() == 'windows' { 'nu_plugin_query.exe' } else { 'nu_plugin_query' } # To pass arguments to a dependency, put the dependency From 32b6da9d56bac3f0d92d064b80e180b28f602ace Mon Sep 17 00:00:00 2001 From: Justin Ma Date: Thu, 24 Jul 2025 05:58:05 +0800 Subject: [PATCH 22/61] Bump to Nu 0.106.0 (#64) --- meta.json | 6 +++--- nu/release.nu | 4 ++-- nu/tests.nu | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/meta.json b/meta.json index a376db812..37dc5a5e7 100644 --- a/meta.json +++ b/meta.json @@ -1,7 +1,7 @@ { "name": "nushell", - "version": "0.105.1", - "revision": 2, + "version": "0.106.0", + "revision": 0, "pkgs": { "deb": true, "rpm": true, @@ -13,4 +13,4 @@ "github": "https://github.com/nushell/nushell", "home": "https://www.nushell.sh", "description": "A new type of shell." -} \ No newline at end of file +} diff --git a/nu/release.nu b/nu/release.nu index 29f61a12c..a1fce748e 100644 --- a/nu/release.nu +++ b/nu/release.nu @@ -31,7 +31,7 @@ export def 'fetch release' [ amd64: 'x86_64-unknown-linux-musl', arm64: 'aarch64-unknown-linux-musl', riscv64: 'riscv64gc-unknown-linux-gnu', - loongarch64: 'loongarch64-unknown-linux-gnu', + loongarch64: 'loongarch64-unknown-linux-musl', } if $arch not-in $ARCH_MAP { print $'Invalid architecture: (ansi r)($arch)(ansi reset)'; exit 1 @@ -110,7 +110,7 @@ export def 'push pkg' [ ] { # Normalize architecture based on alias map if needed let normalized_arch = if $type in [apk, rpm] { - $ARCH_ALIAS_MAP | get -i $arch | default $arch + $ARCH_ALIAS_MAP | get -o $arch | default $arch } else { $arch } # Get package file based on architecture and type diff --git a/nu/tests.nu b/nu/tests.nu index 804d9e3e0..856030264 100644 --- a/nu/tests.nu +++ b/nu/tests.nu @@ -163,8 +163,8 @@ export def compare-ver [v1: string, v2: string] { # If you want to compare more parts use the following code: # for i in 0..([2 ($a | length) ($b | length)] | math max) for i in 0..2 { - let x = $a | get -i $i | default 0 - let y = $b | get -i $i | default 0 + let x = $a | get -o $i | default 0 + let y = $b | get -o $i | default 0 if $x > $y { return 1 } if $x < $y { return (-1) } } From e8d64dc5d34b77d5d82c8cfc467d4b19c9a3d61e Mon Sep 17 00:00:00 2001 From: hustcer Date: Thu, 24 Jul 2025 06:04:02 +0800 Subject: [PATCH 23/61] chore: bump version to 0.106.0 of revision 0 --- meta.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta.json b/meta.json index 37dc5a5e7..519da58f5 100644 --- a/meta.json +++ b/meta.json @@ -13,4 +13,4 @@ "github": "https://github.com/nushell/nushell", "home": "https://www.nushell.sh", "description": "A new type of shell." -} +} \ No newline at end of file From 86afded399177d612f10984e121261a5cfdaed9c Mon Sep 17 00:00:00 2001 From: hustcer Date: Sat, 26 Jul 2025 09:14:41 +0800 Subject: [PATCH 24/61] Use loongarch64-unknown-linux-gnu for loong64 release pkg --- meta.json | 2 +- nu/release.nu | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meta.json b/meta.json index 519da58f5..9652dd033 100644 --- a/meta.json +++ b/meta.json @@ -1,7 +1,7 @@ { "name": "nushell", "version": "0.106.0", - "revision": 0, + "revision": 1, "pkgs": { "deb": true, "rpm": true, diff --git a/nu/release.nu b/nu/release.nu index a1fce748e..7ed19f58d 100644 --- a/nu/release.nu +++ b/nu/release.nu @@ -31,7 +31,7 @@ export def 'fetch release' [ amd64: 'x86_64-unknown-linux-musl', arm64: 'aarch64-unknown-linux-musl', riscv64: 'riscv64gc-unknown-linux-gnu', - loongarch64: 'loongarch64-unknown-linux-musl', + loongarch64: 'loongarch64-unknown-linux-gnu', } if $arch not-in $ARCH_MAP { print $'Invalid architecture: (ansi r)($arch)(ansi reset)'; exit 1 From 98df994ee9d066d42a7c7cebcdc153ce8a471e7a Mon Sep 17 00:00:00 2001 From: Justin Ma Date: Sat, 26 Jul 2025 09:46:47 +0800 Subject: [PATCH 25/61] Add winget machine scope install tests (#65) Add winget machine scope install tests --- .github/workflows/test-winget.yml | 30 ++++++++++++++++++++++++++++++ tests/common.nu | 4 ++-- tests/winget-install.nu | 14 ++++++++++---- 3 files changed, 42 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test-winget.yml b/.github/workflows/test-winget.yml index f3c5b71c4..a08a0e4ec 100644 --- a/.github/workflows/test-winget.yml +++ b/.github/workflows/test-winget.yml @@ -93,3 +93,33 @@ jobs: run: | winget install komac --accept-source-agreements --accept-package-agreements --disable-interactivity nu tests/winget-install.nu --scope user + + machine-scope: + name: Install with Machine Scope + + strategy: + fail-fast: false + matrix: + os: [windows-latest, windows-2025] + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v4 + + - name: Install winget + if: ${{ matrix.os == 'windows-latest' }} + uses: Cyberboss/install-winget@v1 + + - name: Setup Nu + uses: hustcer/setup-nu@v3 + with: + version: 'nightly' + + - name: Test Winget Install with Machine Scope + shell: nu {0} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + winget install komac --accept-source-agreements --accept-package-agreements --disable-interactivity + nu tests/winget-install.nu --scope machine diff --git a/tests/common.nu b/tests/common.nu index e488ed3d4..864bf15c6 100644 --- a/tests/common.nu +++ b/tests/common.nu @@ -11,8 +11,8 @@ const BINS = [ nu_plugin_formats.exe, ] -const MACHINE_INSTALL_DIR = 'C:\Program Files\nu' -const USER_INSTALL_DIR = $'($nu.home-path)\AppData\Local\Programs\nu' +export const MACHINE_INSTALL_DIR = 'C:\Program Files\nu' +export const USER_INSTALL_DIR = $'($nu.home-path)\AppData\Local\Programs\nu' const ASSETS = [License.rtf README.txt nu.ico bin] diff --git a/tests/winget-install.nu b/tests/winget-install.nu index e58a5194d..c36f5650c 100644 --- a/tests/winget-install.nu +++ b/tests/winget-install.nu @@ -1,7 +1,9 @@ use std/assert use std/util ['path add'] -use common.nu [check-user-install, check-version-match, get-latest-tag] +use common.nu [MACHINE_INSTALL_DIR, USER_INSTALL_DIR] +use common.nu [check-user-install, check-local-machine-install, check-version-match, get-latest-tag] + const KOMAC_PATH = $'($nu.home-path)\AppData\Local\Programs\Komac\bin\' @@ -15,7 +17,6 @@ const WINGET_ARGS = [ def main [--scope: string] { prepare-manifest - let install_dir = $'($nu.home-path)\AppData\Local\Programs\nu' let scope_tip = if $scope in [user, machine] { $'($scope) scope' } else { $'default scope' } print $'Using winget to test MSI (ansi g)($scope_tip)(ansi reset) installation' let version = get-latest-tag | split row + | first @@ -23,8 +24,13 @@ def main [--scope: string] { winget settings --enable LocalManifestFiles winget settings --enable InstallerHashOverride winget install --manifest $'manifests\n\Nushell\Nushell\($version)\' ...$WINGET_ARGS ...$scope_arg - check-user-install $install_dir - check-version-match $version $install_dir + if $scope == 'machine' { + check-local-machine-install + check-version-match $version $MACHINE_INSTALL_DIR + return + } + check-user-install $USER_INSTALL_DIR + check-version-match $version $USER_INSTALL_DIR } def prepare-manifest [] { From 1c9061c18682ecebe4110ed8dacf29b9c8ef7af6 Mon Sep 17 00:00:00 2001 From: hustcer Date: Mon, 28 Jul 2025 14:40:43 +0800 Subject: [PATCH 26/61] chore: Display Nu version in Linux install tests --- nu/tests.nu | 1 + 1 file changed, 1 insertion(+) diff --git a/nu/tests.nu b/nu/tests.nu index 856030264..ac7093872 100644 --- a/nu/tests.nu +++ b/nu/tests.nu @@ -95,6 +95,7 @@ def "test bin installed correctly" [] { def "test Nu version is correct" [] { let version = nu --version + print $'Nushell version: ($version)' assert greater or equal (compare-ver $version $NU_VERSION) 0 } From 9113bb8da9689c1d44d0e03dcbfac9d4db7b4704 Mon Sep 17 00:00:00 2001 From: hustcer Date: Mon, 28 Jul 2025 14:53:16 +0800 Subject: [PATCH 27/61] feat: Try to add installation test for almalinux:10 --- .github/workflows/test.yml | 2 +- nu/tests.nu | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 800643305..ceb60a7f2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -53,7 +53,7 @@ jobs: - redhat/ubi10:latest - redhat/ubi9:latest - redhat/ubi8:latest - # - almalinux:10 + - almalinux:10 - almalinux:9 - almalinux:8 - openeuler/openeuler:25.03 diff --git a/nu/tests.nu b/nu/tests.nu index ac7093872..65c7b1391 100644 --- a/nu/tests.nu +++ b/nu/tests.nu @@ -95,7 +95,7 @@ def "test bin installed correctly" [] { def "test Nu version is correct" [] { let version = nu --version - print $'Nushell version: ($version)' + print $'Nushell version: (ansi g)($version)(ansi reset)' assert greater or equal (compare-ver $version $NU_VERSION) 0 } From 9852113288cb529af2df1ebe4d5de648b3aed44e Mon Sep 17 00:00:00 2001 From: Justin Ma Date: Mon, 28 Jul 2025 22:31:18 +0800 Subject: [PATCH 28/61] Test winget upgrade for the latest nightly builds (#67) Test winget upgrade for the latest nightly builds --- .github/workflows/test-upgrade.yml | 3 ++ tests/test-all.nu | 60 ++++++++++++++++++++---------- tests/winget-install.nu | 2 +- 3 files changed, 45 insertions(+), 20 deletions(-) diff --git a/.github/workflows/test-upgrade.yml b/.github/workflows/test-upgrade.yml index 32ca06a83..9f41d6f55 100644 --- a/.github/workflows/test-upgrade.yml +++ b/.github/workflows/test-upgrade.yml @@ -63,6 +63,9 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | use ${{ github.workspace }}/tests/test-all.nu * + use ${{ github.workspace }}/tests/winget-install.nu [prepare-manifest] + winget install komac --accept-source-agreements --accept-package-agreements --disable-interactivity + prepare-manifest test-winget-per-user-install test-winget-per-user-upgrade test-winget-per-machine-install diff --git a/tests/test-all.nu b/tests/test-all.nu index 56b037b29..96bd94f7d 100644 --- a/tests/test-all.nu +++ b/tests/test-all.nu @@ -3,7 +3,8 @@ # winget settings --enable LocalManifestFiles # winget settings --enable InstallerHashOverride -use common.nu [check-user-install, check-version-match, check-local-machine-install] +use winget-install.nu [prepare-manifest] +use common.nu [check-user-install, check-version-match, check-local-machine-install, get-latest-tag] const VERSION = '0.105.1' const PREV_VERSION = '0.105.0' @@ -19,15 +20,16 @@ const WINGET_ARGS = [ --accept-package-agreements ] -def main [--msi(-m)] { - if $msi { +def main [--msi(-m), --local] { + if $msi and $local { test-msi-per-user-install test-msi-per-machine-install } - test-winget-per-user-install - test-winget-per-user-upgrade - test-winget-per-machine-install - test-winget-per-machine-upgrade + if not $local { prepare-manifest } + test-winget-per-user-install --local=$local + test-winget-per-user-upgrade --local=$local + test-winget-per-machine-install --local=$local + test-winget-per-machine-upgrade --local=$local } export def test-msi-per-user-install [] { @@ -50,41 +52,61 @@ export def test-msi-per-machine-install [] { winget list nushell --accept-source-agreements } -export def test-winget-per-user-install [] { +export def test-winget-per-user-install [--local] { winget uninstall nushell | complete print $'(char nl)Using winget to test MSI (ansi g)user scope(ansi reset) installation' print '-------------------------------------------------------------------' - winget install --manifest $'manifests\n\Nushell\Nushell\($PREV_VERSION)\' ...$WINGET_ARGS --scope user + if $local { + winget install --manifest $'manifests\n\Nushell\Nushell\($PREV_VERSION)\' ...$WINGET_ARGS --scope user + check-version-match $PREV_VERSION $PER_USER_INSTALL_DIR + } else { + winget install --id Nushell.Nushell ...$WINGET_ARGS --scope user + } check-user-install $PER_USER_INSTALL_DIR - check-version-match $PREV_VERSION $PER_USER_INSTALL_DIR winget list nushell --accept-source-agreements } -export def test-winget-per-user-upgrade [] { +export def test-winget-per-user-upgrade [--local] { print $'(char nl)Using winget to test MSI (ansi g)user scope(ansi reset) upgrade' print '-------------------------------------------------------------------' # winget upgrade does not work for user scope due to https://github.com/microsoft/winget-cli/issues/3011 - winget install --manifest $'manifests\n\Nushell\Nushell\($LAST_VERSION)\' ...$WINGET_ARGS --scope user + if $local { + winget install --manifest $'manifests\n\Nushell\Nushell\($LAST_VERSION)\' ...$WINGET_ARGS --scope user + check-version-match $LAST_VERSION $PER_USER_INSTALL_DIR + } else { + let version = get-latest-tag | split row + | first + winget install --manifest $'manifests\n\Nushell\Nushell\($version)\' ...$WINGET_ARGS --scope user + check-version-match $version $PER_USER_INSTALL_DIR + } check-user-install $PER_USER_INSTALL_DIR - check-version-match $LAST_VERSION $PER_USER_INSTALL_DIR winget list nushell --accept-source-agreements } -export def test-winget-per-machine-install [] { +export def test-winget-per-machine-install [--local] { winget uninstall nushell | complete print $'(char nl)Using winget to test MSI (ansi g)machine scope(ansi reset) installation' print '-------------------------------------------------------------------' - winget install --manifest $'manifests\n\Nushell\Nushell\($PREV_VERSION)\' ...$WINGET_ARGS --scope machine + if $local { + winget install --manifest $'manifests\n\Nushell\Nushell\($PREV_VERSION)\' ...$WINGET_ARGS --scope machine + check-version-match $PREV_VERSION $PER_MACHINE_INSTALL_DIR + } else { + winget install --id Nushell.Nushell ...$WINGET_ARGS --scope machine + } check-local-machine-install - check-version-match $PREV_VERSION $PER_MACHINE_INSTALL_DIR winget list nushell --accept-source-agreements } -export def test-winget-per-machine-upgrade [] { +export def test-winget-per-machine-upgrade [--local] { print $'(char nl)Using winget to test MSI (ansi g)machine scope(ansi reset) upgrade' print '-------------------------------------------------------------------' - winget upgrade --manifest $'manifests\n\Nushell\Nushell\($LAST_VERSION)\' ...$WINGET_ARGS + if $local { + winget upgrade --manifest $'manifests\n\Nushell\Nushell\($LAST_VERSION)\' ...$WINGET_ARGS + check-version-match $LAST_VERSION $PER_MACHINE_INSTALL_DIR + } else { + let version = get-latest-tag | split row + | first + winget upgrade --manifest $'manifests\n\Nushell\Nushell\($version)\' ...$WINGET_ARGS + check-version-match $version $PER_MACHINE_INSTALL_DIR + } check-local-machine-install - check-version-match $LAST_VERSION $PER_MACHINE_INSTALL_DIR winget list nushell --accept-source-agreements } diff --git a/tests/winget-install.nu b/tests/winget-install.nu index c36f5650c..feebc0bac 100644 --- a/tests/winget-install.nu +++ b/tests/winget-install.nu @@ -33,7 +33,7 @@ def main [--scope: string] { check-version-match $version $USER_INSTALL_DIR } -def prepare-manifest [] { +export def prepare-manifest [] { let version = get-latest-tag | split row + | first let urls = get-download-url path add $KOMAC_PATH From bb7956f276710092897bbc4b3e85c363dfd2bda6 Mon Sep 17 00:00:00 2001 From: hustcer Date: Wed, 30 Jul 2025 08:17:03 +0800 Subject: [PATCH 29/61] chore: bump version to 0.106.1 of revision 0 --- meta.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta.json b/meta.json index 9652dd033..bee2b43e1 100644 --- a/meta.json +++ b/meta.json @@ -1,7 +1,7 @@ { "name": "nushell", - "version": "0.106.0", - "revision": 1, + "version": "0.106.1", + "revision": 0, "pkgs": { "deb": true, "rpm": true, From dd58f3c886b8dd0454380ba9a62944b9221323d5 Mon Sep 17 00:00:00 2001 From: hustcer Date: Wed, 3 Sep 2025 12:43:27 +0800 Subject: [PATCH 30/61] chore: bump version to 0.107.0 of revision 0 --- meta.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta.json b/meta.json index bee2b43e1..2ab633875 100644 --- a/meta.json +++ b/meta.json @@ -1,6 +1,6 @@ { "name": "nushell", - "version": "0.106.1", + "version": "0.107.0", "revision": 0, "pkgs": { "deb": true, From 910a58fec5a57b833ccf40e2a62d1f5d2f6bc42b Mon Sep 17 00:00:00 2001 From: hustcer Date: Wed, 3 Sep 2025 12:58:52 +0800 Subject: [PATCH 31/61] fix: Fix release script for Nu 0.107 --- nu/release.nu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nu/release.nu b/nu/release.nu index 7ed19f58d..979241c2e 100644 --- a/nu/release.nu +++ b/nu/release.nu @@ -137,7 +137,7 @@ export def 'pkg exists' [ } let versions = fury versions $'($type):nushell' -a nushell --api-token $env.GEMFURY_TOKEN | complete | get stdout | lines - | skip 3 | str join "\n" | detect columns + | skip 3 | str join "\n" | detect columns --guess let revision = $env.NU_VERSION_REVISION? | default 0 | into int let rev = if $type == 'alpine' { $'r($revision)' } else { $revision } let ver = if $revision > 0 { $'($env.NU_VERSION)-($rev)' } else { $env.NU_VERSION } From 9a1642837c251137428edb7c0d1a5586a504aedb Mon Sep 17 00:00:00 2001 From: Justin Ma Date: Thu, 4 Sep 2025 07:54:11 +0800 Subject: [PATCH 32/61] Add installation tests for loonarch64 (#68) Add installation tests for loonarch64, fixes #41 --- .github/workflows/loong.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/loong.yml b/.github/workflows/loong.yml index 3875e4247..5fea5f73c 100644 --- a/.github/workflows/loong.yml +++ b/.github/workflows/loong.yml @@ -20,7 +20,7 @@ on: jobs: install-rpm-loong: - if: false + # if: false name: Install Nu RPM on Loong64 strategy: fail-fast: false @@ -29,7 +29,8 @@ jobs: - ghcr.io/loong64/anolis:latest - loongarch64/openeuler:24.03-LTS - ghcr.io/loong64/opencloudos:latest - - cr.loongnix.cn/openanolis/anolisos:8.10 + # - cr.loongnix.cn/loongson/loongnix:20 + # - cr.loongnix.cn/openanolis/anolisos:8.10 runs-on: ubuntu-24.04-arm steps: - name: Set up QEMU From 7d7e1afd44edcf1908df080c17a382b87bbc41d2 Mon Sep 17 00:00:00 2001 From: "Taylor C. Richberger" Date: Tue, 9 Sep 2025 22:33:10 -0600 Subject: [PATCH 33/61] fix: Ensure config directory exists in post-install and pre-remove (#70) This was causing install to fail for rpm-ostree install. --- scripts/post-install.sh | 13 +++++++++++++ scripts/pre-remove.sh | 13 +++++++++++++ 2 files changed, 26 insertions(+) diff --git a/scripts/post-install.sh b/scripts/post-install.sh index 25cbb2717..4e096e597 100644 --- a/scripts/post-install.sh +++ b/scripts/post-install.sh @@ -2,4 +2,17 @@ # Author: hustcer # Created: 2025/02/25 18:55:20 +set -e + +# Running nu in the rpm-ostree script environment fails if the config directory +# doesn't exist, preventing the post-install.nu script from being run. +if [ -n "${XDG_CONFIG_HOME+x}" ]; then + mkdir -p "$XDG_CONFIG_HOME" +elif [ -n "${HOME+x}" ]; then + mkdir -p "$HOME/.config" +else + export XDG_CONFIG_HOME="$PWD/.config" + mkdir -p "$XDG_CONFIG_HOME" +fi + nu /usr/libexec/nushell/post-install.nu diff --git a/scripts/pre-remove.sh b/scripts/pre-remove.sh index 1fe186a7a..a4ac6261c 100644 --- a/scripts/pre-remove.sh +++ b/scripts/pre-remove.sh @@ -2,4 +2,17 @@ # Author: hustcer # Created: 2025/03/10 08:35:20 +set -e + +# Running nu in the rpm-ostree script environment fails if the config directory +# doesn't exist, preventing the pre-remove.nu script from being run. +if [ -n "${XDG_CONFIG_HOME+x}" ]; then + mkdir -p "$XDG_CONFIG_HOME" +elif [ -n "${HOME+x}" ]; then + mkdir -p "$HOME/.config" +else + export XDG_CONFIG_HOME="$PWD/.config" + mkdir -p "$XDG_CONFIG_HOME" +fi + nu /usr/libexec/nushell/pre-remove.nu From a599efdeb7da06bbcb17ca42400d639ecb8147b4 Mon Sep 17 00:00:00 2001 From: hustcer Date: Wed, 10 Sep 2025 12:35:08 +0800 Subject: [PATCH 34/61] chore: bump version to 0.107.0 of revision 1 --- meta.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta.json b/meta.json index 2ab633875..78754ce94 100644 --- a/meta.json +++ b/meta.json @@ -1,7 +1,7 @@ { "name": "nushell", "version": "0.107.0", - "revision": 0, + "revision": 1, "pkgs": { "deb": true, "rpm": true, From 81f1a1152c1b920f4973bac8fffc8f0a7ef289e3 Mon Sep 17 00:00:00 2001 From: hustcer Date: Fri, 19 Sep 2025 23:24:06 +0800 Subject: [PATCH 35/61] fix: Fix winget install error --- .github/workflows/test-upgrade.yml | 6 ------ .github/workflows/test-winget.yml | 12 ------------ 2 files changed, 18 deletions(-) diff --git a/.github/workflows/test-upgrade.yml b/.github/workflows/test-upgrade.yml index 9f41d6f55..248ca056d 100644 --- a/.github/workflows/test-upgrade.yml +++ b/.github/workflows/test-upgrade.yml @@ -40,12 +40,6 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Install winget - if: ${{ matrix.os == 'windows-latest' }} - uses: Cyberboss/install-winget@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Setup Winget run: | winget --version diff --git a/.github/workflows/test-winget.yml b/.github/workflows/test-winget.yml index a08a0e4ec..2ff112ea5 100644 --- a/.github/workflows/test-winget.yml +++ b/.github/workflows/test-winget.yml @@ -40,10 +40,6 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Install winget - if: ${{ matrix.os == 'windows-latest' }} - uses: Cyberboss/install-winget@v1 - - name: Upgrade Winget run: | winget --version @@ -77,10 +73,6 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Install winget - if: ${{ matrix.os == 'windows-latest' }} - uses: Cyberboss/install-winget@v1 - - name: Setup Nu uses: hustcer/setup-nu@v3 with: @@ -107,10 +99,6 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Install winget - if: ${{ matrix.os == 'windows-latest' }} - uses: Cyberboss/install-winget@v1 - - name: Setup Nu uses: hustcer/setup-nu@v3 with: From 31710f2aa79752a14fcf39fd01fbb46d7a90ec41 Mon Sep 17 00:00:00 2001 From: hustcer Date: Wed, 15 Oct 2025 21:55:47 +0800 Subject: [PATCH 36/61] chore: bump version to 0.108.0 of revision 0 --- meta.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta.json b/meta.json index 78754ce94..19cd8ec81 100644 --- a/meta.json +++ b/meta.json @@ -1,7 +1,7 @@ { "name": "nushell", - "version": "0.107.0", - "revision": 1, + "version": "0.108.0", + "revision": 0, "pkgs": { "deb": true, "rpm": true, From 7f0f277fab1a065dd3c0b667bdd0f9cefc720e60 Mon Sep 17 00:00:00 2001 From: Justin Ma Date: Tue, 28 Oct 2025 12:50:50 +0800 Subject: [PATCH 37/61] Try to fix Winget install & upgrade Tests in workflows (#73) Try to fix Winget install & upgrade Tests in workflows --- .github/workflows/test-upgrade.yml | 6 +++++- .github/workflows/test-winget.yml | 18 +++++++++++++++--- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-upgrade.yml b/.github/workflows/test-upgrade.yml index 248ca056d..19a3571ca 100644 --- a/.github/workflows/test-upgrade.yml +++ b/.github/workflows/test-upgrade.yml @@ -51,6 +51,11 @@ jobs: with: version: 'nightly' + - name: Install Komac Tool + shell: cmd + run: | + winget install komac --accept-source-agreements --accept-package-agreements --disable-interactivity + - name: Test Nushell Upgrade shell: nu {0} env: @@ -58,7 +63,6 @@ jobs: run: | use ${{ github.workspace }}/tests/test-all.nu * use ${{ github.workspace }}/tests/winget-install.nu [prepare-manifest] - winget install komac --accept-source-agreements --accept-package-agreements --disable-interactivity prepare-manifest test-winget-per-user-install test-winget-per-user-upgrade diff --git a/.github/workflows/test-winget.yml b/.github/workflows/test-winget.yml index 2ff112ea5..c1c43f351 100644 --- a/.github/workflows/test-winget.yml +++ b/.github/workflows/test-winget.yml @@ -52,12 +52,16 @@ jobs: with: version: 'nightly' + - name: Install Komac Tool + shell: cmd + run: | + winget install komac --accept-source-agreements --accept-package-agreements --disable-interactivity + - name: Test Winget Install with Default Scope shell: nu {0} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - winget install komac --accept-source-agreements --accept-package-agreements --disable-interactivity nu tests/winget-install.nu user-scope: @@ -78,12 +82,16 @@ jobs: with: version: 'nightly' + - name: Install Komac Tool + shell: cmd + run: | + winget install komac --accept-source-agreements --accept-package-agreements --disable-interactivity + - name: Test Winget Install with User Scope shell: nu {0} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - winget install komac --accept-source-agreements --accept-package-agreements --disable-interactivity nu tests/winget-install.nu --scope user machine-scope: @@ -104,10 +112,14 @@ jobs: with: version: 'nightly' + - name: Install Komac Tool + shell: cmd + run: | + winget install komac --accept-source-agreements --accept-package-agreements --disable-interactivity + - name: Test Winget Install with Machine Scope shell: nu {0} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - winget install komac --accept-source-agreements --accept-package-agreements --disable-interactivity nu tests/winget-install.nu --scope machine From 3d31156ba891c1804de36324fb060774c0ce31aa Mon Sep 17 00:00:00 2001 From: Justin Ma Date: Mon, 24 Nov 2025 14:10:16 +0800 Subject: [PATCH 38/61] chore: Use explicit key for Debian / Ubuntu repo (#74) REF: https://github.com/nushell/nushell.github.io/pull/2080#issue-3656997847 --- .github/workflows/test.yml | 4 ++-- README.md | 4 ++-- cspell.yml | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ceb60a7f2..73b1e15c4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -88,8 +88,8 @@ jobs: steps: - name: Test Install Nushell DEB Package run: | - curl -fsSL https://apt.fury.io/nushell/gpg.key | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/fury-nushell.gpg - echo "deb https://apt.fury.io/nushell/ /" | sudo tee /etc/apt/sources.list.d/fury.list + wget -qO- https://apt.fury.io/nushell/gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/fury-nushell.gpg + echo "deb [signed-by=/etc/apt/keyrings/fury-nushell.gpg] https://apt.fury.io/nushell/ /" | sudo tee /etc/apt/sources.list.d/fury.list sudo apt update sudo apt install nushell nu -c 'version' diff --git a/README.md b/README.md index 661920f1f..057de9a2f 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,8 @@ Package and release the official Nushell binaries in `deb`, `rpm`, and `apk` etc ## Install Nushell for Ubuntu/Debian ```nu -curl -fsSL https://apt.fury.io/nushell/gpg.key | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/fury-nushell.gpg -echo "deb https://apt.fury.io/nushell/ /" | sudo tee /etc/apt/sources.list.d/fury.list +wget -qO- https://apt.fury.io/nushell/gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/fury-nushell.gpg +echo "deb [signed-by=/etc/apt/keyrings/fury-nushell.gpg] https://apt.fury.io/nushell/ /" | sudo tee /etc/apt/sources.list.d/fury.list sudo apt update sudo apt install nushell which nu diff --git a/cspell.yml b/cspell.yml index 54a45de7e..d40383410 100644 --- a/cspell.yml +++ b/cspell.yml @@ -49,6 +49,7 @@ words: - justfile - lefthook - linewise +- keyrings - deepseek - lspconfig - Cyberboss From 0c10fd8a3deab62c7b407c21f791de4c4da1b831 Mon Sep 17 00:00:00 2001 From: hustcer Date: Sat, 29 Nov 2025 22:36:13 +0800 Subject: [PATCH 39/61] deps: Update actions/checkout to v6 --- .github/workflows/cr.yml | 4 ++-- .github/workflows/loong.yml | 4 ++-- .github/workflows/publish.yml | 6 +++--- .github/workflows/test-msi.yml | 4 ++-- .github/workflows/test-upgrade.yml | 2 +- .github/workflows/test-winget.yml | 6 +++--- .github/workflows/test.yml | 10 +++++----- 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/cr.yml b/.github/workflows/cr.yml index 135c814d1..bd1b10a74 100644 --- a/.github/workflows/cr.yml +++ b/.github/workflows/cr.yml @@ -37,7 +37,7 @@ jobs: As a senior Nushell engineer, perform comprehensive script review with focus on: ### 1. Core Requirements: - - Validate Nu 0.90+ compatibility + - Validate Nu 0.100+ compatibility - Check structured data handling - Verify pipeline efficiency - Assess module organization @@ -55,7 +55,7 @@ jobs: - Parallel execution opportunities **Rules:** - - Target Nu 0.90+ features + - Target Nu 0.100+ features - Highlight data flow vulnerabilities - Suggest structured data optimizations - Keep feedback Nu-specific diff --git a/.github/workflows/loong.yml b/.github/workflows/loong.yml index 5fea5f73c..d42f758b3 100644 --- a/.github/workflows/loong.yml +++ b/.github/workflows/loong.yml @@ -39,7 +39,7 @@ jobs: platforms: all - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Test Install Nushell on Loong64 run: | docker pull --platform=linux/loong64 ${{ matrix.image }} @@ -81,7 +81,7 @@ jobs: platforms: all - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Test Install Nushell on Loong64 run: | docker pull --platform=linux/loong64 ${{ matrix.image }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2c6eddc7a..d6184dbb6 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -25,7 +25,7 @@ jobs: name: Build Nu Pkgs@${{ matrix.os }} steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Setup Nushell uses: hustcer/setup-nu@v3 @@ -69,7 +69,7 @@ jobs: name: Build Nu Pkgs for Other ARCHs steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Setup Nushell uses: hustcer/setup-nu@v3 @@ -108,7 +108,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Setup Nushell uses: hustcer/setup-nu@v3 - name: Calc Tag and Upload Source Archive diff --git a/.github/workflows/test-msi.yml b/.github/workflows/test-msi.yml index b15ec7876..4e9c0e664 100644 --- a/.github/workflows/test-msi.yml +++ b/.github/workflows/test-msi.yml @@ -38,10 +38,10 @@ jobs: runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Checkout Nutest Repo - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: ref: v1.1.0 path: nutest diff --git a/.github/workflows/test-upgrade.yml b/.github/workflows/test-upgrade.yml index 19a3571ca..9d5be19aa 100644 --- a/.github/workflows/test-upgrade.yml +++ b/.github/workflows/test-upgrade.yml @@ -38,7 +38,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Setup Winget run: | diff --git a/.github/workflows/test-winget.yml b/.github/workflows/test-winget.yml index c1c43f351..56d90d211 100644 --- a/.github/workflows/test-winget.yml +++ b/.github/workflows/test-winget.yml @@ -38,7 +38,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Upgrade Winget run: | @@ -75,7 +75,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Setup Nu uses: hustcer/setup-nu@v3 @@ -105,7 +105,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Setup Nu uses: hustcer/setup-nu@v3 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 73b1e15c4..d89298e5f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -74,7 +74,7 @@ jobs: dnf install -y nushell nu -c 'version' - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Run Tests run: nu nu/tests.nu @@ -94,7 +94,7 @@ jobs: sudo apt install nushell nu -c 'version' - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Run Tests run: nu nu/tests.nu @@ -113,7 +113,7 @@ jobs: pacman -U --noconfirm nushell.pkg.tar.zst nu -c 'version' - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Run Tests run: nu nu/tests.nu @@ -143,7 +143,7 @@ jobs: apt install nushell nu -c 'version' - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Run Tests run: nu nu/tests.nu @@ -164,7 +164,7 @@ jobs: platforms: riscv64 - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Test Install Nu on RISC-V run: | docker pull --platform=linux/riscv64 ${{ matrix.image }} From 6a84255543a11778109156f21f0e69d23912de07 Mon Sep 17 00:00:00 2001 From: hustcer Date: Sat, 29 Nov 2025 22:36:36 +0800 Subject: [PATCH 40/61] chore: bump version to 0.109.0 of revision 0 --- meta.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta.json b/meta.json index 19cd8ec81..e53af494f 100644 --- a/meta.json +++ b/meta.json @@ -1,6 +1,6 @@ { "name": "nushell", - "version": "0.108.0", + "version": "0.109.0", "revision": 0, "pkgs": { "deb": true, From 6c7f088c13b72c44cb4a4489cf30403d9e274917 Mon Sep 17 00:00:00 2001 From: hustcer Date: Wed, 3 Dec 2025 07:51:06 +0800 Subject: [PATCH 41/61] chore: bump version to 0.109.1 of revision 0 --- meta.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta.json b/meta.json index e53af494f..743224a68 100644 --- a/meta.json +++ b/meta.json @@ -1,6 +1,6 @@ { "name": "nushell", - "version": "0.109.0", + "version": "0.109.1", "revision": 0, "pkgs": { "deb": true, From f9e872532f2690ba0602e6200dfc6fe4d5b7eb48 Mon Sep 17 00:00:00 2001 From: hustcer Date: Mon, 8 Dec 2025 21:28:19 +0800 Subject: [PATCH 42/61] chore: Fix tests --- tests/common.nu | 4 ++-- tests/test-all.nu | 2 +- tests/test-msi.nu | 2 +- tests/winget-install.nu | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/common.nu b/tests/common.nu index 864bf15c6..9d4b42c26 100644 --- a/tests/common.nu +++ b/tests/common.nu @@ -12,11 +12,11 @@ const BINS = [ ] export const MACHINE_INSTALL_DIR = 'C:\Program Files\nu' -export const USER_INSTALL_DIR = $'($nu.home-path)\AppData\Local\Programs\nu' +export const USER_INSTALL_DIR = $'($nu.home-dir)\AppData\Local\Programs\nu' const ASSETS = [License.rtf README.txt nu.ico bin] -const PROFILE = $'($nu.home-path)\AppData\Local\Microsoft\Windows Terminal\Fragments\nu\nu.json' +const PROFILE = $'($nu.home-dir)\AppData\Local\Microsoft\Windows Terminal\Fragments\nu\nu.json' # Run this command locally or in GitHub runners after installing nu export def check-user-install [install_dir = $USER_INSTALL_DIR: string] { diff --git a/tests/test-all.nu b/tests/test-all.nu index 96bd94f7d..9a11eba0a 100644 --- a/tests/test-all.nu +++ b/tests/test-all.nu @@ -11,7 +11,7 @@ const PREV_VERSION = '0.105.0' const LAST_VERSION = '0.105.1' const MSI_PKG = 'wix\bin\x64\Release\nu-x64.msi' const PER_MACHINE_INSTALL_DIR = 'C:\Program Files\nu' -const PER_USER_INSTALL_DIR = $'($nu.home-path)\AppData\Local\Programs\nu' +const PER_USER_INSTALL_DIR = $'($nu.home-dir)\AppData\Local\Programs\nu' const WINGET_ARGS = [ --silent --ignore-security-hash diff --git a/tests/test-msi.nu b/tests/test-msi.nu index ddfd4aae8..bbff88612 100644 --- a/tests/test-msi.nu +++ b/tests/test-msi.nu @@ -13,7 +13,7 @@ def setup [] { gh release download $release_tag --repo nushell/nightly --pattern $"*-($arch)-*.msi" let msi = ls | where name =~ msi | get name.0 print $'MSI File: ($msi)' - let install_dir = $'($nu.home-path)\AppData\Local\Programs\nu' + let install_dir = $'($nu.home-dir)\AppData\Local\Programs\nu' { msi: $msi, install_dir: $install_dir, release_tag: $release_tag } } diff --git a/tests/winget-install.nu b/tests/winget-install.nu index feebc0bac..a0658e4f2 100644 --- a/tests/winget-install.nu +++ b/tests/winget-install.nu @@ -5,7 +5,7 @@ use common.nu [MACHINE_INSTALL_DIR, USER_INSTALL_DIR] use common.nu [check-user-install, check-local-machine-install, check-version-match, get-latest-tag] -const KOMAC_PATH = $'($nu.home-path)\AppData\Local\Programs\Komac\bin\' +const KOMAC_PATH = $'($nu.home-dir)\AppData\Local\Programs\Komac\bin\' const WINGET_ARGS = [ --silent From 911af6e63da8cd65af12526d2c76e33d0e6a8467 Mon Sep 17 00:00:00 2001 From: hustcer Date: Sun, 4 Jan 2026 20:17:03 +0800 Subject: [PATCH 43/61] chore: Update install guide for deb pkgs --- .github/workflows/loong.yml | 2 +- .github/workflows/test.yml | 6 +++--- README.md | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/loong.yml b/.github/workflows/loong.yml index d42f758b3..a83f2c5de 100644 --- a/.github/workflows/loong.yml +++ b/.github/workflows/loong.yml @@ -95,7 +95,7 @@ jobs: echo 'Acquire::https::Verify-Host "false";' | tee -a /etc/apt/apt.conf.d/99insecure # curl & gpg are not available in debian images, so we install without verifying the gpg key # Add the repository with trusted=yes so that apt does not verify package signatures - echo "deb [trusted=yes] https://apt.fury.io/nushell/ /" | tee /etc/apt/sources.list.d/fury.list + echo "deb [trusted=yes] https://apt.fury.io/nushell/ /" | tee /etc/apt/sources.list.d/fury-nu.list apt update # apt install -y nushell:loongarch64 # Use --force-architecture to override the architecture check diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d89298e5f..2e0ae948d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -89,7 +89,7 @@ jobs: - name: Test Install Nushell DEB Package run: | wget -qO- https://apt.fury.io/nushell/gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/fury-nushell.gpg - echo "deb [signed-by=/etc/apt/keyrings/fury-nushell.gpg] https://apt.fury.io/nushell/ /" | sudo tee /etc/apt/sources.list.d/fury.list + echo "deb [signed-by=/etc/apt/keyrings/fury-nushell.gpg] https://apt.fury.io/nushell/ /" | sudo tee /etc/apt/sources.list.d/fury-nu.list sudo apt update sudo apt install nushell nu -c 'version' @@ -138,7 +138,7 @@ jobs: echo 'Acquire::https::Verify-Host "false";' | tee -a /etc/apt/apt.conf.d/99insecure # curl & gpg are not available in debian images, so we install without verifying the gpg key # Add the repository with trusted=yes so that apt does not verify package signatures - echo "deb [trusted=yes] https://apt.fury.io/nushell/ /" | tee /etc/apt/sources.list.d/fury.list + echo "deb [trusted=yes] https://apt.fury.io/nushell/ /" | tee /etc/apt/sources.list.d/fury-nu.list apt update apt install nushell nu -c 'version' @@ -176,7 +176,7 @@ jobs: echo 'Acquire::https::Verify-Host "false";' | tee -a /etc/apt/apt.conf.d/99insecure # curl & gpg are not available in debian images, so we install without verifying the gpg key # Add the repository with trusted=yes so that apt does not verify package signatures - echo "deb [trusted=yes] https://apt.fury.io/nushell/ /" | tee /etc/apt/sources.list.d/fury.list + echo "deb [trusted=yes] https://apt.fury.io/nushell/ /" | tee /etc/apt/sources.list.d/fury-nu.list apt update apt install nushell nu -c 'version' diff --git a/README.md b/README.md index 057de9a2f..e25b57df9 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Package and release the official Nushell binaries in `deb`, `rpm`, and `apk` etc ```nu wget -qO- https://apt.fury.io/nushell/gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/fury-nushell.gpg -echo "deb [signed-by=/etc/apt/keyrings/fury-nushell.gpg] https://apt.fury.io/nushell/ /" | sudo tee /etc/apt/sources.list.d/fury.list +echo "deb [signed-by=/etc/apt/keyrings/fury-nushell.gpg] https://apt.fury.io/nushell/ /" | sudo tee /etc/apt/sources.list.d/fury-nu.list sudo apt update sudo apt install nushell which nu From 424f753e8aa4186124b334d5fe781f70ef05ea67 Mon Sep 17 00:00:00 2001 From: hustcer Date: Sun, 18 Jan 2026 16:25:39 +0800 Subject: [PATCH 44/61] chore: bump version to 0.110.0 of revision 0 --- meta.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta.json b/meta.json index 743224a68..7136af849 100644 --- a/meta.json +++ b/meta.json @@ -1,6 +1,6 @@ { "name": "nushell", - "version": "0.109.1", + "version": "0.110.0", "revision": 0, "pkgs": { "deb": true, From 42f14ea77272deee78d36c3f3f6ef2d2d91e6abc Mon Sep 17 00:00:00 2001 From: Justin Ma Date: Wed, 4 Feb 2026 22:09:10 +0800 Subject: [PATCH 45/61] fix: Use try-catch to handle winget uninstall errors (#75) The `winget uninstall nushell | complete` pattern fails with exit code -1978335212 (APPINSTALLER_CLI_ERROR_NO_APPLICATIONS_FOUND) when nushell is not installed. This change uses try-catch to gracefully handle the error case. Co-authored-by: Claude Opus 4.5 --- tests/common.nu | 7 ++++++- tests/test-all.nu | 8 ++++---- tests/winget-install.nu | 7 ++++++- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/tests/common.nu b/tests/common.nu index 9d4b42c26..8937860c1 100644 --- a/tests/common.nu +++ b/tests/common.nu @@ -90,7 +90,12 @@ export def check-version-match [version_expected: string, install_dir = $USER_IN } export def get-latest-tag [] { - http get https://api.github.com/repos/nushell/nightly/releases + let headers = if ($env.GITHUB_TOKEN? | is-not-empty) { + { Authorization: $'Bearer ($env.GITHUB_TOKEN)' } + } else { + {} + } + http get -H $headers https://api.github.com/repos/nushell/nightly/releases | sort-by -r created_at | where tag_name =~ nightly | get tag_name?.0? diff --git a/tests/test-all.nu b/tests/test-all.nu index 9a11eba0a..1af95b68f 100644 --- a/tests/test-all.nu +++ b/tests/test-all.nu @@ -33,7 +33,7 @@ def main [--msi(-m), --local] { } export def test-msi-per-user-install [] { - winget uninstall nushell | complete + try { winget uninstall nushell } catch { } print $'Using msiexec to test MSI (ansi g)per-user(ansi reset) installation' print '-------------------------------------------------------------------' msiexec /i $MSI_PKG MSIINSTALLPERUSER=1 /quiet /qn /L*V install.txt @@ -43,7 +43,7 @@ export def test-msi-per-user-install [] { } export def test-msi-per-machine-install [] { - winget uninstall nushell | complete + try { winget uninstall nushell } catch { } print $'(char nl)Using msiexec to test MSI (ansi g)machine scope(ansi reset) installation' print '-------------------------------------------------------------------' msiexec /i $MSI_PKG ALLUSERS=1 /L*V install.txt @@ -53,7 +53,7 @@ export def test-msi-per-machine-install [] { } export def test-winget-per-user-install [--local] { - winget uninstall nushell | complete + try { winget uninstall nushell } catch { } print $'(char nl)Using winget to test MSI (ansi g)user scope(ansi reset) installation' print '-------------------------------------------------------------------' if $local { @@ -83,7 +83,7 @@ export def test-winget-per-user-upgrade [--local] { } export def test-winget-per-machine-install [--local] { - winget uninstall nushell | complete + try { winget uninstall nushell } catch { } print $'(char nl)Using winget to test MSI (ansi g)machine scope(ansi reset) installation' print '-------------------------------------------------------------------' if $local { diff --git a/tests/winget-install.nu b/tests/winget-install.nu index a0658e4f2..494b453d3 100644 --- a/tests/winget-install.nu +++ b/tests/winget-install.nu @@ -43,7 +43,12 @@ export def prepare-manifest [] { } def get-download-url [] { - http get https://api.github.com/repos/nushell/nightly/releases + let headers = if ($env.GITHUB_TOKEN? | is-not-empty) { + { Authorization: $'Bearer ($env.GITHUB_TOKEN)' } + } else { + {} + } + http get -H $headers https://api.github.com/repos/nushell/nightly/releases | sort-by -r created_at | where tag_name =~ nightly | get assets.0.browser_download_url | where $it =~ 'msi' From 9033ee1292bdc8bbc3da0d00f7dd726e994f0407 Mon Sep 17 00:00:00 2001 From: hustcer Date: Sun, 1 Mar 2026 09:33:53 +0800 Subject: [PATCH 46/61] fix: Fix version bump for Nu 0.111 --- nu/bump-ver.nu | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/nu/bump-ver.nu b/nu/bump-ver.nu index c344db220..c9f19a79f 100644 --- a/nu/bump-ver.nu +++ b/nu/bump-ver.nu @@ -30,9 +30,8 @@ export def bump-version [ export def has-ref [ ref: string # The git ref to check ] { - let checkRepo = (do -i { git rev-parse --is-inside-work-tree } | complete) + let checkRepo = git rev-parse --is-inside-work-tree | complete if not ($checkRepo.stdout =~ 'true') { return false } - # Brackets were required here, or error will occur - let parse = (do -i { git rev-parse --verify -q $ref } | complete) - if ($parse.stdout | is-empty) { false } else { true } + let parse = do { ^git rev-parse --verify -q $ref | complete } + ($parse.stdout | is-not-empty) } From 2ea37026ab99d7416ad42b4cedf6ae53a02d4443 Mon Sep 17 00:00:00 2001 From: hustcer Date: Sun, 1 Mar 2026 09:34:13 +0800 Subject: [PATCH 47/61] chore: bump version to 0.111.0 of revision 0 --- meta.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta.json b/meta.json index 7136af849..375ba5460 100644 --- a/meta.json +++ b/meta.json @@ -1,6 +1,6 @@ { "name": "nushell", - "version": "0.110.0", + "version": "0.111.0", "revision": 0, "pkgs": { "deb": true, From 9062c9a0c4ac7ea75a0aa18b5cabee5bcd31c319 Mon Sep 17 00:00:00 2001 From: hustcer Date: Sun, 1 Mar 2026 09:44:20 +0800 Subject: [PATCH 48/61] fix: Try to fix release script for the race condition --- nu/release.nu | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nu/release.nu b/nu/release.nu index 979241c2e..974cb02a5 100644 --- a/nu/release.nu +++ b/nu/release.nu @@ -94,7 +94,9 @@ def create-github-release [ let repo = 'nushell/integrations' let releases = gh release list -R $repo --json name | from json | get name if $version not-in $releases { - gh release create $version -R $repo --title $version + # Use try/catch to handle the race condition when multiple parallel jobs + # try to create the same release simultaneously + try { gh release create $version -R $repo --title $version } } # --clobber Overwrite existing assets of the same name if $arch in $ALPINE_IGNORE { From 90c0dd8ccc814edcafa2b6dad9b80baadc52233d Mon Sep 17 00:00:00 2001 From: hustcer Date: Sun, 1 Mar 2026 09:50:03 +0800 Subject: [PATCH 49/61] chore: Revert ver --- meta.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta.json b/meta.json index 375ba5460..208042d86 100644 --- a/meta.json +++ b/meta.json @@ -1,6 +1,6 @@ { "name": "nushell", - "version": "0.111.0", + "version": "0.110.0", "revision": 0, "pkgs": { "deb": true, @@ -13,4 +13,4 @@ "github": "https://github.com/nushell/nushell", "home": "https://www.nushell.sh", "description": "A new type of shell." -} \ No newline at end of file +} From 3b336880bab952585ebb5a04065f0f85d769abeb Mon Sep 17 00:00:00 2001 From: hustcer Date: Sun, 1 Mar 2026 09:50:12 +0800 Subject: [PATCH 50/61] chore: bump version to 0.111.0 of revision 0 --- meta.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta.json b/meta.json index 208042d86..375ba5460 100644 --- a/meta.json +++ b/meta.json @@ -1,6 +1,6 @@ { "name": "nushell", - "version": "0.110.0", + "version": "0.111.0", "revision": 0, "pkgs": { "deb": true, @@ -13,4 +13,4 @@ "github": "https://github.com/nushell/nushell", "home": "https://www.nushell.sh", "description": "A new type of shell." -} +} \ No newline at end of file From 38c42fb546d29552fc12d2ed4e2fa86723a91057 Mon Sep 17 00:00:00 2001 From: hustcer Date: Sun, 12 Apr 2026 08:15:12 +0800 Subject: [PATCH 51/61] chore: bump version to 0.112.1 of revision 0 --- meta.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta.json b/meta.json index 375ba5460..039fb08e1 100644 --- a/meta.json +++ b/meta.json @@ -1,6 +1,6 @@ { "name": "nushell", - "version": "0.111.0", + "version": "0.112.1", "revision": 0, "pkgs": { "deb": true, From 6fb9852a5b76df35986261be3d0f79893db13f71 Mon Sep 17 00:00:00 2001 From: hustcer Date: Fri, 8 May 2026 00:47:29 +0800 Subject: [PATCH 52/61] chore: bump version to 0.112.2 of revision 0 --- meta.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta.json b/meta.json index 039fb08e1..cd03b87ce 100644 --- a/meta.json +++ b/meta.json @@ -1,6 +1,6 @@ { "name": "nushell", - "version": "0.112.1", + "version": "0.112.2", "revision": 0, "pkgs": { "deb": true, From 3281c0c60bb813be5f1493c8e0cb8baad660c755 Mon Sep 17 00:00:00 2001 From: hustcer Date: Sun, 24 May 2026 10:44:00 +0800 Subject: [PATCH 53/61] chore: bump version to 0.113.0 of revision 0 --- meta.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta.json b/meta.json index cd03b87ce..b1e0032ee 100644 --- a/meta.json +++ b/meta.json @@ -1,6 +1,6 @@ { "name": "nushell", - "version": "0.112.2", + "version": "0.113.0", "revision": 0, "pkgs": { "deb": true, From cee16771362df48d26f74a0bf368b6b47189cc3f Mon Sep 17 00:00:00 2001 From: hustcer Date: Sat, 30 May 2026 10:07:07 +0800 Subject: [PATCH 54/61] chore: bump version to 0.113.1 of revision 0 --- meta.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta.json b/meta.json index b1e0032ee..3cb91a42f 100644 --- a/meta.json +++ b/meta.json @@ -1,6 +1,6 @@ { "name": "nushell", - "version": "0.113.0", + "version": "0.113.1", "revision": 0, "pkgs": { "deb": true, From 0eceb2afa39dbfb6b5e5fadc43cf58d936fa39d1 Mon Sep 17 00:00:00 2001 From: hustcer Date: Tue, 30 Jun 2026 18:25:11 +0800 Subject: [PATCH 55/61] fix: Try to fix MSI install tests --- .github/workflows/test-msi.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-msi.yml b/.github/workflows/test-msi.yml index 4e9c0e664..7d98b8ae4 100644 --- a/.github/workflows/test-msi.yml +++ b/.github/workflows/test-msi.yml @@ -43,7 +43,9 @@ jobs: - name: Checkout Nutest Repo uses: actions/checkout@v6 with: - ref: v1.1.0 + # Includes the updated `returns.results` type annotation needed by + # recent Nushell nightlies. + ref: 097ca6839c861f3f9b7d8b702e92d712b621b8dd path: nutest repository: vyadh/nutest sparse-checkout: nutest/ From 911e0e8ba73425a3f18fb5d19d7877e8e54065af Mon Sep 17 00:00:00 2001 From: hustcer Date: Tue, 30 Jun 2026 18:29:56 +0800 Subject: [PATCH 56/61] fix: Try to fix MSI install tests again --- .github/workflows/test-msi.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-msi.yml b/.github/workflows/test-msi.yml index 7d98b8ae4..09849d87b 100644 --- a/.github/workflows/test-msi.yml +++ b/.github/workflows/test-msi.yml @@ -53,7 +53,9 @@ jobs: - name: Setup Nu uses: hustcer/setup-nu@v3 with: - version: 'nightly' + # This Nu runs nutest. The test itself still downloads and installs + # the latest MSI from nushell/nightly. + version: '0.113.1' - name: Test MSI Install shell: nu {0} From 76b3327db81f090f0114267cffc8753bda2412a9 Mon Sep 17 00:00:00 2001 From: hustcer Date: Sun, 5 Jul 2026 10:43:40 +0800 Subject: [PATCH 57/61] deps: Upgrade actions/checkout to v7 --- .github/workflows/loong.yml | 4 ++-- .github/workflows/publish.yml | 6 +++--- .github/workflows/test-msi.yml | 4 ++-- .github/workflows/test-upgrade.yml | 2 +- .github/workflows/test-winget.yml | 6 +++--- .github/workflows/test.yml | 10 +++++----- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/loong.yml b/.github/workflows/loong.yml index a83f2c5de..61b0a4b00 100644 --- a/.github/workflows/loong.yml +++ b/.github/workflows/loong.yml @@ -39,7 +39,7 @@ jobs: platforms: all - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 - name: Test Install Nushell on Loong64 run: | docker pull --platform=linux/loong64 ${{ matrix.image }} @@ -81,7 +81,7 @@ jobs: platforms: all - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 - name: Test Install Nushell on Loong64 run: | docker pull --platform=linux/loong64 ${{ matrix.image }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d6184dbb6..3d107455e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -25,7 +25,7 @@ jobs: name: Build Nu Pkgs@${{ matrix.os }} steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 - name: Setup Nushell uses: hustcer/setup-nu@v3 @@ -69,7 +69,7 @@ jobs: name: Build Nu Pkgs for Other ARCHs steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 - name: Setup Nushell uses: hustcer/setup-nu@v3 @@ -108,7 +108,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 - name: Setup Nushell uses: hustcer/setup-nu@v3 - name: Calc Tag and Upload Source Archive diff --git a/.github/workflows/test-msi.yml b/.github/workflows/test-msi.yml index 09849d87b..a50109ce7 100644 --- a/.github/workflows/test-msi.yml +++ b/.github/workflows/test-msi.yml @@ -38,10 +38,10 @@ jobs: runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - name: Checkout Nutest Repo - uses: actions/checkout@v6 + uses: actions/checkout@v7 with: # Includes the updated `returns.results` type annotation needed by # recent Nushell nightlies. diff --git a/.github/workflows/test-upgrade.yml b/.github/workflows/test-upgrade.yml index 9d5be19aa..bb092429a 100644 --- a/.github/workflows/test-upgrade.yml +++ b/.github/workflows/test-upgrade.yml @@ -38,7 +38,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - name: Setup Winget run: | diff --git a/.github/workflows/test-winget.yml b/.github/workflows/test-winget.yml index 56d90d211..72cc557ab 100644 --- a/.github/workflows/test-winget.yml +++ b/.github/workflows/test-winget.yml @@ -38,7 +38,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - name: Upgrade Winget run: | @@ -75,7 +75,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - name: Setup Nu uses: hustcer/setup-nu@v3 @@ -105,7 +105,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - name: Setup Nu uses: hustcer/setup-nu@v3 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2e0ae948d..9343c4dad 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -74,7 +74,7 @@ jobs: dnf install -y nushell nu -c 'version' - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 - name: Run Tests run: nu nu/tests.nu @@ -94,7 +94,7 @@ jobs: sudo apt install nushell nu -c 'version' - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 - name: Run Tests run: nu nu/tests.nu @@ -113,7 +113,7 @@ jobs: pacman -U --noconfirm nushell.pkg.tar.zst nu -c 'version' - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 - name: Run Tests run: nu nu/tests.nu @@ -143,7 +143,7 @@ jobs: apt install nushell nu -c 'version' - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 - name: Run Tests run: nu nu/tests.nu @@ -164,7 +164,7 @@ jobs: platforms: riscv64 - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 - name: Test Install Nu on RISC-V run: | docker pull --platform=linux/riscv64 ${{ matrix.image }} From 0a1cd91f8a3c8fe883f5bbc236f343cfbcfc50f7 Mon Sep 17 00:00:00 2001 From: hustcer Date: Sun, 5 Jul 2026 10:43:52 +0800 Subject: [PATCH 58/61] chore: bump version to 0.114.0 of revision 0 --- meta.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta.json b/meta.json index 3cb91a42f..b50e52fe7 100644 --- a/meta.json +++ b/meta.json @@ -1,6 +1,6 @@ { "name": "nushell", - "version": "0.113.1", + "version": "0.114.0", "revision": 0, "pkgs": { "deb": true, From f4625f4f5b399000494961dc1b9e890762918b81 Mon Sep 17 00:00:00 2001 From: Bruce Weirdan Date: Mon, 6 Jul 2026 00:23:13 +0200 Subject: [PATCH 59/61] Import entire `std/assert` module (#76) --- nu/tests.nu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nu/tests.nu b/nu/tests.nu index 65c7b1391..9e1d6bb30 100644 --- a/nu/tests.nu +++ b/nu/tests.nu @@ -1,6 +1,6 @@ #!/usr/bin/env nu -use std assert +use std/assert const NU_VERSION = '0.105.0' From e34d7d20dffbbdabcdc8d944e2653097d0e5cabd Mon Sep 17 00:00:00 2001 From: hustcer Date: Sun, 12 Jul 2026 09:09:27 +0800 Subject: [PATCH 60/61] chore: bump version to 0.114.1 of revision 0 --- meta.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta.json b/meta.json index b50e52fe7..968fb321f 100644 --- a/meta.json +++ b/meta.json @@ -1,6 +1,6 @@ { "name": "nushell", - "version": "0.114.0", + "version": "0.114.1", "revision": 0, "pkgs": { "deb": true, From 92608a26b33a020aef9c3a28f9fd5ed8d89d027d Mon Sep 17 00:00:00 2001 From: hustcer Date: Wed, 22 Jul 2026 13:58:09 +0800 Subject: [PATCH 61/61] chore: Use stable version of nu for workflows --- .github/workflows/test-upgrade.yml | 2 +- .github/workflows/test-winget.yml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-upgrade.yml b/.github/workflows/test-upgrade.yml index bb092429a..e954ab2a0 100644 --- a/.github/workflows/test-upgrade.yml +++ b/.github/workflows/test-upgrade.yml @@ -49,7 +49,7 @@ jobs: - name: Setup Nu uses: hustcer/setup-nu@v3 with: - version: 'nightly' + version: '*' - name: Install Komac Tool shell: cmd diff --git a/.github/workflows/test-winget.yml b/.github/workflows/test-winget.yml index 72cc557ab..4612741d1 100644 --- a/.github/workflows/test-winget.yml +++ b/.github/workflows/test-winget.yml @@ -50,7 +50,7 @@ jobs: - name: Setup Nu uses: hustcer/setup-nu@v3 with: - version: 'nightly' + version: '*' - name: Install Komac Tool shell: cmd @@ -80,7 +80,7 @@ jobs: - name: Setup Nu uses: hustcer/setup-nu@v3 with: - version: 'nightly' + version: '*' - name: Install Komac Tool shell: cmd @@ -110,7 +110,7 @@ jobs: - name: Setup Nu uses: hustcer/setup-nu@v3 with: - version: 'nightly' + version: '*' - name: Install Komac Tool shell: cmd