CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/npm-lerna--init

tessl install tessl/npm-lerna--init@6.6.0

Create 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%

task.mdevals/scenario-8/

Monorepo Task Runner

Build a command-line tool that runs tasks across multiple packages in a monorepo with filtering and output aggregation capabilities.

Requirements

Your tool should:

  1. Execute a specified npm script across all packages in a monorepo
  2. Support filtering packages by name pattern (scope)
  3. Support excluding specific packages from execution (ignore)
  4. Return results indicating which packages succeeded or failed

The tool accepts:

  • A script name to execute (e.g., "build", "test", "lint")
  • Optional scope patterns to include specific packages
  • Optional ignore patterns to exclude specific packages
  • Optional working directory path

The tool returns:

  • Overall success status
  • Results array with per-package execution outcomes

Test Cases

  • Running a script across all packages without filters succeeds and executes in all packages @test
  • Running a script with scope filter only executes in matching packages @test
  • Running a script with ignore filter excludes specified packages @test
  • Running a script that fails in one package reports the failure correctly @test

Implementation

@generates

API

/**
 * Executes an npm script across multiple packages in a monorepo
 *
 * @param {string} scriptName - The npm script to run (e.g., "build", "test")
 * @param {Object} options - Configuration options
 * @param {string[]} [options.scope] - Package name patterns to include
 * @param {string[]} [options.ignore] - Package name patterns to exclude
 * @param {string} [options.cwd] - Working directory containing the monorepo
 * @returns {Promise<{success: boolean, results: Array<{package: string, success: boolean, error?: string}>}>}
 */
async function runScript(scriptName, options) {
  // IMPLEMENTATION HERE
}

module.exports = {
  runScript
};

Dependencies { .dependencies }

lerna { .dependency }

Provides monorepo management and task execution capabilities.

@satisfied-by

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
npmpkg:npm/@lerna/init@6.6.x
tile.json