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 workspaces "prepare" dependencies #6645

Open
john-jjj opened this issue Nov 7, 2018 · 1 comment
Open

Yarn workspaces "prepare" dependencies #6645

john-jjj opened this issue Nov 7, 2018 · 1 comment
Assignees
Labels

Comments

@john-jjj
Copy link

john-jjj commented Nov 7, 2018

What is the current behavior?

$ yarn -v
1.10.1
$ uname -a
[...]18.0.0 Darwin Kernel Version 18.0.0[...]
$ node -v
v10.10.0

We are using the workspace feature with a package.json at the root of the workspace looking like:

{
  "private": true,
  "workspaces": {
    "packages": [
      "A",
      "B"
    ],
    "nohoist": [
      "C",
    ]
  }
}
  • Dependency graph
C -> A
C -> B

Each of A and B are TypeScript packages which uses the target prepare for compiling and then output a dist folder:

"scripts": {
    "compile": "/usr/local/bin/tsc",
    "clean": "rm -rf dist",
    "prepare": "yarn run compile"
 }

When changing A or B, we need to run a 2 steps process in order for those changes to be reflected in C:

$ cd A && yarn 
$ cd B && yarn
$ cd C && yarn upgrade A B && yarn

We do not understand why dependencies are not being updated by yarn while doing executing yarn in C. Do we really have to rebuild each of those, each time we make it change to them?

@ghost ghost assigned arcanis Nov 7, 2018
@ghost ghost added the triaged label Nov 7, 2018
@courtyenn
Copy link

I am running into a very similar issue. I thought since they are using workspaces, yarn prepare would be run in each A and B.

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

No branches or pull requests

3 participants