Skip to content

Conversation

rubencarvalho
Copy link
Contributor

@rubencarvalho rubencarvalho commented Jan 8, 2025

Description

This PR upgrades our package management from Yarn Classic to Yarn 4.6.0 and modernizes our build pipeline.

Motivation and context

Our build pipeline needed some love (aka modernization) to take advantage of newer package management features and to align our project with our upstream Spectrum CSS dependency. The upgrade to Yarn 4 should provide better dependency resolution, improved performance, and more reliable builds. (Also, no more wireit warning logs filling up the terminal!)

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (minor updates related to the tooling or maintenance of the repository, does not impact compiled assets)

Checklist

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • If my change required a change to the documentation, I have updated the documentation in this pull request.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have reviewed at the Accessibility Practices for this feature, see: Aria Practices

Best practices

This repository uses conventional commit syntax for each commit message; note that the GitHub UI does not use this by default so be cautious when accepting suggested changes. Avoid the "Update branch" button on the pull request and opt instead for rebasing your branch against main.

Copy link

changeset-bot bot commented Jan 8, 2025

⚠️ No Changeset found

Latest commit: a21bd04

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@rubencarvalho rubencarvalho force-pushed the ruben/bump-yarn branch 3 times, most recently from b92016a to 901848e Compare January 8, 2025 12:15
Copy link
Contributor

github-actions bot commented Jan 8, 2025

Branch preview

Review the following VRT differences

When a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:

If the changes are expected, update the current_golden_images_cache hash in the circleci config to accept the new images. Instructions are included in that file.
If the changes are unexpected, you can investigate the cause of the differences and update the code accordingly.

Copy link
Contributor

github-actions bot commented Jan 8, 2025

Tachometer results

Currently, no packages are changed by this PR...

@coveralls
Copy link
Collaborator

coveralls commented Jan 8, 2025

Pull Request Test Coverage Report for Build 12776475618

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.003%) to 98.206%

Totals Coverage Status
Change from base Build 12766815724: -0.003%
Covered Lines: 33006
Relevant Lines: 33430

💛 - Coveralls

@rubencarvalho rubencarvalho force-pushed the ruben/bump-yarn branch 3 times, most recently from 27a63f7 to bafc5e9 Compare January 10, 2025 10:16
Copy link
Contributor

github-actions bot commented Jan 14, 2025

Lighthouse scores

Category Latest (report) Main (report) Branch (report)
Performance 0.99 0.99 0.99
Accessibility 1 1 1
Best Practices 1 1 1
SEO 1 0.92 0.92
PWA 1 1 1
What is this?

Lighthouse scores comparing the documentation site built from the PR ("Branch") to that of the production documentation site ("Latest") and the build currently on main ("Main"). Higher scores are better, but note that the SEO scores on Netlify URLs are artifically constrained to 0.92.

Transfer Size

Category Latest Main Branch
Total 251.297 kB 236.557 kB 236.499 kB 🏆
Scripts 61.413 kB 54.21 kB 54.067 kB 🏆
Stylesheet 53.767 kB 47.854 kB 🏆 47.881 kB
Document 6.242 kB 5.486 kB 🏆 5.488 kB
Font 126.85 kB 126.596 kB 126.596 kB

Request Count

Category Latest Main Branch
Total 52 52 52
Scripts 41 41 41
Stylesheet 5 5 5
Document 1 1 1
Font 2 2 2

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We had two different versions being pinned—one byicons (.17) and another by icons-workflow (.16). In Yarn Classic, both were resolved to the lowest version, but in Yarn V4, they were resolved to the highest version. This difference caused some regressions. Pinning both to the same (older, lower) version fixed the issue.

downstream:
steps:
- checkout
# - restore_cache:
Copy link
Contributor Author

@rubencarvalho rubencarvalho Jan 14, 2025

Choose a reason for hiding this comment

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

We had commented these lines out earlier to cache-bust. Although it doesn’t provide a significant benefit (just sub-minute run time improvements), I’ve re-added it.

cacheFolder: ~/.cache/yarn
nodeLinker: node-modules
yarnPath: .yarn/releases/yarn-4.6.0.cjs
enableScripts: true
Copy link
Contributor Author

Choose a reason for hiding this comment

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

enableScripts is needed while we still have pre/post install commands

Copy link
Contributor

Choose a reason for hiding this comment

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

can we make this comment with a @todo remove when pre/post install commands are moved to the new yarn 4 recommended pattern

feel free to wordsmith that lol

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call - just did! :)

- [Storybook](https://${branchSlug}--spectrum-web-components.netlify.app/storybook/)`;
- [Storybook](https://${branchSlug}--spectrum-web-components.netlify.app/storybook/)
// If there are changed packages, add a section with visual regression test results
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I believe we should always have links for VRTs posted. For example, some dependency changes don’t trigger getChangedPackages(), but they can still cause regressions. Since the VRTs run regardless, it’s just a matter of ensuring we see the links.

@rubencarvalho rubencarvalho marked this pull request as ready for review January 14, 2025 17:02
@rubencarvalho rubencarvalho requested a review from a team as a code owner January 14, 2025 17:02
command: yarn docs:build
- run:
name: Build Storybook
command: yarn storybook:build
Copy link
Contributor

Choose a reason for hiding this comment

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

you have no clue how happy this makes me!! thank you for breaking the steps out and moving away from an overly complex command!

Copy link
Contributor

@castastrophe castastrophe left a comment

Choose a reason for hiding this comment

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

This looks perfect! A good, focused update to the latest package. I haven't pulled down locally but the code itself is approved pending validations.

Copy link
Contributor

@caseyisonit caseyisonit left a comment

Choose a reason for hiding this comment

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

good work 🚀

@rubencarvalho rubencarvalho merged commit 29b4959 into main Jan 14, 2025
27 checks passed
@rubencarvalho rubencarvalho deleted the ruben/bump-yarn branch January 14, 2025 22:45
nikkimk pushed a commit that referenced this pull request Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants