Skip to content

Commit

Permalink
fix the export of modules (#134)
Browse files Browse the repository at this point in the history
depends on
- nushell/nushell#11157
- nushell/nupm#47
- #140
- #141

## description
as directory modules won't export the modules next to any `mod.nu`, this
PR adds `export module` calls to `nu-git-manager-sugar` and the tests,
making the source base compatible again with
nushell/nushell#11157 and
nushell/nupm#47.
  • Loading branch information
amtoine authored Dec 15, 2023
1 parent 96bb3a7 commit 1262909
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkgs/nu-git-manager-sugar/nu-git-manager-sugar/git/mod.nu
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ use ../completions/nu-complete.nu [
GIT_QUERY_TABLES, GIT_STRATEGIES, git-query-tables, get-remotes, get-branches, get-strategies
]

export module prompt.nu

# get the commit hash of any revision
#
# ## Examples
Expand Down
2 changes: 2 additions & 0 deletions pkgs/nu-git-manager-sugar/tests/mod.nu
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ use std assert
use ../../../tests/common/import.nu ["assert imports"]
use ../../../tests/common/setup.nu [get-random-test-dir]

export module git.nu

const MODULE = "nu-git-manager-sugar"

export module imports {
Expand Down
2 changes: 2 additions & 0 deletions pkgs/nu-git-manager/tests/mod.nu
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ use ../../../pkgs/nu-git-manager/nu-git-manager/fs/dir.nu [clean-empty-directori

use ../../../tests/common/setup.nu [get-random-test-dir]

export module gm.nu

export module path {
export def sanitization [] {
assert equal ('\foo\bar' | path sanitize) "/foo/bar"
Expand Down
3 changes: 3 additions & 0 deletions src/nu-git-manager-sugar/mod.nu
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export module extra.nu
export module git
export module github.nu

0 comments on commit 1262909

Please sign in to comment.