-
-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Specifying latest version with Lerna monorepos #106
Comments
I think you need a version in the root package.json regardless, or npm will complain too. Just set private true and there’s no risk of publishing. |
We use yarn, which I don't think minds. That said, I'd be happy to add a version to the root file, but my understanding was that lerna does not update it, which means we have to manually sync it (or add another custom script). |
You wouldn’t have to - you can leave it at 0.0.0 forever. |
That would fix the error when running |
@edmorley I've added support for |
That works great - thank you! :-) |
Hi!
We use Lerna with our monorepo. As such the repo root
package.json
does not contain aversion
property, and instead the packages live underpackages/*
thanks to Yarn's workspaces feature.This means that we cannot pass
--package
to auto-changelog, otherwise we get the following error:auto-changelog: Generating changelog…TypeError: Invalid Version: vundefined
As a workaround, we're planning on using something like this:
auto-changelog --latest-version $(jq -r .version lerna.json)
...however I was wondering whether this is something that you'd be open to auto-changelog supporting? (If only because using bash subcommands makes the package.json script not compatible with Windows.)
Possible options:
--package
option accepting arguments, so that we could pass--package lerna.json
(since it also happens to contain aversion
property) or--package packages/neutrino/package.json
--package
option automatically falling back to other locations, if there is noversion
in that file (eg it could scan the workspace directories, or know to trylerna.json
)--lerna-version
option that specifically useslerna.json
Thoughts? (I'm happy to open a PR if/when a design direction is agreed :-))
CC @eliperelman
The text was updated successfully, but these errors were encountered: