From 11ca8c147db7b8c268d084a27ba297990ae3acba Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Tue, 7 Jul 2026 23:49:09 +0200 Subject: [PATCH 1/2] Fix submodule usage according to nushell/nushell#18303 --- nupm/mod.nu | 12 ++++++------ tests/mod.nu | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/nupm/mod.nu b/nupm/mod.nu index 9b4f79d..f2626c5 100644 --- a/nupm/mod.nu +++ b/nupm/mod.nu @@ -7,12 +7,12 @@ use utils/dirs.nu [ use utils/registry.nu open-index -export module install.nu -export module publish.nu -export module registry.nu -export module search.nu -export module status.nu -export module test.nu +export use install.nu +export use publish.nu +export use registry.nu +export use search.nu +export use status.nu +export use test.nu export-env { diff --git a/tests/mod.nu b/tests/mod.nu index 5c710fc..71dd41f 100644 --- a/tests/mod.nu +++ b/tests/mod.nu @@ -1,4 +1,4 @@ -use std assert +use std/assert use ../nupm/utils/dirs.nu use ../nupm/utils/dirs.nu [ tmp-dir REGISTRY_FILENAME ] From c4b71c924bf881c3d521f52df9ef50d834474feb Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Tue, 7 Jul 2026 23:53:36 +0200 Subject: [PATCH 2/2] Fix type annotations for changes in nushell/nushell#18450 --- nupm/publish.nu | 6 +++--- nupm/utils/package.nu | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/nupm/publish.nu b/nupm/publish.nu index a85f82c..606a6c7 100644 --- a/nupm/publish.nu +++ b/nupm/publish.nu @@ -81,7 +81,7 @@ export def main [ [] } - mut existing_entry = null + mut existing_entry: oneof = null if ($name_matches | length) == 1 { $existing_entry = ($name_matches | first) @@ -225,7 +225,7 @@ def get-registry-path []: string -> path { $env.NUPM_REGISTRIES | get -o $registry | default ($registry | path expand) } -def open-registry-file []: path -> table { +def open-registry-file []: path -> table { let reg_path = $in let reg_content = try { open $reg_path } @@ -245,7 +245,7 @@ def open-reg-pkg-file []: [ path -> table< version: string path: string type: string - info: record> ] { + info: oneof>> ] { let pkg_path = $in let pkg_content = try { open $pkg_path } diff --git a/nupm/utils/package.nu b/nupm/utils/package.nu index be6e804..0adf94c 100644 --- a/nupm/utils/package.nu +++ b/nupm/utils/package.nu @@ -36,7 +36,7 @@ export def open-package-file [dir: path] { # Lists files of a package # # This will be useful for file integrity checks -export def list-package-files [pkg_dir: path, pkg: record]: nothing -> list { +export def list-package-files [pkg_dir: path, pkg: record]: nothing -> list>> { let activation = match $pkg.type { 'module' => $'use ($pkg.name)' 'script' => {