GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(yarn) detect yarn berry when running bin by xg-wang · Pull Request #1388 · volta-cli/volta

Conversation

@xg-wang

@xg-wang xg-wang commented Nov 24, 2022

Copy link
Copy Markdown
Contributor

Summary

In Yarn 3, binaries should be run via yarn run <bin-name> instead of the assumption of node_modules/.bin/<bin-name>. This is required not only with pnp mode.

Note

I chose to detect .yarnrc.yml because this is how yarn uses yarnPath setup; this may not be required when using corepack, but volta does not support corepack yet.

Ref yarnpkg.com:

Starting from the v2, they must be written in valid Yaml and have the right extension (simply calling your file .yarnrc won't do).

I am very new to Rust, please correct me if there are things that are wrong or can be improved.

Test Plan

Built dev volta and verified it works on one of my yarn berry repo.

Note: cargo test --all --features mock-network seems to be failing because I don't have mockito locally

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@xg-wang
fix(yarn) detect yarn berry to run bin
d49b6b9
In Yarn 3, binaries should be run via `yarn run <bin-name>` instead of
the assumption of `node_modules/.bin/<bin-name>`. This is required not
only with pnp mode.
charlespierce
charlespierce approved these changes Dec 3, 2022
View reviewed changes

@charlespierce charlespierce left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

A small naming suggestion, but otherwise this look good, thank you!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread crates/volta-core/src/project/mod.rs Resolved

Uh oh!

There was an error while loading. Please reload this page.

@xg-wang
rename to needs_yarn_run because pnp also exists in Yarn 1
ca7d365
@mufasa71 mufasa71 mentioned this pull request Dec 4, 2022
fix(yarn) pnp workspace support #1393
Merged
@charlespierce

charlespierce commented Dec 14, 2022

Copy link
Copy Markdown
Contributor

Oh boo, sorry about that! It looks like GitHub requires us to manually approve the CI on follow-up pushes. And there's a small formatting issue failing the format check CI. Can you run cargo fmt to resolve the formatting?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@xg-wang
cargo fmt
7e8f89c
@xg-wang

xg-wang commented Dec 27, 2022

Copy link
Copy Markdown
Contributor Author

@charlespierce oops sorry I missed the message. I pushed the fmt commit.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@charlespierce
charlespierce merged commit 4aa49ff into volta-cli:main Jan 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@charlespierce charlespierce charlespierce approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@xg-wang @charlespierce
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.