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%
Build a Python tool that automates the setup of isolated Node.js development environments with package dependency management.
Your tool must implement the following functionality:
Create a function that sets up a new isolated Node.js environment in a specified directory. The environment should:
Implement functionality to:
express@4.18.0)Provide a way to update packages in an existing environment from a requirements file without recreating the entire environment.
express@4.18.0 and lodash@4.17.21 successfully installs both packages @testdef setup_environment(env_dir: str, node_version: str = 'latest', requirements_file: str = None) -> None:
"""
Create an isolated Node.js environment.
Args:
env_dir: Directory path where the environment will be created
node_version: Node.js version to install (default: 'latest')
requirements_file: Optional path to requirements file for package installation
"""
pass
def export_packages(env_dir: str, output_file: str, local_only: bool = False) -> None:
"""
Export installed packages to a requirements file.
Args:
env_dir: Directory path of the Node.js environment
output_file: Path to output requirements file
local_only: If True, only export locally installed packages
"""
pass
def update_packages(env_dir: str, requirements_file: str) -> None:
"""
Update packages in an existing environment from a requirements file.
Args:
env_dir: Directory path of the existing Node.js environment
requirements_file: Path to requirements file with package specifications
"""
pass@generates
Provides Node.js virtual environment creation and management capabilities.
@satisfied-by