You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
excerpt: Today, we're releasing version 0.114.0 of Nu. This release adds...
6
+
excerpt: Today, we're releasing version 0.114.0 of Nu. This release brings sharper type checking, POSIX-style `--` option parsing, the new `run` command for pipeline-friendly scripts, and nice built-in support for working with Semantic Versioning.
7
7
---
8
8
9
-
<!-- TODO: complete the excerpt above -->
10
-
11
-
<!-- NOTE: start from the TODO all the way at the bottom (and sort of work your way up) -->
12
-
13
9
# Nushell 0.114.0
14
10
15
-
<!-- TODO: write this excerpt -->
16
-
17
-
Today, we're releasing version 0.114.0 of Nu. This release adds...
11
+
Today, we're releasing version 0.114.0 of Nu. This release brings sharper type checking, POSIX-style `--` option parsing, the new `run` command for pipeline-friendly scripts, and nice built-in support for working with Semantic Versioning.
18
12
19
13
# Where to get it
20
14
@@ -28,41 +22,52 @@ As part of this release, we also publish a set of optional [plugins](https://www
28
22
29
23
# Highlights and themes of this release <JumpToc/>
30
24
31
-
- type system improvements
25
+
## The type checker got new glasses <JumpToc/>
26
+
27
+
[@Bahex](https://github.com/Bahex) continued tightening up Nushell's type system this release. Commands can now infer output types from pipeline input more precisely, `$in` gets typed from the surrounding pipeline, optional values carry their `nothing`-ness more honestly, and `let` bindings in pipelines no longer have to shrug and call everything `any`.
28
+
29
+
This means some mistakes move from "surprise, runtime error" to "hey, maybe fix that before running it". Very rude of the parser, but also very helpful.
30
+
31
+
There is also one important default change: `enforce-runtime-annotations` is now opt-out, so runtime assignment annotations get checked by default.
32
+
33
+
Read the details in the first [type system entry](#type-system-improvements-1), the second [type system entry](#type-system-improvements), and the note about [`enforce-runtime-annotations`](#promoted-enforce-runtime-annotations-to-opt-out).
34
+
35
+
## `--` means "no really, stop parsing flags" <JumpToc/>
36
+
37
+
Thanks to [@fdncred](https://github.com/fdncred), Nushell commands now understand the classic POSIX `--` end-of-options delimiter. If you need to pass `-weird`, `--looks-like-a-flag`, or similar gremlins as plain positional values, you can now do that without trying to outsmart the parser.
That `-Alice` is now just Alice having a dash day, not an accidental flag.
45
+
46
+
Take a look at the main [`--` option parsing entry](#added-posix-style-option-parsing-for-nushell-commands) and the follow-up [`--wrapped` fix](#fixed-a-bug-in-option-parsing).
47
+
48
+
## Scripts can join the pipeline with `run` <JumpToc/>
The new `run` command from [@fdncred](https://github.com/fdncred) lets a Nushell script behave like a pipeline stage. Pipe data in, let the script transform it, and pipe the result onward. Tiny reusable pipeline workers, basically.
37
51
38
-
-`--` support
52
+
```nushell
53
+
"Hello Nushell!" | run shout.nu | str camel-case
54
+
```
55
+
56
+
Scripts can be simple bare pipeline transforms or define a `main` entry point, and they run in isolation so their local bits do not leak back into your session.
Nushell now has semantic version support, also from [@fdncred](https://github.com/fdncred). You can parse SemVer strings, turn them into records, build them back up, sort them correctly, and bump versions without doing string surgery with safety scissors.
48
63
49
-
- semver commands
50
-
- by fdncred
51
-
- #added-semantic-version-parsing-and-commands
64
+
```nushell
65
+
'1.2.3-alpha.1' | into semver | semver bump release
66
+
```
52
67
53
-
<!-- NOTE: if you wanna write a section about a breaking change, when it's a very important one,
54
-
please add the following snippet to have a "warning" banner :)
55
-
> see [an example](https://www.nushell.sh/blog/2023-09-19-nushell_0_85_0.html#pythonesque-operators-removal)
68
+
If your scripts deal with releases, package versions, or "is `1.10.0` bigger than `1.2.0`?" moments, this should make life nicer.
56
69
57
-
```md
58
-
::: warning Breaking change
59
-
See a full overview of the [breaking changes](#breaking-changes)
60
-
:::
61
-
```
62
-
-->
63
-
<!-- NOTE: see https://vuepress.github.io/reference/default-theme/markdown.html#custom-containers
64
-
for the list of available *containers*
65
-
-->
70
+
Read the full SemVer tour [here](#added-semantic-version-parsing-and-commands).
0 commit comments