Closed neo1203 closed 2 years ago
@eirslett , any feedback on this PR ?
Can we somehow auto-detect isYarnBerry
instead of specifying it in the pom?
That's a nice suggestion.
We can detect the .yarnrc.yml file in the project folder.
In that case, I would still suggest to keep that additional isYarnBerry
flag to handle corner cases.
Possible values and behavior :
Would that be OK with you ? If it is, I will update the PR with that implementation
I don't even think we need the force enable/disable. We could add it later on, if anybody really needs it (which I highly doubt). My concern is to keep the number of configuration parameters in the plugin as low as possible.
Changes done.
I added support for multi-module Maven projects as part of the detection mechanism. In these setups the .yarnrc.yml
file will typically be located at the root of the project and not in individual sub-folders, especially if one wants to leverage the Yarn Workspaces feature.
thanks!
@neo1203 @eirslett when using
> yarn set version stable main(origin/main)
➤ YN0000: Retrieving https://repo.yarnpkg.com/3.6.3/packages/yarnpkg-cli/bin/yarn.js
➤ YN0000: Saving the new release in .yarn/releases/yarn-3.6.3.cjs
➤ YN0000: Done in 0s 441ms
It downloads the js locally.
Instead of pre-installing a version of yarn, why not just directly downloading the 2.x+ version from this repo: https://repo.yarnpkg.com/[2.x+]/packages/yarnpkg-cli/bin/yarn.js ?
This would make installation consistant with the other versions configs?
Summary
Fixes #928. Added a compatibility flag for Yarn 2.x and above (Berry) so maven-frontend-plugin doesn't consider reported version as invalid anymore and doesn't try to re-install Yarn every time it runs.
Tests and Documentation
Updated CHANGELOG.md and README.md with details about the new flag