react icon indicating copy to clipboard operation
react copied to clipboard

Update Yarn to version Berry

Open tiziodcaio opened this issue 3 years ago • 13 comments

Summary

I upgraded to yarn v4.0.0, which would not work anymore on nodejs <18.

How did you test this change?

Not everything works at the moment so I make the PR a draft.

Current Issues:

  • [x] We're facing many fails due to issue https://github.com/yarnpkg/berry/issues/3996... Hoping that it will resolve soon

tiziodcaio avatar Apr 07 '22 20:04 tiziodcaio

Upgrading to Yarn 3 is blocked by the lack of Dependabot support: https://github.com/dependabot/dependabot-core/issues/1297

kachkaev avatar Apr 08 '22 11:04 kachkaev

Upgrading to Yarn 3 is blocked by the lack of Dependabot support: dependabot/dependabot-core#1297

Ok no problem, meanwhile I will fix workflows...

Can I suggest yarn upgrade-interactive as an alternative solution?

tiziodcaio avatar Apr 08 '22 11:04 tiziodcaio

Comparing: 2655c9354d8e1c54ba888444220f63e836925caa...7f9136f81d25890c933d38efec983739339105cb

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.min.js = 154.33 kB 154.33 kB = 48.98 kB 48.98 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 156.25 kB 156.25 kB = 49.60 kB 49.60 kB
facebook-www/ReactDOM-prod.classic.js = 533.14 kB 533.14 kB = 94.42 kB 94.42 kB
facebook-www/ReactDOM-prod.modern.js = 518.24 kB 518.24 kB = 92.24 kB 92.24 kB
facebook-www/ReactDOMForked-prod.classic.js = 533.14 kB 533.14 kB = 94.42 kB 94.42 kB
oss-experimental/react/unstable-cache.js +∞% 0.00 kB 0.22 kB +∞% 0.00 kB 0.16 kB
oss-stable-semver/react/unstable-cache.js +∞% 0.00 kB 0.22 kB +∞% 0.00 kB 0.16 kB
oss-stable/react/unstable-cache.js +∞% 0.00 kB 0.22 kB +∞% 0.00 kB 0.16 kB
oss-stable-semver/react-is/umd/react-is.production.min.js = 2.31 kB 0.41 kB = 0.87 kB 0.28 kB
oss-stable/react-is/umd/react-is.production.min.js = 2.31 kB 0.41 kB = 0.87 kB 0.28 kB
oss-experimental/react-is/umd/react-is.production.min.js = 2.34 kB 0.41 kB = 0.87 kB 0.28 kB
oss-stable-semver/react-is/cjs/react-is.production.min.js = 2.27 kB 0.32 kB = 0.78 kB 0.23 kB
oss-stable/react-is/cjs/react-is.production.min.js = 2.27 kB 0.32 kB = 0.78 kB 0.23 kB
oss-experimental/react-is/cjs/react-is.production.min.js = 2.30 kB 0.32 kB = 0.79 kB 0.23 kB
facebook-react-native/react-is/cjs/ReactIs-prod.js = 4.78 kB 0.32 kB = 1.15 kB 0.24 kB
facebook-react-native/react-is/cjs/ReactIs-profiling.js = 4.78 kB 0.32 kB = 1.15 kB 0.24 kB
facebook-www/ReactIs-prod.classic.js = 5.35 kB 0.34 kB = 1.31 kB 0.25 kB
facebook-www/ReactIs-prod.modern.js = 5.35 kB 0.34 kB = 1.31 kB 0.25 kB
oss-stable-semver/react-is/umd/react-is.development.js = 7.88 kB 0.45 kB = 2.09 kB 0.29 kB
oss-stable/react-is/umd/react-is.development.js = 7.88 kB 0.45 kB = 2.09 kB 0.29 kB
oss-experimental/react-is/umd/react-is.development.js = 7.90 kB 0.45 kB = 2.10 kB 0.29 kB
oss-stable-semver/react-is/cjs/react-is.development.js = 7.33 kB 0.41 kB = 2.01 kB 0.28 kB
oss-stable/react-is/cjs/react-is.development.js = 7.33 kB 0.41 kB = 2.01 kB 0.28 kB
oss-experimental/react-is/cjs/react-is.development.js = 7.35 kB 0.41 kB = 2.01 kB 0.28 kB
facebook-react-native/react-is/cjs/ReactIs-dev.js = 7.25 kB 0.39 kB = 1.92 kB 0.28 kB
facebook-www/ReactIs-dev.modern.js = 9.56 kB 0.40 kB = 2.53 kB 0.29 kB
facebook-www/ReactIs-dev.classic.js = 9.56 kB 0.40 kB = 2.54 kB 0.29 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
oss-experimental/react/unstable-cache.js +∞% 0.00 kB 0.22 kB +∞% 0.00 kB 0.16 kB
oss-stable-semver/react/unstable-cache.js +∞% 0.00 kB 0.22 kB +∞% 0.00 kB 0.16 kB
oss-stable/react/unstable-cache.js +∞% 0.00 kB 0.22 kB +∞% 0.00 kB 0.16 kB
oss-stable-semver/react-is/umd/react-is.production.min.js = 2.31 kB 0.41 kB = 0.87 kB 0.28 kB
oss-stable/react-is/umd/react-is.production.min.js = 2.31 kB 0.41 kB = 0.87 kB 0.28 kB
oss-experimental/react-is/umd/react-is.production.min.js = 2.34 kB 0.41 kB = 0.87 kB 0.28 kB
oss-stable-semver/react-is/cjs/react-is.production.min.js = 2.27 kB 0.32 kB = 0.78 kB 0.23 kB
oss-stable/react-is/cjs/react-is.production.min.js = 2.27 kB 0.32 kB = 0.78 kB 0.23 kB
oss-experimental/react-is/cjs/react-is.production.min.js = 2.30 kB 0.32 kB = 0.79 kB 0.23 kB
facebook-react-native/react-is/cjs/ReactIs-prod.js = 4.78 kB 0.32 kB = 1.15 kB 0.24 kB
facebook-react-native/react-is/cjs/ReactIs-profiling.js = 4.78 kB 0.32 kB = 1.15 kB 0.24 kB
facebook-www/ReactIs-prod.classic.js = 5.35 kB 0.34 kB = 1.31 kB 0.25 kB
facebook-www/ReactIs-prod.modern.js = 5.35 kB 0.34 kB = 1.31 kB 0.25 kB
oss-stable-semver/react-is/umd/react-is.development.js = 7.88 kB 0.45 kB = 2.09 kB 0.29 kB
oss-stable/react-is/umd/react-is.development.js = 7.88 kB 0.45 kB = 2.09 kB 0.29 kB
oss-experimental/react-is/umd/react-is.development.js = 7.90 kB 0.45 kB = 2.10 kB 0.29 kB
oss-stable-semver/react-is/cjs/react-is.development.js = 7.33 kB 0.41 kB = 2.01 kB 0.28 kB
oss-stable/react-is/cjs/react-is.development.js = 7.33 kB 0.41 kB = 2.01 kB 0.28 kB
oss-experimental/react-is/cjs/react-is.development.js = 7.35 kB 0.41 kB = 2.01 kB 0.28 kB
facebook-react-native/react-is/cjs/ReactIs-dev.js = 7.25 kB 0.39 kB = 1.92 kB 0.28 kB
facebook-www/ReactIs-dev.modern.js = 9.56 kB 0.40 kB = 2.53 kB 0.29 kB
facebook-www/ReactIs-dev.classic.js = 9.56 kB 0.40 kB = 2.54 kB 0.29 kB

Generated by :no_entry_sign: dangerJS against 7f9136f81d25890c933d38efec983739339105cb

sizebot avatar Apr 08 '22 13:04 sizebot

Upgrading to Yarn 3 is blocked by the lack of Dependabot support: dependabot/dependabot-core#1297

That's not true... I didn't enable pnp so there would not be problems with this type of issue.

tiziodcaio avatar Apr 14 '22 14:04 tiziodcaio

Now we should understanding what fails on the remaining workflows

tiziodcaio avatar Apr 14 '22 14:04 tiziodcaio

Dependabot is not compatible with Yarn 3’s yarn.lock format. Unfortunately, it does not work with nodeLinker: node-modules too.

kachkaev avatar Apr 14 '22 18:04 kachkaev

Update. Dependabot had started to support Yarn 2+ since 20 Oct 2022: https://github.blog/changelog/2022-10-20-dependabot-can-now-generate-security-and-version-updates-for-yarn-v2-and-v3/ Also the issue for Yarn 3 support in dependabot is now closed: https://github.com/dependabot/dependabot-core/issues/5322

Edit. Though at the time being there are still many pending issues with basic Yarn 2+ features: https://github.com/dependabot/dependabot-core/issues/6092 https://github.com/dependabot/dependabot-core/issues/6107

larixer avatar Nov 15 '22 10:11 larixer

Update. Dependabot had started to support Yarn 2+ since 20 Oct 2022: https://github.blog/changelog/2022-10-20-dependabot-can-now-generate-security-and-version-updates-for-yarn-v2-and-v3/ Also the issue for Yarn 3 support in dependabot is now closed: dependabot/dependabot-core#5322

Edit. Though at the time being there are still many pending issues with basic Yarn 2+ features: dependabot/dependabot-core#6092 dependabot/dependabot-core#6107

Great! I wasn't more following this pr, now i will rebase, let's see what's happening with yarn 4 too

tiziodcaio avatar Nov 15 '22 13:11 tiziodcaio

To check if the lockfiles are updated, i use this script (fishshell)

for file in (find . -name "yarn.lock" | grep -v "node_modules")
   set dir (dirname $file)
   echo $dir
   cd $dir
   rm -rf node_modules .yarn yarn.lock
   wget https://raw.githubusercontent.com/facebook/react/main/{$dir}/yarn.lock
   yarn
   yarn dedupe # just in case you are interested into deduping lockfiles.
   prevd
end

tiziodcaio avatar Jan 01 '24 17:01 tiziodcaio

The size diff is too large to display in a single comment. The CircleCI job contains an artifact called 'sizebot-message.md' with the full message.

Generated by :no_entry_sign: dangerJS against 87e59ab6cd7f45bbcbd06d56e47dc2f72a2666bd

react-sizebot avatar May 05 '24 16:05 react-sizebot

This pull request has been automatically marked as stale. If this pull request is still relevant, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize reviewing it yet. Your contribution is very much appreciated.

github-actions[bot] avatar Aug 03 '24 17:08 github-actions[bot]

Bump

tiziodcaio avatar Aug 03 '24 18:08 tiziodcaio