From 1262909e83db46f36def426577d60045d3671935 Mon Sep 17 00:00:00 2001 From: Antoine Stevan <44101798+amtoine@users.noreply.github.com> Date: Fri, 15 Dec 2023 16:41:24 +0100 Subject: [PATCH] fix the export of modules (#134) depends on - https://github.com/nushell/nushell/pull/11157 - https://github.com/nushell/nupm/pull/47 - https://github.com/amtoine/nu-git-manager/pull/140 - https://github.com/amtoine/nu-git-manager/pull/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 https://github.com/nushell/nushell/pull/11157 and https://github.com/nushell/nupm/pull/47. --- pkgs/nu-git-manager-sugar/nu-git-manager-sugar/git/mod.nu | 2 ++ pkgs/nu-git-manager-sugar/tests/mod.nu | 2 ++ pkgs/nu-git-manager/tests/mod.nu | 2 ++ src/nu-git-manager-sugar/mod.nu | 3 +++ 4 files changed, 9 insertions(+) create mode 100644 src/nu-git-manager-sugar/mod.nu diff --git a/pkgs/nu-git-manager-sugar/nu-git-manager-sugar/git/mod.nu b/pkgs/nu-git-manager-sugar/nu-git-manager-sugar/git/mod.nu index 04d89b5c..25a470ba 100644 --- a/pkgs/nu-git-manager-sugar/nu-git-manager-sugar/git/mod.nu +++ b/pkgs/nu-git-manager-sugar/nu-git-manager-sugar/git/mod.nu @@ -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 diff --git a/pkgs/nu-git-manager-sugar/tests/mod.nu b/pkgs/nu-git-manager-sugar/tests/mod.nu index 188dfe7c..cfe8a2d9 100644 --- a/pkgs/nu-git-manager-sugar/tests/mod.nu +++ b/pkgs/nu-git-manager-sugar/tests/mod.nu @@ -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 { diff --git a/pkgs/nu-git-manager/tests/mod.nu b/pkgs/nu-git-manager/tests/mod.nu index e9f1f63a..2081a46d 100644 --- a/pkgs/nu-git-manager/tests/mod.nu +++ b/pkgs/nu-git-manager/tests/mod.nu @@ -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" diff --git a/src/nu-git-manager-sugar/mod.nu b/src/nu-git-manager-sugar/mod.nu new file mode 100644 index 00000000..f40089d0 --- /dev/null +++ b/src/nu-git-manager-sugar/mod.nu @@ -0,0 +1,3 @@ +export module extra.nu +export module git +export module github.nu