Open bitabs opened 2 years ago
Cross linking to a discussion on the subject https://github.com/intuit/auto/discussions/2281
Hi there - It's been more than a year and I'd like an update on the status of this issue? @hipstersmoothie @jackw
FYI, we're not using yarn workspaces, but rather ppm workspaces. Most of our packages references through "workspace:*"
.
Please advice. Thanks
Whilst I might have contributed to this project I don't maintain it so the following could be incorrect...
To the best of my knowledge (amongst other things) Auto is a wrapper around Lerna that glues it to github labels, etc.
Looking at the error reported above this isn't Auto that's causing the issue but Lerna 4 which doesn't support PNPM or the workspace:
protocol. I would suggest trying to bump Lerna to at least 5.5.1 and follow the documentation guide for using pnpm with Lerna. If Auto is then failing with other errors I'd suggest reporting them here.
Thank you. I may have lived under the rock and had no idea that Lerna 6 has been out. Will have a read on their doc. Thank you 🙏
Would anyone want to help upgrade lerna? I would merge that PR
I took a quick look at the codebase and other than the root package.json
(which I see has just been bumped to latest) I cannot find any reference to lerna
as a dependency of the packages. I can see calls to npx lerna
in core and the npm plugin.
Would setting lerna
as a peerDependency in auto
and @auto-it/npm
be enough? We're currently running auto@10.46.0 with lerna@6.6.2 without problems in this repo. Maybe something like the following to limit to last two major releases and prevent unwanted issues when lerna 8 is released without auto having the chance to test it still works?
peerDependencies: {
"lerna": ">=6.0.0 < 8.0.0",
}
I just upgraded us to 7. Do you think the peer dep would be better?
Sorry for not replying sooner...
I just upgraded us to 7. Do you think the peer dep would be better?
I was under the impression the upgrade was for the repo itself rather than for consumers of the auto packages? Maybe I've misunderstood your request to help update lerna. I was assuming it was related to this issue of lerna and pnpm support.
Right now if I create a project, add auto
and select the npm package manager plugin there is no version of lerna added to the project.
If we add the peerDependencies
to the auto and auto/npm packages on install the user would be told about the missing peer dependency of lerna. If they try to install a version that isn't inside whatever semver range auto supports it will again warn which would at least tell devs "this is what auto supports". Dunno, maybe I just misunderstood the relation between the issue and your request for help to bump lerna. 😄
I just spent more than an hour combing over the docs and source code to uncover the relationship between lerna and auto. The first place I looked was in the package.json files, expecting to see a peer dep listed.
A line like this will fail if lerna isn't installed (or maybe it will hang forever waiting for permission to install lerna?): https://github.com/intuit/auto/blob/7a6f0ae37414b9c56ea7db6547873b77c4dfb425/packages/core/src/utils/get-lerna-packages.ts#L15
I actually don't see any other places where lerna is called directly (maybe I don't know where to look), although it appears that the npm plugin still relies on the presence of an lerna.json file to decide if it's dealing with a monorepo.
@heygrady you are correct.
@jackw could you make a PR to fix the peer dep?
@hipstersmoothie I'll get something together asap. 👍
Thanks!
if it helps anyone in the meantime, i installed lerna@8.1.2
and also listed packages in my lerna.json
for things to work (even tho i'm not using lerna anywhere else).
Hi there,
We are using pnpm for our monorepo. Some of our dependencies are listed like so (in package.json):
You can find the documentation on pnpm workspace: https://www.pnpm.cn/workspaces
Unfortunately, this has caused the following error message when we run auto shipit:
Will auto support pnpm soon enough so we can leverage this great feature?
Thanks