nushell-plugins/guides/complete-version-update-guide.md

1 line
20 KiB
Markdown
Raw Normal View History

# Complete Nushell Version Update Guide\n\n**Version**: 2.0\n**Last Updated**: 2025-11-30\n**Current Nushell Version**: 0.109.0\n**Applies To**: All future Nushell version updates\n\n---\n\n## 📋 Table of Contents\n\n1. [Overview](#overview)\n2. [Quick Start](#quick-start)\n3. [Complete Update Workflow](#complete-update-workflow)\n4. [Plugin Updates](#plugin-updates)\n5. [Distribution Creation](#distribution-creation)\n6. [Troubleshooting](#troubleshooting)\n7. [Reference](#reference)\n\n---\n\n## Overview\n\nThis guide documents the **complete workflow** for updating the nushell-plugins repository to a new Nushell version, including:\n\n- ✅ Downloading and building new Nushell version\n- ✅ Updating all plugin dependencies\n- ✅ Creating distribution packages\n- ✅ Creating bin archives\n- ✅ Validating syntax and compatibility\n- ✅ Generating documentation\n\n### What's Automated\n\nThe update system provides **semi-automated workflows** with strategic manual checkpoints:\n\n- **Fully Automated**: Download, build, dependency updates, packaging\n- **Manual Checkpoints**: Breaking changes review, build verification, final approval\n\n### Directory Structure\n\n```plaintext\nnushell-plugins/\n├── updates/ # Version-specific documentation\n│ ├── 107/ # Nushell 0.107.x updates\n│ ├── 108/ # Nushell 0.108.x updates\n│ └── 109/ # Future versions...\n├── guides/ # General guides (this file)\n├── scripts/ # Automation scripts\n│ ├── complete_update.nu # 🆕 ALL-IN-ONE script\n│ ├── update_nushell_version.nu # Main orchestrator\n│ ├── update_all_plugins.nu # 🆕 Update all plugins\n│ ├── create_full_distribution.nu # 🆕 Complete packaging\n│ └── lib/common_lib.nu # Shared utilities\n├── nushell/ # Nushell source (submodule or downloaded)\n├── nu_plugin_*/ # Custom plugins\n├── distribution/ # Full distribution packages\n└── bin_archives/ # Plugin-only archives\n```\n\n---\n\n## What's New in Version 2.0 (Nushell 0.109.0 Update)\n\n### Smart Version Management\n\n**Problem Solved**: Plugin package versions were being confused with Nushell versions.\n\n**Solution**: Intelligent version detection in `update_all_plugins.nu`:\n\n- **Always updates**: `nu-plugin` dependency (all plugins → 0.109.0)\n- **Selectively updates**: Package version only if it matches previous Nushell version (0.108.0)\n- **Preserves**: All plugin-specific versions (0.1.0, 1.1.0, 1.2.12, etc.)\n\n**Example**:\n\n```plaintext\nBefore: nu_plugin_clipboard package version = 0.108.0\nAfter: nu_plugin_clipboard package version = 0.109.0 ✅ Updated\n\nBefore: nu_plugin_auth package version = 0.1.0\nAfter: nu_plugin_auth package version = 0.1.0 ✅ Preserved\n```\n\n### Script Improvements\n\n1. **String Interpolation Fix** (Rule 18 Compliance)\n - Escaped literal parentheses: `\(DRY RUN\)` instead of `(DRY RUN)`\n\n2. **Template Generation Fix**\n - Now correctly generates `register-plugins.nu` (registers plugins)\n - Previously incorrectly named `install.nu` (should only install binaries)\n\n3. **Bootstrap Auto-Detection**\n - `install.sh` automatically detects local binaries\n - No need to manually specify `--source-path`\n\n### Documentation\n\n- Added `updates/109/UPDATE_SUMMARY.md` - Complete 0.109.0 changes\n- Added `updates/109/MIGRATION_0.109.0.md` - Migration guide\n- Updated `guides/COMPLETE_VERSION_UPDATE_GUIDE.md` - This guide\n\n---\n\n## Quick Start\n\n### Option 1: Complete Update (Recommended)\n\n**Single command to update everything:**\n\n```bash\n# Update to specific version (all-in-one)\n./scripts/complete_update.nu 0.109.0\n\n# Update to latest release\n./scripts/complete_update.nu --latest\n\n# What it does:\n# 1. Downloads Nushell 0.109.0\n# 2. Builds with MCP + all features\n# 3. Updates ALL plugin dependencies (0.109.0)\n# 4. Selectively updates plugin packa