bolt
bolt copied to clipboard
RFC: Plans for future `bolt publish`
Just putting some of our discussion about bolt publish here for further discussion and visibility.
Current state
bolt publish currently only accepts one flag (--access) and will currently do the following:
* fetch the latest version of each (non-private) package in the project (npm info packageName version)
* compares these versions to the ones on disk
* for each package who's local version is semver.gt than the version on npm
* npm publish is called (with --access flag passed in)
Feature request
- Users would like to be able to pass the
--tagflag in as well.- To support this we might need to think about how the flags get applied to all the packages being published (should it apply to all of them?)
Going forward
I think the first thing we should think about is how different users will be using the publish feature.
- They have a tool that is bumping versions and dependencies and need to publish all packages that are ahead of npm (i.e
bolt release) - They are doing manual versioning (manual meaning on their local machine, they could be using
bolt versionfor example).- They might want to also be doing tagged releases here
- They have a mono-repo but want lock-stepped versioning across all the packages and want them all the release together (i.e https://github.com/electron-userland/electron-forge CC: @MarshallOfSound )
Suggested Plan
I think we can solve all of these usecases by doing the following
if: we are in a package instead of a project root:
just pass flags on and call `npm publish`
exit
if: we are in a non-interactive shell
(go with current behaviour)
get all package versions from npm
get list of our packages that are ahead of npm version (being careful with `semver.gt`
run `npm publish` with whichever flags were passed to us
warn/throw if npm is ahead of us
exit
collect list of packages that are ahead of npm
show list to user and allow them to select which they want to publish
publish only those
Any/all of this functionality could live behind flags (--all, --interactive, --warnOnNpmAhead, just wanted to get this up here for discussion
When this would be implemented?
Hi, any news on how the publishing stuff is going at all?
This project in Lernaland:
https://github.com/effervescentia/iolaus
...has some really good concepts? The whole semantic-release/changelog is great!
But yeah, any movement here at all?