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

yarn is not syncing scoped packages with the offline mirror when automatic pruning is enabled #3509

Closed
mkxml opened this issue May 26, 2017 · 7 comments

Comments

@mkxml
Copy link

mkxml commented May 26, 2017

Do you want to request a feature or report a bug?

Bug

What is the current behavior?

When using and offline mirror and setting yarn-offline-mirror-pruning to true the offline mirror does not sync scoped packages.

If the current behavior is a bug, please provide the steps to reproduce.

I've put up a repo reproducing the bug from scratch. This seems to be closely related to #3154.

The steps to reproduce are simple, you can use an existing yarn-powered project:

  1. Make sure yarn-offline-mirror is configured and yarn-offline-mirror-pruning is set to true in local .yarnrc.
  2. Run yarn add @kadira/storybook.

The package for storybook will not be in the offline mirror directory. It's worth noting that it's underlying dependencies will be added, but the main module won't.

Both package.json and yarn.lock syncing will work as usual, the offline mirror will fail silently.

What is the expected behavior?

It's expected that the offline mirror will be synced with yarn.lock for all packages, including scoped packages.

Please mention your node.js, yarn and operating system version.

Yarn v0.24.6
Node v7.2.2
macOS 10.12.5

@xealot
Copy link

xealot commented Jun 1, 2017

This post enabled me to fix my issue, by excluding yarn-offline-mirror-pruning true from my .yarnrc file.

@mkxml
Copy link
Author

mkxml commented Jun 1, 2017

Yes, I can confirm that without setting yarn-offline-mirror-pruning to true the problem does not appear.

@bestander
Copy link
Member

PR with a fix is welcome

@bestander
Copy link
Member

pruneOfflineMirror is just a function in install.js, should be a straight forward fix.
cc @dguo

@brianhorst
Copy link

I tried offline pruning true with scoped packages on the 0.27.3 RC and it is working as expected. I don't know exactly what changed, but it was probably something for #3154. This can probably be closed.

@dguo
Copy link
Contributor

dguo commented Jun 30, 2017

Thanks for the update. I was planning to look into this issue today, but I'm glad to hear it appears to be fixed already.

@bestander
Copy link
Member

Thanks for reporting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants