- Add `show-arguments` recipe documenting all version update commands - Add `complete-update-interactive` recipe for manual confirmations - Maintain `complete-update` as automatic mode (no prompts) - Update `update-help` to reference new recipes and modes - Document 7-step workflow and step-by-step differences Changes: - complete-update: Automatic mode (recommended for CI/CD) - complete-update-interactive: Interactive mode (with confirmations) - show-arguments: Complete documentation of all commands and modes - Both modes share same 7-step workflow with different behavior in Step 4
5.4 KiB
5.4 KiB
Nushell 0.108.0 Quick Reference Card
Release: 2025-10-15 | Version: 0.108.0
🔴 Critical Breaking Changes (Action Required)
1. into value → detect type
# ❌ OLD (0.107)
$data | into value
# ✅ NEW (0.108.0)
$data | update cells {detect type} # For table cells
$value | detect type # For non-tables
$custom_value | into value # For plugin values (NEW)
2. Stream Error Collection
# ❌ OLD (0.107)
let results = $stream | collect
# ✅ NEW (0.108.0)
let results = try {
$stream | collect
} catch { |err|
[] # or handle error
}
3. format bits Endian
# ✅ NEW (0.108.0) - Be explicit
format bits --endian native # Pre-0.107 behavior
format bits --endian big # 0.107 default
format bits --endian little # Little endian
🟡 Polars Plugin Changes
# ❌ REMOVED
polars fetch # No replacement
# ⚠️ REQUIRES FLAG
polars pivot --stable # Must be explicit
🟢 New Features
MCP Server (AI Agents)
# Compile with MCP support
cargo build --features mcp
# Start as MCP server
nu --mcp
Inline Completions
# Simple inline completions
def deploy [env: string@[dev staging prod]] {
print $"Deploying to ($env)"
}
# With const variable
const environments = [dev staging prod]
def deploy [env: string@$environments] {
print $"Deploying to ($env)"
}
New Date/Time Specifiers
date now | format date "%J" # 20251015 (compact date)
date now | format date "%Q" # 143022 (compact time)
date now | format date "%J%Q" # 20251015143022 (sortable)
Enhanced Commands
# which - list all commands
which # No args = list all
# HTTP metadata (no --full needed)
let response = http get $url
$response | metadata # Headers now included
# metadata merge
$value | metadata set --merge {priority: 1, tag: "important"}
# each flatten
$data | each --flatten { |item| process $item }
# compact empty improvements
$data | compact --empty # Now recognizes 0-byte binary as empty
🧪 Experimental Features
Pipefail (Opt-in)
# Enable
$env.config.experimental = { pipefail: true }
# Or command line
nu --experimental-options='pipefail'
# Effect
^false | echo ''
$env.LAST_EXIT_CODE # Now returns 1 (was 0)
Runtime Type Checking (Opt-in)
# Enable
$env.config.experimental = { enforce-runtime-annotations: true }
# Effect
let x: int = "not a number" # Now throws runtime error
Reorder Cell Paths (Now Default/Opt-out)
# Disable if needed
$env.config.experimental = { reorder-cell-paths: false }
# Default = enabled (performance optimization)
🪟 Windows Improvements
# Device paths now work
open \\.\NUL
save \\.\CON
source NUL
# UNC paths no longer get trailing \
\\server\share # Not \\server\share\
🛠️ Build Changes
# Network commands now optional
cargo build --no-default-features --features network
# MCP server support
cargo build --features mcp
📋 Migration Checklist
- Find all
into valueusage → Replace withdetect typeor keep for plugin values - Add try-catch around stream collections
- Update
polars fetchcalls → Remove (no replacement) - Add
--stabletopolars pivotcalls - Add
--endianflag toformat bitscalls - Test chained power operations (
2 ** 3 ** 4now right-associative) - Update custom builds to add
--features network - Test on Windows if applicable (UNC/device paths)
- Consider enabling experimental features for testing
- Update plugin implementations for CustomValue enhancements
🔍 Find Breaking Changes in Your Code
# Search for problematic patterns
rg "into value" . --type nu
rg "polars fetch" . --type nu
rg "format bits" . --type nu | grep -v "endian"
# Test with experimental features
nu --experimental-options='pipefail,enforce-runtime-annotations' script.nu
📊 Using the Data File
# Load module
use nushell_0.108.0_changes.nu *
# Get all changes
get-changes
# Get high impact changes only
get-high-impact-changes
# Get experimental features
get-experimental-features
# Search for specific changes
search-changes "into value"
# Generate migration report
generate-migration-report
🎯 Priority Levels
| Priority | Changes | Action |
|---|---|---|
| HIGH | into value rename, Stream errors, Polars fetch |
Must fix immediately |
| MEDIUM | format bits endian, Network builds, Power operator |
Should address |
| LOW | Windows paths, Completions, HTTP metadata, Date formats | Nice to have |
📚 Resources
- Full Docs:
NUSHELL_0.108.0_CHANGES.md - Data File:
nushell_0.108.0_changes.nu - Summary:
NUSHELL_0.108.0_SUMMARY.md - Release: https://www.nushell.sh/blog/2025-10-15-nushell_v0_108_0.html
- GitHub: https://github.com/nushell/nushell/releases/tag/0.108.0
🚀 Quick Migration (Most Users)
# 1. Update into value
rg "into value" . --type nu
# Replace: | update cells {detect type}
# 2. Add error handling
# Before: let x = $stream | collect
# After: let x = try { $stream | collect } catch { [] }
# 3. Fix polars (if using)
# Remove: polars fetch
# Update: polars pivot → polars pivot --stable
# 4. Test
nu your_script.nu
Most migrations complete in < 30 minutes!
Created: 2025-10-18 | Document Version: 1.0