tessl install tessl/npm-lerna--init@6.6.0Create a new Lerna repo or upgrade an existing repo to the current version of Lerna
Agent Success
Agent success rate when using this tile
75%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.36x
Baseline
Agent success rate without this tile
55%
Build a command-line utility for JavaScript/TypeScript monorepo projects that collects and reports environment diagnostic information to help with issue reporting and troubleshooting.
Create a Node.js script that reports comprehensive environment information for monorepo projects. The tool should:
Collect environment diagnostics by gathering:
Format and display information appropriately:
Integrate with monorepo tooling:
Create a script at src/env-reporter.js that can be executed with node src/env-reporter.js.
The script should leverage monorepo tooling capabilities to gather environment information useful for debugging. At minimum, capture:
The environment reporter successfully retrieves and displays Lerna version and configuration when run in a Lerna monorepo. @test
The reporter outputs environment data in valid JSON format when requested. @test
Running the reporter in a directory without monorepo tooling handles the situation gracefully without crashing. @test
@generates
/**
* Collects environment and configuration information from the monorepo.
* This includes tool versions, Node.js details, and OS information.
*
* @returns {Promise<Object>} Environment diagnostic data
*/
async function gatherEnvironmentInfo() {
// Implementation
}
/**
* Formats environment data for display.
*
* @param {Object} envData - Environment information object
* @param {boolean} jsonFormat - Whether to output as JSON
* @returns {string} Formatted output string
*/
function formatEnvironmentInfo(envData, jsonFormat = false) {
// Implementation
}
module.exports = { gatherEnvironmentInfo, formatEnvironmentInfo };Provides monorepo management and diagnostic capabilities for JavaScript/TypeScript projects.