- Info here
- MAJOR version when you make incompatible API changes,
- MINOR version when you add functionality in a backward-compatible manner, and
- PATCH version when you make backward-compatible bug fixes.
- feat -> new feature
- fix -> bug fix
- docs -> documentation only changes
- style -> changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
- refactor -> code change that neither fixes a bug nor adds a feature
- perf -> code change that improves performance
- test -> adding missing tests or correcting existing tests
- build -> changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
- ci -> changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
- chore -> other changes that don’t modify src or test files
- revert -> reverts a previous commit
- fix(button): jira-1234 fixed minor bug
- chore(root) release v1.0.1
- Readme here
- example
npx lerna version $VERSION --exact --force-publish --no-git-tag-version --no-push --no-changelog --yes
// When run with this flag, lerna version will perform all changes on the current commit,
// instead of adding a new one.
// This is useful during Continuous integration (CI) to reduce the number of commits in the projects history.
// In order to prevent unintended overwrites,
// this command will skip git push (i.e., it implies --no-push).
lerna version --amend
# commit message is retained, and `git push` is skipped.
lerna version -m "chore(release): publish %s"
# commit message = "chore(release): publish v1.0.0"
lerna version -m "chore(release): publish %v"
# commit message = "chore(release): publish 1.0.0"
# When versioning packages independently, no placeholders are replaced
lerna version -m "chore(release): publish"
# commit message = "chore(release): publish
#
# - [email protected]
# - [email protected]"
lerna publish # publish packages that have changed since the last release
lerna publish from-git # explicitly publish packages tagged in the current commit
lerna publish from-package # explicitly publish packages where the latest version is not present in the registry
Lerna will never publish packages which are marked as private ("private": true in the package.json).
- Add dependcy between libs
lerna add button --scope=input
# Build packages using lerna
npx lerna bootstrap
npx lerna version "${RELEASE_TAG}" --no-git-tag-version --no-push --yes
npx lerna run build
# Start local NPM registry
npx verdaccio >> "local_registry.log" &
sleep 10 # probably not needed
# Configure sample user
local username="test123"
local password="test123"
local email="[email protected]"
npx npm-cli-login -u "${username}" -p "${password}" -e "${email}" -r "${local_registry_url}"
# Execute publish in dry-run
npx lerna publish from-package \
--registry "http://localhost:4873" \
--no-git-tag-version --no-push --yes \
--loglevel verbose
npx conventional-changelog --preset angular --release-count 0 --outfile ./CHANGELOG.md --verbose
npx lerna exec --concurrency 1 --stream -- 'conventional-changelog --preset angular --release-count 0 --commit-path ./ --pkg ./package.json --outfile ./CHANGELOG.md --verbose'