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
[Question] Yarn 2 was released in Jan. What does it mean for Lerna future? #2449
Comments
Having 3 months pass without any response to this very reasonable inquiry does not instill much confidence. Are there any updates on this? Even a high level sentence or two would be useful for project planning. |
Could you be more specific with your question? |
These lines in
and these lines in
|
Is it the goal of the Lerna project to be compatible with Yarn v2? |
I'm planning to try https://rushstack.io instead of Lerna and yarn workspaces. |
Having the same yarn 2 compatibility problem with lerna. @flybayer is rushstack worh it ? |
@goldo haven't been able to try it yet |
For what it's worth - I ended up doing the following to get around this issue:
That allows me to continue using Yarn 2 with Lerna in this monorepo. I'm assuming if I were to add a new package and needed it linked, I'd have to downgrade to Yarn Classic again to bootstrap. For now, this works. [Edit] Had to bail on this. Various things still weren't working when you have a CRA and packages in the same monorepo. We still have everything in one repo, but the CRA apps and the packages are treated as separate Yarn/Lerna projects. The "npm-feed" project uses Lerna to build and publish. The CRA apps reference packages published to our private npm feed. |
Surprisingly and somewhat disappointing that well over a year after Yarn2 was released, Lerna still doesn't support it. In a project I'm working on, I want to leverage the enhanced working environment and overall speed that Yarn2 offers, especially it's support for workspaces and plugins. Unfortunately I don't have a choice in leaning away from Lerna. |
Agree, I'm moving away from lerna. unlerna for me! |
@jmitchell38488 @iamrommel What are the lerna alternatives that you explored? |
I use lerna with yarn 2 and it works perfectly with workspaces, just don't use |
The lerna 3.x is working fine for me right now. I'm preemptively exploring moving away from lerna for my monorepo setup for concerns largely around lack of maintenance raised in #2703 For example, GitHub shows security advisory for ssri dependency of lerna for 3.x which is reported in GitHub issue #2856 Although lerna 4.x was released as response to #2703 (comment), the issues reported on 4.x are not triaged or responded to by maintainers (example #2841). Also, as per the download counts of lerna npm package, lerna 3.x is still downloaded three times that of lerna 4.x. |
@trivik
|
Update: yarn 3 was released today. |
Didn't succeed to have the versioning of Lerna with yarn v2 on my side |
Which tools people use right now with yarn v3 inside a monorepo to bump automatically their version with conventional commits ? |
Yarn (berry) with changesets seems to be the best choice as per the discussion in #2703 (comment) |
Any news regarding the support for yarn 2/3? We started to use lerna at work and we prefer not to move to another tool. |
@dudulasry I use lerna with yarn 3 and it works perfectly with workspaces, just don't use |
then how do you handle shared packages in the monorepo? |
what do you mean ? You can check https://github.com/christophehurpeau/nightingale which is open source and might help, its currently using |
right, in your case these are just separate projects that live in the same repo, but lets say for example you have a |
These are not separated packages, symlinks are created with yarn workspaces (for example, nightingale uses nightingale-logger) |
Is it correct that lerna doesn't support yarn2 yet? I'm curious about the current progress. |
@Jay-flow as of Jan 12, 2022, only However, other parts of lerna (v4, that I use) work well. As @christophehurpeau noted, it's basically yarn v2/v3 workspaces now, with lerna added on top. |
I see your point. Thank you :) |
I know this is slightly off-topic, but does anyone know if Lerna is compatible with NPM Workspaces? I know that with yarn, you can set However, I don't want to use Yarn because v1 is no longer maintained, and the community has not embraced v2/3, including Lerna. It's really a frustrating and sad state of affairs. Am I the only one who thinks this way? It appears so because I can't find anything online that documents best practices for using Lerna with NPM Workspaces. |
@johncmunson I have been using Yarn v2/v3 and in cases where pnp breaks the project, I just use None of my projects now use yarn v1. Everything works great with yarn v3. |
@johncmunson I use NPM workspaces with lerna and it works great. |
👑 ~/Desktop/slate git:(main) $ lerna bootstrap $ yarn install [--json] [--immutable] [--immutable-cache] [--check-cache] [--inline-builds] [--mode #0] |
Some news from nwrl #3140 (reply in thread) |
Hello, any fresh news on this? It's been > 6 months since NWRL took over and they mentioned support for Yarn Berry in the post. Is this work planned at this time? |
Hi, I can't seem to figure out if lerna support yarn 2+ / berry or not. I have a package where I use the workspace ranges in a peer dependency. However in my published package the Lerna seems to have built-in support for the syntax though lerna/libs/commands/publish/src/index.ts Line 680 in b826398
Not sure what is going on here... Furthermore if lerna is using Using the correct command should take care of all above workspace stuff
Anyone know why my workspace range for my peer dependency doesn't work? {
"peerDependencies": {
"my-pkg": "workspace:^"
}
} NB. I'm using Yarn 3.5.0 |
Hi @snebjorn , Lerna does support Yarn berry with |
NPM doesn't seem to support workspace ranges ( Will Lerna v7 be using Yarn's features as a low-level layer instead of its own implementation when applicable?
Or should I open a bug report on usage of workspace ranges in peer dependencies? Opened issue |
what is current status? but when want to create new version with
lerna version: 7.1.4 also I'm use |
Yarn 2 aka berry stable version was released in January 2020.
Yarn 1 will be in maintenance mode only.
Yarn 2 is rewritten from scratch and has extended support for workspaces, its plugin architecture has benefits for tools such lerna.
There is good summary of yarn 2 features in article by one of the yarn authors. Lerna is mentioned more times.
Do you have any plans with lerna related to new yarn? Maybe some yarn 2 plugin? Maybe as another project? Will be yarn 2 supported with lerna?
The text was updated successfully, but these errors were encountered: