Create a new Lerna repo or upgrade an existing repo to the current version of Lerna
75
Build a Node.js script that performs version releases for a monorepo and attaches build metadata to the released versions.
Your task is to create a release automation script for a monorepo that can bump package versions and add custom build metadata (such as CI build numbers or git commit SHAs) to the version numbers in a semver-compatible format.
The script should:
patch, minor, or major--build-metadata flag+ prefix (e.g., 1.2.3+build.456)# Basic patch release
node release.js patch
# Minor release with build number
node release.js minor --build-metadata build.123
# Major release with git commit SHA
node release.js major --build-metadata sha.abc1234patch bump without build metadata successfully increments the patch version @testminor bump with --build-metadata build.123 produces a version ending in +build.123 @testmajor bump with --build-metadata ci.456.abc789 produces a version ending in +ci.456.abc789 @test@generates
Provides monorepo management and versioning capabilities including support for semver-compatible build metadata.
Install with Tessl CLI
npx tessl i tessl/npm-lerna--initdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10