mirror of
https://github.com/ivuorinen/nvm-auto-use.fish.git
synced 2026-02-15 11:50:50 +00:00
feat: refactor plugin architecture, enhance linting, CI & tooling
- Major refactor of core Fish functions for modularity, caching, and error handling - Improved `.editorconfig` and Makefile for stricter formatting and linting standards - Expanded linting support: added EditorConfig checks, auto-install for missing tools, and Makefile targets - Enhanced CI workflow with clearer permissions and job steps in GitHub Actions - Updated documentation in `README.md` and `CLAUDE.md` to reflect new features, advanced developer tools, and contribution guidelines - Improved Node.js version manager detection, switching, and installation logic - Added/updated utility functions for configuration, silent mode, notifications, and version extraction - Various bug fixes, code quality improvements, and expanded test coverage
This commit is contained in:
@@ -35,11 +35,15 @@ function nvm_extract_version -a file_path -d "Extract Node.js version from vario
|
||||
# Standard .nvmrc or .node-version file
|
||||
set -l version (cat "$actual_file" | string trim)
|
||||
if test -n "$version"
|
||||
# Strip leading 'v'
|
||||
set version (string replace -r '^v' '' "$version")
|
||||
# Handle nvm aliases
|
||||
switch "$version"
|
||||
case 'lts/*' lts latest stable node
|
||||
if command -q nvm
|
||||
set version (nvm version-remote "$version" 2>/dev/null | string replace 'v' '')
|
||||
else if command -q node
|
||||
set version (node -v 2>/dev/null | string replace -r '^v' '')
|
||||
end
|
||||
end
|
||||
echo "$version"
|
||||
|
||||
Reference in New Issue
Block a user