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/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' => { 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 ]