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

fix: yarn peers #7932

Merged
merged 2 commits into from
Mar 19, 2025
Merged

fix: yarn peers #7932

merged 2 commits into from
Mar 19, 2025

Conversation

snowystinger
Copy link
Member

@snowystinger snowystinger commented Mar 14, 2025

Closes #7909

I'm not sure why yarn didn't create warnings for us during install in our own project. I've added it as a constraint rule, so we'll know in the future if we violate this again.

I tested against the test repo listed in the original issue, I no longer get which I did get when using the starting state.

Some peer dependencies are incorrectly met by dependencies; run yarn explain peer-requirements for details.

upon yarn install and I checked the old pnp.cjs vs the new one, the line pointed out in the comment is now different and I think correct.
Screenshot 2025-03-14 at 1 31 57 pm

Steps to run against test repo:

  1. in react spectrum, run ./scripts/verdaccio.sh
  2. wait until Press a key to close server and cleanup is displayed
  3. go to test repo
yarn cache clean
yarn config set unsafeHttpWhitelist localhost
yarn config set npmRegistryServer "http://localhost:4000"
yarn install

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

🧢 Your Project:

@@ -142,6 +144,38 @@ function enforceWorkspaceDependencies({Yarn}) {
}
}
}

// This finds all the peer dependencies and checks that everything up the
// workspace tree has the same peer dependency.
Copy link
Member

Choose a reason for hiding this comment

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

Doesn't yarn itself check these? How did you find them in the first place?

Copy link
Member Author

Choose a reason for hiding this comment

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

I thought yarn should catch these, but for some reason it didn't, I don't know why.

Found them through the issue that was opened against us and by running the command I listed in the description on their reproduction repo.

I'd like to get this fixed for the user and then spend some time figuring out if there is a bug in yarn, possibly upgrading to a newer version would fix it.

@snowystinger snowystinger enabled auto-merge March 19, 2025 00:18
Copy link
Member

@LFDanLu LFDanLu left a comment

Choose a reason for hiding this comment

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

Verified before and after with the test repo, confirmed the peer dep warning didn't come up when using this branch via verdaccio

@snowystinger snowystinger added this pull request to the merge queue Mar 19, 2025
Merged via the queue into main with commit 27e5ef1 Mar 19, 2025
31 checks passed
@snowystinger snowystinger deleted the fix-yarn-peers branch March 19, 2025 00:36
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.

ListView: from 3.38 slots appear to not work
3 participants