nushell/crates/nu-std/std/mod.nu
Douglas b1379b2b14
Fix namespace collision in std and nupm (#14009)
# Description

Fxes https://github.com/nushell/nupm/issues/102

Not loading `std` at startup has caused an issue with nupm and std where
the `dirs` module name clashes and nupm won't load. This was technically
a preexisting bug that was previously masked. This could have been fixed
(and also should be) by changing the import statement in nupm, but the
potential for collision would remain in other (user) modules.

This PR explicitly sets the relative path for the import statements in
`std/mod.nu` so that there are no collisions.

# User-Facing Changes

Bugfix

# Tests + Formatting

- 🟢 `toolkit fmt`
- 🟢 `toolkit clippy`
- 🟢 `toolkit test`
- 🟢 `toolkit test stdlib`

# After Submitting

N/A
2024-10-05 14:55:47 -05:00

29 lines
535 B
Plaintext

# std.nu, `used` to load all standard library components
# Top-level commands: ellie, repeat, null-device, and "path add"
export use lib *
# std submodules
export module ./assert
export module ./bench
export module ./dt
export module ./formats
export module ./help
export module ./input
export module ./iter
export module ./log
export module ./math
export module ./xml
# Load main dirs command and all subcommands
export use ./dirs main
export module ./dirs {
export use ./dirs [
add
drop
next
prev
goto
]
}