repositories / pi-ext

pi-ext

bugabingas pi extensions

owned by bugabinga

fix(nu-bang): support nushell 0.114 tests

0e10f47298695d1ed51940d42825d4b98c50ca32

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Changed files (3)

extensions/nu-bang/__tests__/real-world-full.test.ts

Modified
99 99 {name: "nuon", value: (open config.nuon | get ports | math max | into string)}
100 100 {name: "path-parse", value: ("themes/nu-themes/tokyo-night.nu" | path parse | get stem)}
101 101 {name: "path-exists", value: (["alpha.nu" "missing.nu" "beta.txt"] | where ($it | str ends-with ".nu") and ($it | path exists) | str join ",")}
102 - {name: "update", value: (open people.json | update name { str upcase } | first | get name)}
102 + {name: "update", value: (open people.json | update name { str uppercase } | first | get name)}
103 103 {name: "insert", value: (open people.json | insert senior {|r| $r.score >= 95 } | where senior == true | get name | str join ":")}
104 104 {name: "reduce", value: (open people.json | get score | reduce {|n acc| $acc + $n } | into string)}
105 105 {name: "each", value: ([1 2 3] | each {|n| {n: $n, double: ($n * 2)} } | where double == 6 | length | into string)}
106 106 {name: "par-each", value: ([1 2 3 4] | par-each {|n| $n * $n } | sort | to json --raw)}
107 107 {name: "match", value: (match "prod" { "dev" => "loose", "prod" => "strict", _ => "unknown" })}
108 - {name: "def", value: (do { def slug [s: string] { $s | str downcase | str replace --all " " "-" }; slug "Hello Nu World" })}
108 + {name: "def", value: (do { def slug [s: string] { $s | str lowercase | str replace --all " " "-" }; slug "Hello Nu World" })}
109 109 {name: "module", value: (do { use ./alpha.nu greet; greet Ada })}
110 110 {name: "from-json", value: ('{"items":[{"id":1},{"id":2}]}' | from json | get items.id | math sum | into string)}
111 111 {name: "markdown", value: (open people.json | select name score | first 2 | to md | str contains "| Ada | 99 |" | into string)}

mise.lock

Modified
1 1 # @generated - this file is auto-generated by `mise lock` https://mise.en.dev/dev-tools/mise-lock.html
3 -[[tools."aqua:nushell/nushell"]]
4 -version = "0.112.2"
5 -backend = "aqua:nushell/nushell"
7 -[tools."aqua:nushell/nushell"."platforms.linux-arm64"]
8 -checksum = "sha256:c25a713f4c10bd886162c62c278db6cf8a657754be53d33379af70fbadab07b8"
9 -url = "https://github.com/nushell/nushell/releases/download/0.112.2/nu-0.112.2-aarch64-unknown-linux-gnu.tar.gz"
11 -[tools."aqua:nushell/nushell"."platforms.linux-arm64-musl"]
12 -checksum = "sha256:ab32bb605cd11a7d9cfd45c3cb19f6141a724e204b20531802bacd9eb659879b"
13 -url = "https://github.com/nushell/nushell/releases/download/0.112.2/nu-0.112.2-aarch64-unknown-linux-musl.tar.gz"
15 -[tools."aqua:nushell/nushell"."platforms.linux-x64"]
16 -checksum = "sha256:d9c0ba0938beed6148c8a354c45612c0979d7a787794b8dd13e866ca3b571375"
17 -url = "https://github.com/nushell/nushell/releases/download/0.112.2/nu-0.112.2-x86_64-unknown-linux-musl.tar.gz"
19 -[tools."aqua:nushell/nushell"."platforms.linux-x64-baseline"]
20 -checksum = "sha256:d9c0ba0938beed6148c8a354c45612c0979d7a787794b8dd13e866ca3b571375"
21 -url = "https://github.com/nushell/nushell/releases/download/0.112.2/nu-0.112.2-x86_64-unknown-linux-musl.tar.gz"
23 -[tools."aqua:nushell/nushell"."platforms.linux-x64-musl"]
24 -checksum = "sha256:d9c0ba0938beed6148c8a354c45612c0979d7a787794b8dd13e866ca3b571375"
25 -url = "https://github.com/nushell/nushell/releases/download/0.112.2/nu-0.112.2-x86_64-unknown-linux-musl.tar.gz"
27 -[tools."aqua:nushell/nushell"."platforms.linux-x64-musl-baseline"]
28 -checksum = "sha256:d9c0ba0938beed6148c8a354c45612c0979d7a787794b8dd13e866ca3b571375"
29 -url = "https://github.com/nushell/nushell/releases/download/0.112.2/nu-0.112.2-x86_64-unknown-linux-musl.tar.gz"
31 -[tools."aqua:nushell/nushell"."platforms.macos-arm64"]
32 -checksum = "sha256:a61806761db7bc2eddfc313d5ec496c92776a37124bc64a3036374bd55e8c881"
33 -url = "https://github.com/nushell/nushell/releases/download/0.112.2/nu-0.112.2-aarch64-apple-darwin.tar.gz"
35 -[tools."aqua:nushell/nushell"."platforms.macos-x64"]
36 -checksum = "sha256:8de1dc4a918a1af29fce75d263a8f673f16d35c04ebaa5e3c3ac4ce1eb154f3f"
37 -url = "https://github.com/nushell/nushell/releases/download/0.112.2/nu-0.112.2-x86_64-apple-darwin.tar.gz"
39 -[tools."aqua:nushell/nushell"."platforms.macos-x64-baseline"]
40 -checksum = "sha256:8de1dc4a918a1af29fce75d263a8f673f16d35c04ebaa5e3c3ac4ce1eb154f3f"
41 -url = "https://github.com/nushell/nushell/releases/download/0.112.2/nu-0.112.2-x86_64-apple-darwin.tar.gz"
43 -[tools."aqua:nushell/nushell"."platforms.windows-x64"]
44 -checksum = "sha256:db57750ec878365135e7baebee9f5ec74b84c80158ed0168f1ccbe15d6ec251d"
45 -url = "https://github.com/nushell/nushell/releases/download/0.112.2/nu-0.112.2-x86_64-pc-windows-msvc.zip"
47 -[tools."aqua:nushell/nushell"."platforms.windows-x64-baseline"]
48 -checksum = "sha256:db57750ec878365135e7baebee9f5ec74b84c80158ed0168f1ccbe15d6ec251d"
49 -url = "https://github.com/nushell/nushell/releases/download/0.112.2/nu-0.112.2-x86_64-pc-windows-msvc.zip"
51 3 [[tools.biome]]
52 4 version = "2.4.15"
53 5 backend = "aqua:biomejs/biome"

mise.toml

Modified
8 8 biome = "2.4.15"
9 9 dprint = "0.54.0"
10 10 markdownlint-cli2 = "0.22.1"
11 -"aqua:nushell/nushell" = "0.112.2"
13 -[settings]
14 -unix_default_inline_shell_args = "nu -c"
15 -windows_default_inline_shell_args = "nu -c"
17 12 [tasks.default]
18 13 description = "List tasks"
48 43 [tasks.test]
49 44 description = "Run tests"
45 +tools."aqua:nushell/nushell" = "0.114.0"
50 46 depends = ["install"]
51 47 usage = '''
52 48 arg "[args]" var=#true