All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.
3.0.0-beta.17 (2018-04-13)
- bootstrap: Pass npm-conf to feature predicate instead of directly reading process.env (b4af3c9)
- bootstrap: Pluralize log text (#1232) (5c74760)
- package: Resolve correct relative spec (ec2b8f5)
- add: Use directory globs to filter targeted packages (39fa7b6)
- link: Add 'convert' subcommand to aid migration to local file: specifiers (f59bf3c)
- add:
lerna add
now only supports adding one dependency at a time. It is much more valuable to filter by directory globs, anyway.
3.0.0-beta.16 (2018-04-10)
- import: Rebase patch copies, too (f6bae80)
3.0.0-beta.15 (2018-04-09)
- project: Pin --exact require-from-string v2.0.1 to avoid integrity error with v2.0.2 (32a38ad)
- publish: Allow tag check to fail with strong warning (#1355) (f5268cd)
- bootstrap: Use
npm ci
with--ci
option (#1360) (d7e33c6) - conventional-commits: Support local file presets (a1bff40)
3.0.0-beta.14 (2018-04-03)
- create: Actually publish the module data helper (4775cc4)
- logging: Log failures from package scripts once, not twice (436cfe1)
- publish: Ensure optionalDependencies are updated during publish to registry (559b731)
3.0.0-beta.13 (2018-03-31)
- child-process: Do not merge lines of streaming stderr (59dc2d4), closes #994
- Use ValidationError instead of Error (bea6bc3)
- run: Exit early when no packages contain the targeted lifecycle (c8a5526)
- Enable progress bars only when necessary (b766c83)
3.0.0-beta.12 (2018-03-30)
- create: Silently ignore missing builtin npmrc (1523520), closes #1353
- npm-conf: Replace env vars even in config keys (3c9a5de)
- package: Add
serialize()
method (fdec3ac) - package: Add Map-like get/set methods, remove raw json getter (707d1f0)
- project: Merge
package
andpackageJson
intomanifest
(9a47ff7) - Add --no-prefix for streaming output (#1352) (36c1fad)
- package: The
Package
class no longer provides direct access to the JSON object used to construct the instance. Map-likeget()
/set(val)
methods are available to modify the internal representation.
3.0.0-beta.11 (2018-03-29)
- exec: Clarify --no-bail option (6e4c6fd)
- publish: Write temporary annotations once, not repeatedly (6abae76)
- bootstrap: Inherit stdio during root-only install (fd8c391)
- bootstrap: Short-circuit when local file: specifiers are detected in the root (d8a8f03)
- child-process: Allow exec() opts.stdio override (fd84013)
- npm-install: Allow opts.stdio override (4ba5e74)
- Execute atomic publish lifecycle during lerna publish (#1348) (45efa24)
- Support
optionalDependencies
(b73e19d), closes #121 - npm-run-script: Accept opts.reject (7c5a791)
- run: Add --no-bail option (893fcc8), closes #1351
3.0.0-beta.10 (2018-03-27)
- add: Use bootstrap factory, not handler (dbfc891)
- commands: Delay require of command instantiation (a1284f3)
- project: Inherit configuration with yargs-like "extends" (0b28ef5), closes #1281
- commands: The default export of command packages is now a factory, not the subclass (which is now a named export).
3.0.0-beta.9 (2018-03-24)
- filter-options: Move include/exclude validation into filter-packages (503251d)
- git-utils: Remove unused methods, stop mocking tests (3e00d7a)
- publish: Split
--skip-*
properly, leave working tree clean (5b4b2c9)
- command: Remove legacy config handling (d305a38)
- command: Rename this.repository -> this.project (43e98a0)
- project: Normalize config.commands -> config.command (24e55e3)
- project: Use cosmiconfig to locate and read lerna.json (b8c2789)
- publish: Previously, gitHead annotations were leftover if
--skip-npm
was passed, despite no actual requirement for that property when no publishing is going on.
Now, all publish-related operations are truly skipped with --skip-npm
,
and all git commit/push-related operations are skipped with --skip-git
.
Passing --skip-npm
will now also always push to remote, which represents
a breaking change from 2.x behavior.
Thanks @KingScooty for raising the issue!
- command: lerna.json
bootstrapConfig
andpublishConfig
namespaces are no longer honored. These config blocks should be moved tocommand.bootstrap
andcommand.publish
, respectively.
3.0.0-beta.8 (2018-03-22)
- add: Support tag and version specifiers (5df0fc8), closes #1306
- create: Skip repository property when git remote is missing (98c8be6)
- init: Improve ex-nihilo output (7b80e07)
- npm-conf: Add get/setCredentialsByURI() methods (ad20d8a)
- utils: Add "vendored" npm-conf (9c24a25)
- utils: Add @lerna/map-to-registry (ce72828)
3.0.0-beta.7 (2018-03-20)
- cli: Retrieve correct version (bb2c5e8)
3.0.0-beta.6 (2018-03-19)
Note: Version bump only for package lerna
3.0.0-beta.5 (2018-03-19)
3.0.0-beta.4 (2018-03-19)
- clean-stack: Try to avoid causing errors during error cleanup (89f9d3b)
- Respect durable hoist configuration (2081640), closes #1325
- Use correct instance property override (9249221)
3.0.0-beta.3 (2018-03-15)
- utils: Use safe relative path when calling git diff (#1323) (619c477)
- ci option should not be visible in help output (580b2d5)
- fs-extra dependency is a caret range, not exact (81556d0)
- Check for upstream changes before attempting to publish (#1317) (cef0a69)
- cli: Set config.ci from env var (5452293)
- global-options: Add hidden
ci
option (86a4d65) - Upstream changes warn in CI, throw locally (4de055d), closes #1177 #1317
- publish: Add logging when
--skip-git
or--skip-npm
are passed (#1319) (8eef9ff)
3.0.0-beta.2 (2018-03-10)
- Move
@lerna/has-dependency-installed
intocommands/bootstrap/lib
(c09ccbd)
- Rename
@lerna/fs-utils
=>@lerna/rimraf-dir
(30451ed) - Replace
@lerna/fs-utils
dependency withfs-extra
(9c35a86) - Replace
@lerna/match-package-name
withmultimatch
(423f82c) - filter-packages: Simplify method signature (47e1c86)
- filter-packages: The parameters to
filterPackages()
have changed:- Two lists (
include
,exclude
) have replaced the destructured config object
- Two lists (
3.0.0-beta.1 (2018-03-09)
- conventional-commits: output version bump message closer to version heading (64916d6)
- filter-options: require a git repo when using --since (d21b66e), closes #822
- init: lerna init does not, in fact, require git (d1d69c7)
- publish: Checkout manifest changes serially (ce4a4b1)
- publish: default root manifest name when missing (a504d7e), closes #1305
- publish: guard against undefined tag (d8ce253), closes #1311
- publish: Respect pkg.publishConfig.tag (04b256a), closes #1311
- publish: work around yarn "link:" intransigency (ddfb517)
- collect-packages: simplify signature (39170cf)
- diff: filter diff output with --ignore-changes (c27c2e0)
- filter-options: Exclude private packages with --no-private (6674d18)
- collect-packages: Formerly a config object, it is now two parameters, only the first of
which (rootPath) is required. The second parameter is a list of package
location globs, defaulting to lerna's default of
["packages/*"]
.
This is the first lerna
release published by lerna
itself. 🎉
-
#1307 Convert
lerna/lerna
into alerna
-based monorepo. (@evocateur) -
Rename
lerna publish
flag--ignore
to--ignore-changes
(8c92956)This resolves previous ambiguity as to what exactly was intended by the "ignore" config for lerna publish, which was not intended to be identical to the filtering option
--ignore
.The old option will still work when found in
lerna.json
config, but it is recommended to migrate to the new option name to ensure future compatibility.
- #1310 Add gitHead property to package.json before publish. (@evocateur)
- Daniel Stockman (evocateur)
- #1302 Use npm-lifecycle to run solitary lifecycle phases. (@evocateur)
- #1300 Disable all non-error logging when stdout is piped. (@evocateur)
- Daniel Stockman (evocateur)
- Disable progress in commands that only output lists (e91c9f2c)
- #1278 Add universal hosted git URL support. (@evocateur)
- #1289 Convert command lifecycle from callbacks to Promises. (@evocateur)
- #1290 Preserve package.json structure during bootstrap mangling. (@evocateur) Thanks to @compulim for the initial PR!
- #1271 Split symlink methods out of FileSystemUtilities. (@evocateur, @compulim)
- Tons of other refactoring afoot! Check out this diff.
- Daniel Stockman (evocateur)
#1122
Use local lerna if available. (@marionebl)#1207
Refactor command superclass and yargs handlers. (@evocateur)#1208
Use CommonJS. (@evocateur)#1209
Drop support for node v4. (@evocateur)#1211
Bump major versions of dependencies. (@evocateur)#1225
Remove lerna.json compatibility check. (@evocateur)#1226
Remove all deprecated validations. (@evocateur)#1234
Upgrade to yargs 11. (@evocateur)
#1212
Throw friendly error when workspaces are not configured correctly. (@craigbilner)#1227
Add--ignore-scripts
flag to bootstrap command. (@Andarist)#1254
Add support for new yarn workspaces config format. (@detrohutt)#1261
Refactor publish command to be 98% async. (@evocateur)#1262
Rewrite npm5file:
links during publish. (@evocateur)
#1219
Avoid triggering pre-commit and commitmsg hooks during publish. (@alan-agius4)#1220
Remove--no-gpg-sign
fromgit commit
. (@evocateur)
#1248
Document another potential cause of git initialization failure. (@fritz-c)#1250
Add guide for debugging Jest tests with VS Code. (@millermatt)
#1210
Upgrade to Jest v22. (@evocateur)#1224
Remove explicitglob
dependency in favor ofglobby
. (@wtgtybhertgeghgtwtg)#1260
PackageGraph
is aMap
, its nodes store relationships in aSet
. (@evocateur)#1266
SplitPackageUtilities
into smaller files. (@evocateur)#1267
SplitNpmUtilities
into smaller files. (@evocateur)
- Alan Agius (alan-agius4)
- Alexander Roberts (detrohutt)
- Craig Bilner (craigbilner)
- Daniel Stockman (evocateur)
- Fritz (fritz-c)
- Mario Nebl (marionebl)
- Mateusz Burzyński (Andarist)
- Matt Miller (millermatt)
- wtgtybhertgeghgtwtg
- #1205 Add %v as placeholder for raw version in
--message
. (@mojavelinux)
- #1206 Avoid dropping early logs below default level. (@evocateur)
- Dan Allen (mojavelinux)
- Daniel Stockman (evocateur)
- #1194 Treat 'lerna run test' like any other command. (@tkrotoff)
- #1199 Fix import command so it works if Lerna root is a subdir of git root. (@RoystonS)
- #1204 Avoid interactive prompt during yarn publish. (@evocateur)
- #1140 Warn user and exit non-zero if command is invalid. (@cezaraugusto)
- #1145 run/publish: Use npmClient instead of hardcoded npm. (@oreporan)
- #1149 Add support for root-level version lifecycle. (@bigtimebuddy)
- #1187 Completely ignore peerDependencies during publish. (@evocateur)
- #1193 Throw error when lerna.json or package.json have invalid syntax. (@evocateur)
- #1164 docs: replace "command" with "commands" to avoid ambiguity. (@fengyuanchen)
- #1186 docs: 📇 Add private registry tips to troubleshooting.md. (@frankstallone)
- #1188 Prettier. (@evocateur)
- Alan Agius (alan-agius4)
- Cezar Augusto (cezaraugusto)
- Chen Fengyuan (fengyuanchen)
- Daniel Stockman (evocateur)
- Frank Stallone (frankstallone)
- Matt Karl (bigtimebuddy)
- Ore Poran (oreporan)
Happy 2018! 🎉
- #1110 Add
--stream
option tolerna exec
. (@alan-agius4) - #1111 Add
--changelog-preset
option to customize--conventional-commits
output. (@alan-agius4)
- #1134 Normalize path used for
git add
in respect to OS/environment. (@zenflow) - #1129 Throw error in bootstrap when Yarn workspaces is misconfigured. (@evocateur)
- #1101 Set chmod for linked binaries. (@marionebl)
- #1112 Use all
packages
locations when resetting canary changes. (@jwickens) - #1115 Keep non-patch subject parts when importing repository. (@koenpunt)
- #1139 add docs on how to publish scoped packages. (@cezaraugusto)
- #1108 Minor typo fix in hoist.md. (@tdmalone)
- #1166 fix: typo in README.md "in in". (@vladgolubev)
- #1176 Fix typo in README.md. (@LoicPoullain)
- Alan Agius (alan-agius4)
- Cezar Augusto (cezaraugusto)
- Daniel Stockman (evocateur)
- Jonathan R Wickens (jwickens)
- Koen Punt (koenpunt)
- Loïc Poullain (LoicPoullain)
- Mario Nebl (marionebl)
- Matthew Francis Brunetti (zenflow)
- Tim Malone (tdmalone)
- Vlad Holubiev (vladgolubev)
A quick bugfix for an overlooked case in lerna add
.
- #1100 Preserve existing deps with lerna add. (@marionebl)
- Mario Nebl (marionebl)
A new command (lerna add
), new flags for bootstrap and link commands, and a much-improved experience when publishing "final" releases after a series of prereleases!
- #1069 Implement
lerna add <pkg>[@version] [--dev]
. (@marionebl) - #1077 Republish prereleased packages during subsequent non-prerelease publish. (@spudly)
- #1078 Generate root changelog in fixed mode. (@ZauberNerd)
- #1081 Warn during bootstrap when two or more packages have the same package.json name. (@amfio)
- #1082 Add --force-local to link command. (@jiverson)
- #1087 Add --reject-cycles to bootstrap, logging packages when found. (@mitchhentges)
- #1059 Improve "import" edgecases + (i18n fixes + git tweaks). (@swernerx)
- #1063 Fail when --hoist and --yarn are used together. (@marionebl)
- #1083 Fixed diffing on Windows. (@the0neWhoKnocks)
- #1062 Fix README typo. (@imagentleman)
- #1080 Add test for skipping empty patches during import --flatten. (@gyoshev)
- #1092 Make integration tests less flaky on Windows. (@evocateur)
- Alex Gyoshev (gyoshev)
- Alexander Field (amfio)
- Björn Brauer (ZauberNerd)
- Daniel Stockman (evocateur)
- Josh Iverson (jiverson)
- José Antonio Chio (imagentleman)
- Mario Nebl (marionebl)
- Mitchell Hentges (mitchhentges)
- Sebastian Werner (swernerx)
- Stephen John Sorensen (spudly)
- the0neWhoKnocks
I inadvertently made lerna bootstrap --hoist
really slow in v2.3.0, so that's fixed. Big thanks to all the contributors!
- #1033 Add support for git-hosted urls as sibling package dependencies. (@gustaff-weldon)
- #1044 Throw publish validation errors before version selection. (@evocateur)
- #1047 Remove git requirement from link command. (@jiverson)
- #1051 When hoisting, only install with --global-style in leaf nodes, not root. (@evocateur)
- #1054 Set
process.exitCode
instead of callingprocess.exit(code)
. (@evocateur)
- #1048 Clean up code missed by lint settings. (@jiverson)
- #1052 Truncate stack (or pass directly) when logging errors. (@evocateur)
- Daniel Stockman (evocateur)
- Good stuff and well done! (gustaff-weldon)
- Josh Iverson (jiverson)
- nhducit (nhducit)
This is what happens when you forget to pull from upstream before publishing.
- #1025 Log which packages are throwing ECYCLE error. (@FezVrasta)
- Federico Zivolo (FezVrasta)
New options for lerna import
and lerna publish
, set --loglevel
from lerna.json, and more!
- #1019 Add
--flatten
option to use when merge conflicts cannot be imported. (@dmaksimovic) - #1026 Add
--allow-branch
option to restrict publish to designated branches. (@FaHeymann) - #1029 Call version lifecycle scripts during publish. (@cwmoo740)
- #1030 Add runScriptSync for use in version lifecycle methods. (@cwmoo740)
- #1020 Use
--canary=<value>
as prerelease tag, not commit-ish. (@achingbrain) - #1037 Support durable
--loglevel
config from lerna.json. (@evocateur) - #1041 Pass npmClientArgs to yarn workspaces install command. (@evocateur)
- #1038 Rename
npmPublishAsPrerelease
tonpmPublish
to avoid confusion. (@Hypnosphi)
- Alex Potsides (achingbrain)
- Daniel Stockman (evocateur)
- Darko Maksimovic (dmaksimovic)
- Fabian Heymann (FaHeymann)
- Filipp Riabchun (Hypnosphi)
- Jeffrey Young (cwmoo740)
- Steve Mao (stevemao)
A new command, tweaks to logging and init scaffolding, and documentation!
- #970 Create configured "packages" directories during lerna init. (@Siilwyn)
- #1004 Improve logging of package lifecycle errors during bootstrap. (@gauntface)
- #1000 Add
lerna link
command. (@Inkdpixels)
- #985 Update installation instructions to match lerna init behavior. (@sapegin)
- #1011 Add shield example to README.md. (@mfix22)
- Artem Sapegin (sapegin)
- Matt Gaunt (gauntface)
- Michael Fix (mfix22)
- Selwyn (Siilwyn)
- Tyll Weiß (Inkdpixels)
More bugfixes, plus support for the prepare
lifecycle script found in npm 4+.
- #992 Fix --conventional-commits recommending already released version. (@jezzay)
- #993 Fix silly level log output for --conventional-commits. (@jezzay)
- #996 Only diff package locations, not the entire repository. (@evocateur)
- #997 All command unit tests use yargs runner. (@evocateur)
A quick bugfix release to restore a broken lerna publish --canary
, as reported in #989. Many thanks to all who pitched in to identify the issue!
- #990 Use yargs parser in unit tests for greater fidelity. (@evocateur)
- Daniel Stockman (evocateur)
- #922 Support
--conventional-commits
in fixed versioning mode. (@jezzay) - #960 Improve support for semver prerelease identifiers when publishing. (@shawnbot)
- #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)
- #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)
- #934 Platform independent integration tests. (@jezzay)
- #946 Swallow promise rejection in registerChild as it is handled via callback. (@viliusl)
- #973 Update LICENSE. (@yanca018)
- Andrey Fedorov (anfedorov)
- Daniel Stockman (evocateur)
- Darryl Hodgins (darrylhodgins)
- Gustaf Dalemar (dlmr)
- Jeremy (jezzay)
- Mateusz Burzyński (Andarist)
- Selwyn (Siilwyn)
- Shawn Allen (shawnbot)
- Vilius Lukošius (viliusl)
- lukebatchelor
- yanca018
🎉 It's happening! 🎉
- #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.
- #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)
- #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)
- #840 Update publish docs in README. (@shilman)
- #836 Add semver notes to bootstrap command docs. (@loklaan)
- #861 chore(travis): test against node 8 and npm 5. (@douglasduteil)
- 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
This is the last release candidate.
We need to fix #789 before we can release v2.0.0
. All contributions are appreciated!
-
#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
-
#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)
- #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)
- #827, #830 Upgrade dependencies. (@evocateur)
- Alethea Rose (alethea)
- Daniel Stockman (evocateur)
- James Newell (jameslnewell)
- Kristján Oddsson (koddsson)
- Norbert Csaba Herczeg (noherczeg)
- ricky
Now with less bugs! The --hoist
flag works again, among other rc.3
bugfixes, and our logging is much more detailed now.
- #777 Replace --skip-temp-tag with --temp-tag. (@noherczeg)
- #779 Log with npmlog. (@evocateur)
- #782 Add --max-buffer flag. (@noherczeg)
- #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)
- #781 Support
--force-publish
arrays and booleans. (@evocateur)
- #783 Add troubleshooting docs. (@noherczeg)
- #780 Restore async rimraf loops. (@evocateur)
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!
- #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.
- #770 Pass multiple directories to rimraf. (@evocateur)
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
.
- #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!
- #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)
- #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!
- #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)
- Benjamin E. Coe (bcoe)
- Daniel Stockman (evocateur)
- John Bito (jwb)
- Kyle Cordes (kylecordes)
- Norbert Csaba Herczeg (noherczeg)
A silent (but deadly) bug slipped into the last release. Many thanks to (@timdp) for discovering it.
- #744 Fix package.json updates during publish. (@evocateur)
🎉 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!
- #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.
- #666 Create annotated git tags instead of lightweight tags. (@AlexLandau)
- #665 Automate CHANGELOG updates and version bumps during publish with
--conventional-commits
flag. (@bcoe) - #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)
- #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)
- #655 Actually warn when a matching dependency version is not satisfied. (@evocateur)
- #674 Appveyor status should reflect master, not latest. (@evocateur)
- #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)
- #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)
- 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)
📦 🐈 Initial Yarn support and more!
We'll make yarn the default once we feel that it's more stable.
$ lerna bootstrap --npm-client=yarn
{
"npmClient": "yarn"
}
- #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.
We now check for changes since the most recent tag in the current branch, instead of the most recent tag in entire repository. This allows publishing older versions of a project in maintenance branches, as well as nightly releases from a feature branch.
Additionally, we now ensure that the user is in a non-detached branch because lerna can't publish without a valid git branch.
Useful to get output for child processes immediately if using lerna run
with a watch command
$ lerna run watch --stream
- #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
- #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)
- #604 Fix midair collision. (@doug-wade)
- #594 Remove
sync-exec
(@wtgtybhertgeghgtwtg)
- Ben Briggs (ben-eb)
- Bo Borgerson (gigabo)
- Daniel Stockman (evocateur)
- Douglas Wade (doug-wade)
- Garth Kidd (garthk)
- Gytis Vinclovas (Gongreg)
- Logan Smyth (loganfsmyth)
- Norbert Csaba Herczeg (noherczeg)
- Ryan Tsao (rtsao)
- simon360
- wtgtybhertgeghgtwtg
--include-filtered-dependencies
now works with ls
,exec
,run
as well!
- Fixes an issue with
--hoist
(from previous release)
- #581 Improve support for --include-filtered-dependencies. (@roblg)
- #576 Install with no arguments. (@gigabo)
- #569 Short-circuit out of install with no packages. (@gigabo)
- #574 Use correct logger method in Package method.. (@evocateur)
- #568 Check if directories exist before removing during hoist. (@gigabo)
- #562 Replace
lodash.find
,lodash.unionwith
, andpad
withlodash
.. (@wtgtybhertgeghgtwtg) - #584 Bump
command-join
.. (@wtgtybhertgeghgtwtg) - #575 Add coverage report. (@doug-wade)
- Bo Borgerson (gigabo)
- Daniel Stockman (evocateur)
- Douglas Wade (doug-wade)
- Robert Gay (roblg)
- wtgtybhertgeghgtwtg
3 new flags:
By default, all tasks execute on packages in topologically sorted order as to respect the dependency relationships of the packages in question. Cycles are broken on a best-effort basis in a way not guaranteed to be consistent across Lerna invocations.
Topological sorting can cause concurrency bottlenecks if there are a small number of packages with many dependents or if some packages take a disproportionately long time to execute. The --no-sort
option disables sorting, instead executing tasks in an arbitrary order with maximum concurrency.
Install external dependencies matching glob
at the repo root so they're
available to all packages. Any binaries from these dependencies will be
linked into dependent package node_modules/.bin/
directories so they're
available for npm scripts. If the option is present but no glob
is given
the default is **
(hoist everything). This option only affects the
bootstrap
command.
$ lerna bootstrap --hoist
Note: If packages depend on different versions of an external dependency, the most commonly used version will be hoisted, and a warning will be emitted.
This option may also be set in lerna.json
with "hoist": true
or "hoist": <glob>
.
Do not install external dependencies matching glob
at the repo root. This
can be used to opt out of hoisting for certain dependencies.
$ lerna bootstrap --hoist --nohoist=babel-*
This option may also be set in lerna.json
with "nohoist": <glob>
.
- #507 Automatic hoisting of common dependencies. (@gigabo)
- #547 Spawn child process for rimraf (speeds up
lerna clean
). (@roblg) - #543 [clean] Support
--include-filtered-dependencies
flag. (@roblg) - #412 Make bootstrap, exec and run commands execute packages in dependency order by default. (@seansfkelley)
- #373 [Feature] Log stdout when commands fail. Closes #343.. (@seansfkelley)
- #542 Fixes issue: prepublish not running in dependencies with
--scope --include-filtered-dependencies
. (@roblg)
When running lerna bootstrap --scope foo --include-filtered-dependencies
run prepublish task with the same flags.
- #465 Add a note about lerna-wizard.. (@szarouski)
- #554 Bump
cross-env
.. (@wtgtybhertgeghgtwtg) - #560 redo labels [skip ci]. (@hzoo)
- #559 Drop
isarray
.. (@wtgtybhertgeghgtwtg) - #557 Fix broken hoisting tests. (@doug-wade)
- #549 Bump
signal-exit
.. (@wtgtybhertgeghgtwtg) - #548 Bump
object-assigned-sorted
.. (@wtgtybhertgeghgtwtg) - #535 Don't include unnecesary files in the npm package. (@gpittarelli)
- #546 Drop
object-assign
.. (@wtgtybhertgeghgtwtg) - #541 Upgrade
inquirer
dependency. (@wtgtybhertgeghgtwtg)
- Bo Borgerson (gigabo)
- Douglas Wade (doug-wade)
- George Pittarelli (gpittarelli)
- Henry Zhu (hzoo)
- Robert Gay (roblg)
- Sean Kelley (seansfkelley)
- Sergey Zarouski (szarouski)
- wtgtybhertgeghgtwtg
- #537 [CRITICAL] Publish command is broken for 2.0.0-beta.33. (@diogofcunha)
- Diogo (diogofcunha)
- Drop Node 0.10/0.12/5
- Custom publish commit message
- Publish to a different remote
- Publish exact versions instead of
^
- #528 Drop node 5 from travis/appveyor. (@chitchu)
- #484 Drop support for node 0.10 and node 0.12. (@doug-wade)
- #460 Add --message option for custom commit msgs when publishing. (@traviskaufman)
Override default message with --message
or -m
lerna publish -m "chore: Publish"
- #508 [Feature] Allow git remote to be changed for publish. (@tdanecker)
Use a different git remote other than origin
lerna publish --git-remote upstream
- #390 [Feature] Adds
--include-filtered-dependencies
flag for bootstrap command. (@lukebatchelor)
my-component
and all of its dependencies will be bootstrapped
lerna bootstrap --scope my-component --include-filtered-dependencies
Use exact versions ("2.1.3"
) instead of with ^
("^2.1.3"
)
lerna publish --exact
- #458 use message passed as argument to the static method input() in PromptUtilities. (@btiwaree)
- #483 467: lerna bootstrap succeeds with 0 packages. (@doug-wade)
- #454 Use close event to wait for spawned processes to finish. (@xaka)
- Bishesh Tiwaree (btiwaree)
- Douglas Wade (doug-wade)
- Pavel Strashkin (xaka)
- Sam Gluck (sdgluck)
- Tenor Biel (L8D)
- Thomas Danecker (tdanecker)
- Travis Kaufman (traviskaufman)
- Vicente Jr Yuchitcho (chitchu)
- lukebatchelor
- #435 Use symlinks with relative paths instead of absolute on non-windows environments (Closes #423).. (@JaapRood)
- #440 Change testing NODE_ENV to "lerna-test" (Closes #406). (@ryb73)
- #444 Use correct logger method for warnings. (@evocateur)
Lerna now supports packages outside of the packages/
directory!
Configured via an array of globs in lerna.json
:
{
"lerna": "2.0.0-beta.31",
"version": "1.1.3",
"packages": ["packages/*"]
}
- #436 Highlight private packages in updated/publish output. (@chrishelgert)
No more confusion about what will actually get published!
Adds a --loglevel [silent|error|warn|success|info|verbose|silly]
option.
Any logs of a higher level than the setting are shown. The default is "info".
- #386 Add --scope and --ignore support for bootstrap, exec, run, clean and ls. (@lukebatchelor)
- #358 Run pre/post install scripts during bootstrap. (@seansfkelley)
- #442 Increase maxBuffer. (@rygine)
- #372 Fix logifyAsync, logifySync decorators. (@seansfkelley)
- Bastian Heist (beheist)
- Ben Briggs (ben-eb)
- Ben Clinkinbeard (bclinkinbeard)
- Bo Borgerson (gigabo)
- Chris Helgert (chrishelgert)
- Elise Chant (elisechant)
- Gary Johnson (garyjN7)
- Henry Zhu (hzoo)
- Ivan Akulov (iamakulov)
- James K (thejameskyle)
- Joscha Feth (joscha)
- MURAKAMI Masahiko (fossamagna)
- Sean Kelley (seansfkelley)
- Teppei Sato (teppeis)
- lukebatchelor