Lerna 7 Roadmap #3410
Replies: 4 comments 4 replies
-
That’s going to be a great improvement to have it automatically handled. It isn’t that bad at the moment once you learn that you can call |
Beta Was this translation helpful? Give feedback.
-
One critical component of |
Beta Was this translation helpful? Give feedback.
-
Would be cool to have a function, which will stop managing all dependencies and move them back to each managed package. Additional functionality which would be cool to have, is to pack all listed packages (not external, but the ones managed by lerna) in package.json and move them into node_modules, instead of putting fs links there. Something like That's the problem we have been experiencing while working with lerna all this time. Implementing above workaround. |
Beta Was this translation helpful? Give feedback.
-
Related to @dep's note about "no hoist" #3410 (comment), another issue with the removal of If updating a single package's dependencies always yields a diff to the root As described in
When applied to something like |
Beta Was this translation helpful? Give feedback.
-
We are delighted with what we've achieved with the help of the lerna community in the 6 months since we took over stewardship of Lerna!
For information about what lerna looks like today, including all the exciting stuff that was shipped in Lerna v6, please check out the following resources:
Now let's turn our attention to the near future! 🔮
We will plan to do major releases of lerna about twice per year, landing any number of minor and patch releases in between.
There you can expect Lerna 7 to be the latest version of Lerna around May 2023.
Please read on to see what we have planned for Lerna 7, and note that anything which does not require breaking changes in order to land will be available at some point in Lerna v6 minor releases.
Lerna 7 Focus Areas
--dry-run
forlerna version
andlerna publish
As the longest standing open feature request dating back over 6 years (#51), we are delighted to be able turn our attention to adding powerful
--dry-run
capabilities to both theversion
andpublish
commands.This means that when you pass the
--dry-run
flag you will be able to see a preview of what those commands will do before those updates take effect on disk/over the network.Recoverable
lerna publish
Something we have run into ourselves whilst publishing lots of packages is that if your internet connection is unstable, or if your target registry goes down, whilst running the
publish
command, you can end up in a state where some of your packages have been published, and some haven't.Lerna currently does not give you an easy way to resolve this situation, and it is left to you to iterate through your packages and run the appropriate
npm publish
commands to tidy things up again.In Lerna 7, we want to make it so that
lerna publish
can handle this scenario gracefully, and you won't need to manually runnpm publish
in this scenario any more!Workspace level watch mode for scripts
There is currently no tool that we know about which offers project graph aware file watching when running scripts across an entire workspace. There are plenty of tools which help you spin up lots of watch processes, but these do not ensure that the requisite dependencies between projects are correctly considered when choosing what to rebuild.
In Lerna 7, we are working on a solution for this, so that you can e.g. run the
build
script for all your packages in your workspace inwatch
mode, and have them rebuild in the appropriate and most efficient order, with the full power of the script caching (available by default since Lerna 6) in order to skip unnecessary work.Transitioning away from legacy package management features
Lerna is the original monorepo/workspace tool in the JavaScript ecosystem. When it was created in 2015/2016 the ecosystem looked totally different, and there were no built in capabilities to handle working with multiple packages in a single repository (a "workspace"). Commands like
lerna bootstrap
,lerna add
andlerna link
were all a critical part of the lerna project, because there were no other options.However, now that we find ourselves in late 2022, the fact is that - for many years now - the package managers we know and love (
npm
,yarn
andpnpm
) all fully support that concept of workspaces as a first-class use-case.They have battle tested implementations covering adding, removing and linking local packages, and combining them with third party dependencies in a natural way.
This is the reason why, for the past several years of his tenure as lead maintainer of Lerna @evocateur has been encouraging folks to strongly reconsider their use of the legacy package management commands in lerna, and instead leverage their package manager of choice to do what it does best.
We knew about this context from afar, but as new stewards of the project we did not want to jump straight in and start removing capabilities without first taking the time to get familiar with the reality up close. Now that we have been actively maintaining the project for half a year, we are in full agreement with Daniel and others that the legacy package management commands in lerna need to be retired.
By removing these legacy pieces which have better alternatives natively in package managers, we and the rest of the lerna community will be freed up to concentrate our efforts on things which are uniquely valuable about lerna (such as, but not limited to, versioning and publishing), and making them the best they can be!
From version 7, therefore, we will no longer ship the legacy package management commands (such as
lerna bootstrap
,lerna add
andlerna link
) by default with lerna, and instead make them available as an add-on via a separate package (name TBD).This new package can be thought of as being in maintenance mode only - no new features will be considered for legacy package management concerns (such as
lerna bootstrap
,lerna add
andlerna link
), and we will only look to merge critical patches and security updates.We of course want to make sure that folks who are perhaps less aware of the modern capabilities of their package manager are not left confused by this change, so we will be building out comprehensive migration guides on https://lerna.js.org to help them transition their thinking from a legacy lerna command to its equivalent for
npm
,yarn
orpnpm
.We will also begin immediately communicating this on old issues and PRs related to these commands.
Beta Was this translation helpful? Give feedback.
All reactions