这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@anthonyshew
Copy link
Contributor

Description

Fixes #2791

Testing Instructions

Tests have been added for the previous failing cases

@anthonyshew anthonyshew requested a review from a team as a code owner July 4, 2025 02:23
@vercel
Copy link
Contributor

vercel bot commented Jul 4, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
examples-basic-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 4, 2025 2:55am
examples-designsystem-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 4, 2025 2:55am
examples-gatsby-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 4, 2025 2:55am
examples-kitchensink-blog ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 4, 2025 2:55am
examples-native-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 4, 2025 2:55am
examples-nonmonorepo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 4, 2025 2:55am
examples-svelte-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 4, 2025 2:55am
examples-tailwind-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 4, 2025 2:55am
examples-vite-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 4, 2025 2:55am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
turbo-site ⬜️ Skipped (Inspect) Jul 4, 2025 2:55am

…iptors

The Berry lockfile resolution fix now correctly preserves both the original
descriptor (as used by packages) and the resolved descriptor (from yarn
resolutions) in the pruned lockfile. This allows packages to find their
dependencies using either descriptor form.

Updated test expectation from:
  "is-odd@npm:3.0.0"
to:
  "is-odd@^0.1.2, is-odd@npm:3.0.0"

This reflects the correct behavior where yarn combines multiple descriptors
that resolve to the same package into a single entry.
$ grep -F '"is-odd@npm:' out/yarn.lock
"is-odd@npm:3.0.0":
$ grep -F '"is-odd@' out/yarn.lock
"is-odd@^0.1.2, is-odd@npm:3.0.0":
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@chris-olszewski I'm pretty dubious of this.

Copy link
Contributor

Choose a reason for hiding this comment

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

This isn't correct. Either:

  • We're now emitting is-odd@^0.1.2 in yarn.lock which is an invalid locator
  • We're not emitting that and this test change will fail

Copy link
Contributor

@chris-olszewski chris-olszewski left a comment

Choose a reason for hiding this comment

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

We need some real tests with real lockfiles to verify this change. I'm pretty suspect of it as it currently stands.

Comment on lines +1241 to +1242
resolutions: Some(
[("ajv".to_string(), "^8".to_string())]
Copy link
Contributor

Choose a reason for hiding this comment

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

We need to actually recreate the fixture lockfile and not just set resolutions here.

@anthonyshew
Copy link
Contributor Author

This PR was part of an experiment I was doing to test how fast we could reliably go in the repo with LLMs. We've seen enough PRs we don't like come through that we think could be improved by first circling back to improve the health of the codebase. As a first step, we're going to be investing in test coverage.

Closing this PR with these interests in mind.

@anthonyshew anthonyshew closed this Jul 7, 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.

[turborepo] [yarn 3] pruned lockfile missing resolution entries

3 participants