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) pnp workspace support by mufasa71 · Pull Request #1393 · volta-cli/volta

Conversation

@mufasa71

@mufasa71 mufasa71 commented Dec 3, 2022

Copy link
Copy Markdown
Contributor

Yarn berry works great with single mode, but does not works if inside workspace directory. I found that this line does not respect root monorepo:

volta/crates/volta-core/src/project/mod.rs

Line 176 in 7827ade

pub fn is_yarn_pnp(&self) -> bool {

as it expect .pnp.js on same level as root dir. But workspace dir does not have .pnp.js hence it works fine with yarn berry. like yarn why packagename

Sorry, something went wrong.

Uh oh!

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

All reactions
charlespierce
charlespierce requested 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.

Thanks for taking this on! A suggestion to avoid duplicating work. Also, there may be some merge conflicts with #1388 which is adding another file to the checks here, so if that is merged first, it will need to be resolved.

Sorry, something went wrong.

Uh oh!

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

xg-wang reacted with heart emoji
All reactions
  • ❤️ 1 reaction
Comment thread crates/volta-core/src/project/mod.rs Outdated
base_dir.join(".pnp.js").exists()
|| base_dir.join(".pnp.cjs").exists()
|| self
.workspace_roots()

@charlespierce charlespierce Dec 3, 2022

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.

I think this winds up duplicating work: self.workspace_roots() includes as the first entry the parent of self.manifest_file, so we're re-checking that. Instead, I think this check that you have is already exactly what we want (and can replace the whole self.manifest_file... check)

self
    .workspace_roots()
    .any(|dir| dir.join(".pnp.cjs").exists() || dir.join(".pnp.js").exists())

Sorry, something went wrong.

Uh oh!

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

All reactions

@mufasa71 mufasa71 Dec 4, 2022

Copy link
Copy Markdown
Contributor Author

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.

Thanks I applied changes, will wait until #1388 is merged to resolve conflicts.

Sorry, something went wrong.

Uh oh!

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

xg-wang reacted with heart emoji
All reactions
  • ❤️ 1 reaction

@mufasa71 mufasa71 Jan 14, 2023

Copy link
Copy Markdown
Contributor Author

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.

Looks like #1388 is merged, can we merge this now?

Sorry, something went wrong.

Uh oh!

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

All reactions
mufasa71 added 2 commits January 14, 2023 13:06
@mufasa71
fix(yarn) pnp workspace support
7664eaa
@mufasa71
Simplify pnp manifest search
1eb7602
@mufasa71
mufasa71 requested a review from charlespierce January 14, 2023 08:18
charlespierce
charlespierce approved these changes Jan 24, 2023
View reviewed changes
@charlespierce
charlespierce merged commit dc6f5b5 into volta-cli:main Jan 24, 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

@mufasa71 @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.