Releases: lerna/lerna
v2.1.0
v2.1.0 (2017-08-24)
🚀 Enhancement
- #922 Support
--conventional-commits
in fixed versioning mode. (@jezzay) - #960 Improve support for semver prerelease identifiers when publishing. (@shawnbot)
🐛 Bug Fix
- #940 Improve bootstrap performance with
--include-filtered-dependencies
in large, cyclic repos. (@lukebatchelor) - #943 Return error and exit on invalid command. (@Siilwyn)
- #965 Avoid false positives during integration test filtering. (@darrylhodgins)
- #976 Bump load-json-file. (@anfedorov)
- #982 Exit properly when there is nothing to publish. (@evocateur)
📝 Documentation
- #921 Fixed spelling mistake in a comment for Command.js. (@dlmr)
- #978 Add root package.json and CI setup sections to FAQ. (@Andarist)
- #981 Add troubleshooting info for GitHub lightweight tags. (@jezzay)
🏠 Internal
- #934 Platform independent integration tests. (@jezzay)
- #946 Swallow promise rejection in registerChild as it is handled via callback. (@viliusl)
- #973 Update LICENSE. (@yanca018)
Committers: 11
v2.0.0
v2.0.0 (2017-07-06)
🎉 It's happening! 🎉
💥 Breaking Change
- #904 Improved --canary functionality. (@Craga89)
--canary
now bumps the generated version to the next semver minor, and accepts a value (e.g.--canary=beta
) to override the default "alpha" tag.
🚀 Enhancement
- #899 Support Yarn workspaces to replace bootstrap command. (@bestander)
- #834 Pass extra arguments to npmClient during bootstrap. (@xaka)
- #873 Add root path dir environment variable to
lerna run
. (@yisraelx) - #822 Add --since flag to all commands that accept --scope. (@treshugart)
- #806 Allow custom yarn mutex from lerna.json config. (@ChristopheVandePoel)
- #868 lerna run: Don't error if no scoped packages are matched. (@ricky)
- #835 Flag for exec to bail upon child execution error. (@rsolomon)
🐛 Bug Fix
- #857 Print n/a when a package has no version key.. (@ben-eb)
- #897 Run yarn in non-interactive mode. (@tricoder42)
- #898 Fix issue where Yargs default would override durable options. (@treshugart)
- #846 Do not log private packages as published. (@evocateur)
- #845 Preserve tag summary with
lerna publish --message
. (@evocateur) - #844 All CLI options should be configurable in lerna.json. (@evocateur)
📝 Documentation
- #840 Update publish docs in README. (@shilman)
- #836 Add semver notes to bootstrap command docs. (@loklaan)
🏠 Internal
- #861 chore(travis): test against node 8 and npm 5. (@douglasduteil)
Committers: 15
- Ben Briggs (ben-eb)
- Craig Michael Thompson (Craga89)
- Daniel Stockman (evocateur)
- Douglas Duteil (douglasduteil)
- Konstantin Raev (bestander)
- Lochlan Bunn (loklaan)
- Michael Shilman (shilman)
- Pavel Strashkin (xaka)
- Ricky Rivera (ricky)
- Ross Solomon (rsolomon)
- Simen Bekkhus (SimenB)
- Tomáš Ehrlich (tricoder42)
- Trey Shugart (treshugart)
- ChristopheVandePoel
- yisraelx
v2.0.0-rc.5
v2.0.0-rc.5 (2017-05-22)
This is the last release candidate.
We need to fix #789 before we can release v2.0.0
. All contributions are appreciated!
💥 Breaking Change
-
#807 Change exit codes for
updated
andpublish
. (@koddsson)It is now possible to run
lerna publish
in CI unconditionally, only publishing when changes are actually detected, and never failing when it decides to not publish anything.Previously:
lerna publish
when there are no updates to publish would throw an errorlerna updated
when there are no updates wouldexit 0
, making it ineffective as a chained filter (e.g.,lerna updated && lerna publish
)
Now:
lerna publish
when there are no updates is a no-op, exiting successfully with a helpful log messagelerna updated
when there are no updates will exit non-zero (but not throw an error), enabling it to be an effective filter
🚀 Enhancement
-
#726 Add --only-updated option to exec and run subcommands. (@jameslnewell)
When executing a script or command, only run the script or command on packages that have been updated since the last release. A package is considered "updated" using the same rules as
lerna updated
.lerna exec --only-updated -- ls -la lerna run --only-updated test
-
#795 Add --parallel flag to
lerna exec
. (@evocateur)With this flag,
lerna exec
will run the command in all filtered packages
in parallel, completely ignoring concurrency and topological sorting.# transpile modules in all packages as changes occur lerna exec -- babel src -d lib -w # transpile watched modules only in package-foo lerna exec --scope package-foo -- babel src -d lib -w
It is advised to constrain the scope of the command when running with this
flag, as spawning dozens of subprocesses may be harmful to your shell's
equanimity (or maximum file descriptor limit, for example). YMMV -
#796 Add --parallel flag to
lerna run
. (@evocateur)This allows simpler invocation of
watch
scripts, with the caveat that concurrency and topological sorting are completely ignored. This is generally the intention when callinglerna run watch
and other similar script targets, hence the additional flag.# the following commands are equivalent lerna run watch --concurrency=1000 --stream lerna run watch --parallel
Package filtering (
--scope
and--ignore
) is still available when this new flag is being used, and it is advised to narrow the scope of parallel execution when you have more than a dozen packages or so (YMMV). -
#803 Skip git repo check by default in Commands which do not rely on git. (@noherczeg)
-
#824 Add json output to
ls
andupdated
commands. (@ricky)When run with
--json
,lerna updated
andlerna ls
will return an array of objects in the following format:[ { "name": "package", "version": "1.0.0", "private": false } ]
-
#829 Prefix piped streams with rotating colors. (@evocateur)
🐛 Bug Fix
- #798 Disable progress bars when running in CI or non-interactive shell. (@evocateur)
- #799 Do not ignore explicit
node_modules
in package paths. (@evocateur) - #815 Support GPG signing of git tags. (@alethea)
- #828 Switch to
fs-extra
. (@evocateur) - #831 Make
pkg
argument optional forlerna diff
. (@evocateur)
🏠 Internal
- #827, #830 Upgrade dependencies. (@evocateur)
Committers: 6
v2.0.0-rc.4
v2.0.0-rc.4 (2017-04-27)
Now with fewer bugs! The --hoist
flag works again, among other rc.3
bugfixes, and our logging is much more detailed now.
💥 Breaking Change
- #777 Replace --skip-temp-tag with --temp-tag. (@noherczeg)
- #779 Log with npmlog. (@evocateur)
🚀 Enhancement
- #782 Add --max-buffer flag. (@noherczeg)
🐛 Bug Fix
- #775, #784 Install non-hoisted leaves using
npm --global-style
. (@ricky) - #776 Ignore node_modules when traversing nested package locations. (@evocateur)
- #778 Fix --hoist with no argument default. (@evocateur)
- #787 Prevent log messages and progress bars from mangling prompts. (@evocateur)
- #790 Log the directories being cleaned. (@evocateur)
💅 Polish
- #781 Support
--force-publish
arrays and booleans. (@evocateur)
📝 Documentation
- #783 Add troubleshooting docs. (@noherczeg)
🏠 Internal
- #780 Restore async rimraf loops. (@evocateur)
Committers: 3
v2.0.0-rc.3
v2.0.0-rc.3 (2017-04-18)
Barring show-stopping bugs, our goal is to cut v2.0.0
later this week. Big props to all of our brave users riding the bleeding edge of release candidates and reporting issues!
🐛 Bug Fix
- #764 Use network mutex when bootstrapping with yarn. (@evocateur)
lerna bootstrap --npmClient=yarn
should no longer require --concurrency=1
to avoid yarn cache race conditions.
- #769 Fix custom version prompt. (@timdorr)
- #771 Resolve internal CLI calls with Windows-safe pattern. (@evocateur)
If you've ever encountered the error Error: spawn rimraf ENOENT
, this should fix that. Turns out yarn
doesn't match a behavior of npm
when installing, and does not symlink transitive dependency binaries.
🏠 Internal
- #770 Pass multiple directories to rimraf. (@evocateur)
Committers: 2
v2.0.0-rc.2
v2.0.0-rc.2 (2017-04-13)
Inching ever closer to 🏁 v2.0.0!
Highlights: lerna exec
learned some new tricks (thanks to execa), and multi-line commit messages on Windows should now work.
$ lerna exec echo \$LERNA_PACKAGE_NAME
# note the escaped $, so it evaluates in the subshell, not the current shell
Ever get tired of repeating yourself in all of the package deps with devDependencies on babel-cli
or rimraf
? Now, all you need to do is have them installed in the root, and the following replaces all that duplicate code:
$ lerna exec rimraf lib
$ lerna exec babel -- src -d lib
The --
is still useful for hiding args from lerna
, but it isn't always necessary now.
In the example above, I had to hide the -d
from lerna
's arg parser, but positional arguments are just fine.
When in doubt, always append the command you want to run (e.g., babel src -d lib
) after the --
, after all other arguments to lerna exec
.
🚀 Enhancement
- #719 Use yargs to handle CLI args and subcommands. (@noherczeg)
lerna --help
is a bit cleaner now
Usage: lerna <command> [options]
Commands:
bootstrap Link local packages together and install remaining package dependencies
clean Remove the node_modules directory from all packages.
diff <pkg> Diff all packages or a single package since the last release.
exec <command> [args..] Run an arbitrary command in each package.
import <pathToRepo> Import the package in <pathToRepo> into packages/<directory-name> with commit history.
init Create a new Lerna repo or upgrade an existing repo to the current version of Lerna.
ls List all public packages
publish Publish packages in the current project.
run <script> [args..] Run an npm script in each package that contains that script.
updated Check which packages have changed since the last publish.
Global Options:
--loglevel What level of logs to report. [string] [default: "info"]
--concurrency How many threads to use if lerna parallelises the tasks. [number] [default: 4]
--scope Restricts the scope to package names matching the given glob.
(Only for 'run', 'exec', 'clean', 'ls', and 'bootstrap' commands) [string]
--ignore Ignore packages with names matching the given glob.
(Only for 'run', 'exec', 'clean', 'ls', and 'bootstrap' commands) [string]
--include-filtered-dependencies Include all transitive dependencies when running a command, regardless of --scope or --ignore.
--registry Use the specified registry for all npm client operations. [string]
--sort Sort packages topologically (all dependencies before dependents) [boolean] [default: true]
-h, --help Show help [boolean]
-v, --version Show version number [boolean]
When a command fails, all logs are written to lerna-debug.log in the current working directory.
For more information, find our manual at https://github.com/lerna/lerna
Targeted command help: lerna bootstrap --help
lerna bootstrap
Global Options:
--loglevel What level of logs to report. [string] [default: "info"]
--concurrency How many threads to use if lerna parallelises the tasks. [number] [default: 4]
--scope Restricts the scope to package names matching the given glob.
(Only for 'run', 'exec', 'clean', 'ls', and 'bootstrap' commands) [string]
--ignore Ignore packages with names matching the given glob.
(Only for 'run', 'exec', 'clean', 'ls', and 'bootstrap' commands) [string]
--include-filtered-dependencies Include all transitive dependencies when running a command, regardless of --scope or --ignore.
--registry Use the specified registry for all npm client operations. [string]
--sort Sort packages topologically (all dependencies before dependents) [boolean] [default: true]
-h, --help Show help [boolean]
-v, --version Show version number [boolean]
Options:
--hoist Install external dependencies matching [glob] to the repo root [string] [default: '**']
--nohoist Don't hoist external dependencies matching [glob] to the repo root [string]
--npm-client Executable used to install dependencies (npm, yarn, pnpm, ...) [string]
We've got plenty of room to grow our documentation, PRs welcome!
🐛 Bug Fix
- #758 Use temp-write for multi-line commit messages. (@evocateur)
- #761 Use shell option when spawning
lerna exec
. (@jwb) - #762 Fix durable option resolution. (@evocateur)
📝 Documentation
- #748 Reference conventionalcommits.org website in README. (@bcoe)
- #751 Update README.md and docs to better explain hoisting. (@kylecordes)
If you've ever had a question about hoisting, read @kylecordes's brilliant docs here!
🏠 Internal
- #745 Add eslint-plugin-node. (@evocateur)
- #747 Fix bootstrap integration tests. (@evocateur)
- #749 Convert eslint config to YAML. (@evocateur)
- #750 Refactor fixture helpers to reduce duplication. (@evocateur)
- #759 Use execa for child_process calls. (@evocateur)
Committers: 5
- Benjamin E. Coe (bcoe)
- Daniel Stockman (evocateur)
- John Bito (jwb)
- Kyle Cordes (kylecordes)
- Norbert Csaba Herczeg (noherczeg)
v2.0.0-rc.1
v2.0.0-rc.1 (2017-04-07)
A silent (but deadly) bug slipped into the last release. Many thanks to (@timdp) for discovering it.
🐛 Bug Fix
- #744 Fix package.json updates during publish. (@evocateur)
v2.0.0-rc.0
v2.0.0-rc.0 (2017-04-06)
🎉 It's the first release candidate of v2.0.0
! 🎉
Highlights: Jest, CI automation improvements, and tons of internal refactoring!
We've been in "beta" for quite some time, and it's time for our versioning to better communicate changes and guarantee API stability.
Our goal is to focus on a few important bugfixes before pushing the big red button and cutting a v2.0.0
for realsies. Check out the milestone to see if you can help!
💥 Breaking Change
- #732 Remove broken public API. (@evocateur)
Our apologies if you were using this, but did you know it's been broken since before the first 2.x beta?
We have better opportunities in the offing for helping folks reuse parts of our inner logic (a --json
flag for lerna ls
, perhaps?), and encourage those who have complex needs to join or start discussions in the issues.
🚀 Enhancement
- #666 Create annotated git tags instead of lightweight tags. (@AlexLandau)
It turns out that annotated tags have super powers, compared to their lightweight cousins.
Thanks to this change, we'll soon be able to take better advantage of git describe
's bag of tricks.
- #665 Automate CHANGELOG updates and version bumps during publish with
--conventional-commits
flag. (@bcoe)
If you use conventional-changelog, you can now use the --conventional-commits
flag during lerna publish
to automatically suggest versions and update appropriate CHANGELOG
files.
- #607 Increment version by semver keyword with
--cd-version
flag. (@cif) - #641 Add prompts for prerelease versions. (@rtsao)
- #647 Allow concurrency to be configured via lerna.json. (@gigabo)
- #635 Switch to Jest. (@evocateur)
- #714 Refactor unit tests into Jest idioms, adding integration tests. (@evocateur)
🐛 Bug Fix
- #731 Symlink binaries of scoped packages correctly. (@evocateur)
- #729 Upgrade progress to address upstream bug. (@zzarcon)
- #728 Handle
--ignore
flag correctly when publishing. (@noherczeg) - #711 Do not reject detached
HEAD
when publishing a canary release. (@evocateur) - #694, #705 Loosen version check to major-only. (@evocateur)
- #687 Support lerna execution from subdirectories of repo root. (@evocateur)
- #654, #672 Merge current process.env when using
--registry
flag. (@noherczeg), (@TheLarkInn) - #621 Include private packages in the list of updated packages. (@spudly)
- #638 Install with all dependencies when installing. (@gigabo)
💅 Polish
- #655 Actually warn when a matching dependency version is not satisfied. (@evocateur)
- #674 Appveyor status should reflect master, not latest. (@evocateur)
📝 Documentation
- #736 Update FAQ.md with publish retry details. (@cdaringe)
- #693 Add GitHub issue and pull request templates. (@evocateur)
- #634 Add documentation about "watch" commands next to
--no-sort
. (@trotzig)
🏠 Internal
- #738 Use
babel-preset-env
instead ofbabel-preset-es2015
. (@evocateur) - #737 Update eslint, config, and plugins. (@evocateur)
- #733, #734 Refactor CWD handling. (@evocateur)
- #690 Whitelist files included in package tarball. (@evocateur)
- #681 Use
yarn --frozen-lockfile
in CI. (@evocateur) - #673 Use yarn instead of npm in CI. (@evocateur)
- #663 add tests for
NpmUtilities.getExecOpts()
. (@noherczeg)
Committers: 17
- Alex Landau (AlexLandau)
- Ben Ipsen (cif)
- Benjamin E. Coe (bcoe)
- Bo Borgerson (gigabo)
- Christopher Dieringer (cdaringe)
- Daniel Stockman (evocateur)
- Hector Zarco (zzarcon)
- Henric Trotzig (trotzig)
- Henry Zhu (hzoo)
- Norbert Csaba Herczeg (noherczeg)
- Nuno Campos (nfcampos)
- Ryan Tsao (rtsao)
- Sean Larkin (TheLarkInn)
- Stephen John Sorensen (spudly)
- Vladimir Guguiev (wizardzloy)
- Yasser Kaddour (YasserKaddour)
- james kyle (thejameskyle)
v2.0.0-beta.38
v2.0.0-beta.38 (2017-02-28)
📦 🐈 Initial Yarn support and more!
🚀 Enhancement
We'll make yarn the default once we feel that it's more stable.
$ lerna bootstrap --npm-client=yarn
{
"npmClient": "yarn"
}
This will run yarn
in each package can create temp yarn.lock
files while developing so you'll want to .gitignore/.npmignore
these files. Ex: .gitignore
: packages/*/yarn.lock
- #595 Publish npm packages in topological order (@loganfsmyth)
Very important fix for Babel that we used in the last release. This prevents a timing issue when publishing where a module will try to download a package that isn't published yet because it is published before it's own dependency is published itself. We used to get many issues from users on non-public npm about "babel-types" not being found.
Useful to get output for child processes immediately if using lerna run
with a watch command
$ lerna run watch --stream
- #624 Add versions to lerna ls. Closes #603 (@ben-eb)
- #620 Feature: skip-temp-tag. (@noherczeg)
This will not create a temporary dist-tag called lerna-temp
when publishing. Useful if your third party proxy doesn't support dist-tags.
$ lerna publish --skip-temp-tag
Defaults to running npm run test
and npm run env
{
"commands": {
"bootstrap": {
"includeFilteredDependencies": true
}
}
}
{
"commands": {
"run": {
"sort": false
}
}
}
- #599 Explicit registry flag feature. (@noherczeg)
$ lerna publish --registry https://my-private-registry
🐛 Bug Fix
- #601 Fix --ignore flag when globs are expanded to an array. (@rtsao)
- #597 Support command config in either "commands" or "command". (@gigabo)
- #586 Avoid exception after successful
lerna diff
. (@evocateur)
🏠 Internal
- #604 Fix midair collision. (@doug-wade)
- #594 Remove
sync-exec
(@wtgtybhertgeghgtwtg)
Committers: 11
v2.0.0-beta.37
v2.0.0-beta.37 (2017-02-08)
--include-filtered-dependencies
now works with ls
,exec
,run
as well!
- Fixes an issue with
--hoist
(from previous release)
🚀 Enhancement
- #581 Improve support for --include-filtered-dependencies. (@roblg)
- #576 Install with no arguments. (@gigabo)
- #569 Short-circuit out of install with no packages. (@gigabo)
🐛 Bug Fix
- #574 Use correct logger method in Package method.. (@evocateur)
- #568 Check if directories exist before removing during hoist. (@gigabo)
🏠 Internal
- #562 Replace
lodash.find
,lodash.unionwith
, andpad
withlodash
.. (@wtgtybhertgeghgtwtg) - #584 Bump
command-join
.. (@wtgtybhertgeghgtwtg) - #575 Add coverage report. (@doug-wade)
Committers: 5
- Bo Borgerson (gigabo)
- Daniel Stockman (evocateur)
- Douglas Wade (doug-wade)
- Robert Gay (roblg)
- wtgtybhertgeghgtwtg