Skip to content

MVM v1.1.0

Latest

Choose a tag to compare

@msmilkshake msmilkshake released this 11 Nov 11:05

✨ New Features

mvm shell <version> — per-terminal version activation (PowerShell only): Activate a specific Node version for the current terminal session only, without touching the global version used by every other window. Perfect for running different apps that need different Node versions side-by-side without constantly switching the global default.

mvm shell --unset / mvm shell off: Instantly revert the current terminal back to the global version without closing it. (Closing the terminal always reverts automatically too, since the override is session-scoped.)

Resolves aliases and partial versions: mvm shell 20, mvm shell lts/*, etc. work the same way mvm use does — resolved against installed versions first.

Non-intrusive PATH override: Implemented via a lightweight PowerShell profile function ($PROFILE) that shadows mvm only inside PowerShell sessions, intercepting just the shell subcommand and transparently forwarding everything else to mvm.ps1 unchanged. mvm.cmd and all cmd.exe/CI/non-PowerShell usage remain completely untouched.

Zero admin requirement, by design: Both the profile write and the required execution-policy adjustment use CurrentUser scope exclusively — fully consistent with MVM's no-admin philosophy (unlike nvm-windows). mvm setup now also persists MVM_ROOT as a user environment variable so the profile function can always locate mvm.ps1.

Visibility in existing commands: mvm current and mvm which now surface an active shell-level override when one is set, showing both the override and the underlying global version for clarity.

New internal command — resolve-shell: Added as a lightweight, output-only resolver used internally by the profile function; not intended for direct interactive use (documented as such).

🛠 Changes to Existing Commands

mvm setup now does more:

  • Adds/repairs the User PATH entries (unchanged behavior).
  • Sets CurrentUser execution policy to RemoteSigned if currently Restricted/Undefined, required for the profile script to load (admin-free).
  • Installs or refreshes a clearly delimited mvm shell function block in the user's PowerShell $PROFILE, safe to re-run without duplicating or clobbering existing profile content.
  • Persists MVM_ROOT for use by the profile function.

📝 Documentation

  • Updated mvm help with mvm shell VERSION and mvm shell --unset usage, plus a note that mvm shell is PowerShell-only and requires opening a new window after running mvm setup.
  • Added a note clarifying that users running both Windows PowerShell 5.1 and PowerShell 7 should run mvm setup once from each host, since $PROFILE resolves to a different file per host version.
  • Updated README with mvm shell usage examples and an explanation of how it differs from mvm use (global, persistent) and .mvmrc/.nvmrc (project-local, automatic).

⚠️ Known Limitations

  • mvm shell only works in PowerShell sessions. cmd.exe, Git Bash, and other shells are unaffected and continue to rely on mvm use for switching versions.
  • On machines where execution policy is enforced machine-wide via Group Policy, CurrentUser scope may be overridden by IT policy — this is a Windows/GPO limitation outside MVM's control, not specific to this feature.