-
Notifications
You must be signed in to change notification settings - Fork 2.3k
RFC: Improving lerna publish #1767
Copy link
Copy link
Closed as not planned
Description
Proposal for the future of lerna publish:
- deprecate automatic versioning, use
lerna versionfirst instead- this enables a more reliable & retryable
lerna publishand removes functionality that’s duplicated betweenlerna versionandlerna publish
- this enables a more reliable & retryable
- switch to libnpmpublish instead of shelling out to npm/yarn
- This allows us to avoid a lot of the weird issues that can happen due to things like $PATH, different versions of npm/yarn, and the different capabilities of each.
- separate tagging as “latest” (dist-tag) from publishing the tarball, as to make “lerna publish” not give partial “latest” releases
- Essentially whilst a publish is ongoing, installs should not fail
- This also moves us towards a more “release” based model, which seems to be what people intend (looking at apollo/babel/etc)
- implement retries via checking the registry for each package at a given version, giving the option to abort the publish or continue
- this allows for partial publishes to succeed, related to splitting versioning and publishing
- switch to serial/sequential/queue-based publishing of packages
- This gives better error handling and OTP support
- Concurrent publishes lead to a lot of error conditions resulting in complex code & hard to debug errors
- remove execScripts
- this functionality is only used by a small subset of lerna users, and is probably better done via a custom “publish” command in your package.json at root level. Or via a custom wrapler around lerna
These are my initial thoughts, and I’m definitely interested to keep discussing these to inform development decisions.
The above list is based on some private conversation with various people, and opens up doors for future developments or improvements whilst greatly simplifying the codebase.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels