Skip to content
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

build: upgrade to yarn 4.1.1 #2546

Merged
merged 1 commit into from
Apr 18, 2024
Merged

build: upgrade to yarn 4.1.1 #2546

merged 1 commit into from
Apr 18, 2024

Conversation

castastrophe
Copy link
Collaborator

@castastrophe castastrophe commented Feb 20, 2024

Description

Why upgrade from yarn 1.x (aka classic)?

Stability: Yarn Modern came after years of experience with maintaining Classic; its design was informed by the shortcomings we saw, and as a result the software is much more stable than it ever was.

New features: Yarn Modern provides many new features that didn't exist in Yarn 1.x - or any other package managers for that matter. As an example, Constraints are exclusive to Yarn Modern.

Flexibility: Yarn Modern supports all three installation strategies: Yarn PnP, node_modules, and via a pnpm-like content-addressed cache. No matter which one you prefer, you have it at your disposal.

Extensibility: Yarn Modern's architecture allows you to build your own features as you need it. No need to wait for us to implement this feature you hope for - you can now implement it yourself, according to your own specs, and use it straight away! Focused workspaces, custom installs, project validation, ...

Future proof: Yarn Modern was built after we started to see how difficult it was to build new features on Yarn Classic, with most changes having unpredictable consequences. This plateau has been solved, as evidenced by the slate of features that we released in the past few major releases.

My reasons for support an upgrade to Yarn Modern is it's tooling around monorepo management (see constraints, versioning, interactive upgrades, and a strong set of command-line tools).

How and where has this been tested?

Please tag yourself on the tests you've marked complete to confirm the tests have been run by someone other than the author.

Validation steps

Setting up your environment:

  1. corepack enable more detailed instructions
  2. nvm use to ensure you are using the right version of node
  3. yarn install - expect the output formatting to be quite colorful compared with yarn 1

Regression testing

Validate:

  1. No command line regressions: @mdt2
  • yarn install
  • yarn build
  • yarn dev
  • yarn start
  1. The documentation pages for at least two other components are still loading, including:
  • The pages render correctly, are accessible, and are responsive.
  1. If components have been modified, VRTs have been run on this branch:
  • VRTs have been run and looked at.
  • Any VRT changes have been accepted (by reviewer and/or PR author), or there are no changes.

To-do list

  • I have read the contribution guidelines.
  • I have updated relevant storybook stories and templates.
  • I have tested these changes in Windows High Contrast mode.
  • If my change impacts other components, I have tested to make sure they don't break.
  • If my change impacts documentation, I have updated the documentation accordingly.
  • ✨ This pull request is ready to merge. ✨

@castastrophe castastrophe force-pushed the build-latest-yarn-setup branch 13 times, most recently from 90c5a1e to 982d30d Compare February 22, 2024 22:56
@castastrophe castastrophe marked this pull request as ready for review February 22, 2024 22:58
Copy link
Contributor

github-actions bot commented Feb 22, 2024

🚀 Deployed on https://pr-2546--spectrum-css.netlify.app

Copy link
Contributor

github-actions bot commented Feb 22, 2024

File metrics

Summary

Total size: 4.57 MB*

🎉 No changes detected in any packages

* Size determined by adding together the size of the main file for all packages in the library.
* Results are not gzipped or minified.
* An ASCII character in UTF-8 is 8 bits or 1 byte.

@castastrophe castastrophe force-pushed the build-latest-yarn-setup branch 4 times, most recently from 981a6c0 to 133a86b Compare February 28, 2024 19:29
@castastrophe castastrophe marked this pull request as draft March 25, 2024 14:11
@castastrophe castastrophe marked this pull request as ready for review April 2, 2024 18:45
@castastrophe castastrophe self-assigned this Apr 2, 2024
@castastrophe castastrophe added build Issues associated with the build process; often a refactor ready-for-review labels Apr 2, 2024
@castastrophe castastrophe requested a review from mdt2 April 2, 2024 18:46
@castastrophe castastrophe added the run_vrt For use on PRs looking to kick off VRT label Apr 2, 2024
@castastrophe castastrophe force-pushed the build-latest-yarn-setup branch 2 times, most recently from 6dc25b9 to 175e783 Compare April 11, 2024 20:42
@castastrophe castastrophe changed the title build: upgrade to yarn 3 build: upgrade to yarn 4.1.1 Apr 11, 2024
@castastrophe castastrophe force-pushed the build-latest-yarn-setup branch 3 times, most recently from 165c641 to 43e9b3b Compare April 12, 2024 13:42
Copy link
Collaborator

@mdt2 mdt2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is working well for me after the addition of node-gyp to the dependencies ✨

Copy link
Collaborator

@rise-erpelding rise-erpelding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This appears to be working well for me, no issues!

@jawinn jawinn self-requested a review April 15, 2024 18:47
Copy link
Collaborator

@jawinn jawinn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! These steps all appear to be working. After it built successfully, I clicked through a bunch of components in the docs and in Storybook and did not see anything off.

One thing I wanted to note were a few of the warnings after yarn install. These might be worth some followup work. The prettier version caught my attention.

Screenshot 2024-04-15 at 2 39 12 PM

@castastrophe
Copy link
Collaborator Author

Looks good! These steps all appear to be working. After it built successfully, I clicked through a bunch of components in the docs and in Storybook and did not see anything off.

One thing I wanted to note were a few of the warnings after yarn install. These might be worth some followup work. The prettier version caught my attention.

Yes I noticed the prettier warning too. The others are expected due to how we're supporting deprecated components in storybook and some tools require types even if you don't use typescript. I think we should downgrade the eslint prettier plugin though in a separate PR and that should correct the issue we're seeing. We might also be able to update prettier soon if we transition to changesets because lerna is our prettier blocker at the moment.

@castastrophe castastrophe added skip_vrt Add to a PR to skip running VRT (but still pass the action) ready-to-merge and removed run_vrt For use on PRs looking to kick off VRT ready-for-review labels Apr 16, 2024
* refactor(searchwithin): deprecate component
* chore: missing deprecated dependencies in dev build

---------

Co-authored-by: castastrophe <castastrophe@users.noreply.github.com>
@castastrophe castastrophe merged commit 65d1b38 into main Apr 18, 2024
11 checks passed
@castastrophe castastrophe deleted the build-latest-yarn-setup branch April 18, 2024 19:05
castastrophe added a commit that referenced this pull request Apr 18, 2024
* refactor(searchwithin): deprecate component
* chore: missing deprecated dependencies in dev build

---------

Co-authored-by: Melissa Thompson <mthompson@heysparkbox.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues associated with the build process; often a refactor ready-to-merge skip_vrt Add to a PR to skip running VRT (but still pass the action)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants