Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions nupm/mod.nu
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions nupm/publish.nu
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export def main [
[]
}

mut existing_entry = null
mut existing_entry: oneof<nothing, record> = null

if ($name_matches | length) == 1 {
$existing_entry = ($name_matches | first)
Expand Down Expand Up @@ -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<name: string, path: string, url: string> {
def open-registry-file []: path -> table<name: string, path: string, hash: string> {
let reg_path = $in

let reg_content = try { open $reg_path }
Expand All @@ -245,7 +245,7 @@ def open-reg-pkg-file []: [ path -> table<
version: string
path: string
type: string
info: record<url: string, revision: string>> ] {
info: oneof<nothing, record<url: string, revision: string>>> ] {
let pkg_path = $in

let pkg_content = try { open $pkg_path }
Expand Down
2 changes: 1 addition & 1 deletion nupm/utils/package.nu
Original file line number Diff line number Diff line change
Expand Up @@ -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<path> {
export def list-package-files [pkg_dir: path, pkg: record]: nothing -> list<oneof<path, list<path>>> {
let activation = match $pkg.type {
'module' => $'use ($pkg.name)'
'script' => {
Expand Down
2 changes: 1 addition & 1 deletion tests/mod.nu
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std assert
use std/assert

use ../nupm/utils/dirs.nu
use ../nupm/utils/dirs.nu [ tmp-dir REGISTRY_FILENAME ]
Expand Down
Loading