tessl install tessl/pypi-nodeenv@1.9.0Node.js virtual environment builder for creating isolated Node.js environments
Agent Success
Agent success rate when using this tile
80%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.25x
Baseline
Agent success rate without this tile
64%
A command-line tool that manages npm installations across different versions in isolated environments.
--npm-version 8.19.2, it installs exactly npm version 8.19.2 in the target directory @test--npm-version latest, it fetches and installs the latest available npm version @test--cleanup-legacy flag is set and npm 0.x is detected, the tool removes old npm 0.x artifacts before installing @test--cleanup-legacy flag is not set, the tool skips cleanup operations @test@generates
def install_npm(target_dir: str, npm_version: str, cleanup_legacy: bool = True) -> None:
"""
Installs the specified npm version into the target directory.
Args:
target_dir: Directory where npm should be installed
npm_version: Version string (e.g., '8.19.2', 'latest')
cleanup_legacy: Whether to cleanup legacy npm 0.x installations
Raises:
ValueError: If target_dir doesn't exist or npm_version is invalid
RuntimeError: If installation fails
"""
pass
def get_latest_npm_version() -> str:
"""
Fetches the latest npm version from the npm registry.
Returns:
Version string of the latest npm release
Raises:
RuntimeError: If unable to fetch version information
"""
pass
def set_npm_environment(target_dir: str) -> dict:
"""
Creates environment variables for npm isolation.
Args:
target_dir: The npm installation directory
Returns:
Dictionary of environment variables to set
"""
pass
def cleanup_npm_legacy(target_dir: str) -> None:
"""
Removes legacy npm 0.x installation artifacts.
Args:
target_dir: Directory containing the npm installation
"""
passPython package for Node.js virtual environment management with npm installation capabilities.
@satisfied-by