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-1/

Monorepo Dependency Version Updater

Build a tool that automatically updates dependency versions across packages in a monorepo when package versions change. The tool should identify which packages depend on updated packages and synchronize their dependency declarations.

Capabilities

Dependent Package Discovery

  • Given a monorepo with package-b depending on package-a, when querying dependents of package-a, the tool returns ["package-b"] @test
  • Given a package with no dependents in the monorepo, the tool returns an empty array @test

Cross-Package Version Updates

  • Given package-a at version 1.0.0 that is updated to 2.0.0, and package-b that depends on package-a, when synchronizing versions, package-b's dependency is updated to reference ^2.0.0 @test
  • Given multiple packages depending on package-a, when package-a's version is updated, all dependent packages' dependencies are updated to the new version @test

Batch Version Management

  • Given a monorepo with 5 packages, when performing a "minor" version bump on all packages, each package version is incremented by 0.1.0 @test
  • Given changed packages in a monorepo, when requesting version updates only for changed packages, only those packages are versioned @test

Implementation

@generates

API

/**
 * Finds all packages in the monorepo that depend on the specified package
 * @param {string} packageName - The name of the package to check
 * @returns {Promise<string[]>} Array of dependent package names
 */
async function findDependents(packageName) {
  // IMPLEMENTATION HERE
}

/**
 * Synchronizes dependency version references across packages after a version update
 * @param {string} packageName - The package that was updated
 * @param {string} newVersion - The new version of the package
 * @returns {Promise<void>}
 */
async function syncDependencyVersions(packageName, newVersion) {
  // IMPLEMENTATION HERE
}

/**
 * Performs version bumping on packages in the monorepo
 * @param {Object} options - Version bump options
 * @param {string} options.bump - Version bump type: 'major', 'minor', or 'patch'
 * @param {boolean} options.changedOnly - If true, only version packages with changes since last release
 * @returns {Promise<Map<string, string>>} Map of package names to their new versions
 */
async function bumpVersions(options) {
  // IMPLEMENTATION HERE
}

module.exports = {
  findDependents,
  syncDependencyVersions,
  bumpVersions,
};

Dependencies { .dependencies }

Lerna { .dependency }

Provides monorepo management and versioning capabilities, including package discovery, version bumping, change detection, and dependency graph analysis.

@satisfied-by

Version

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