Skip to content

Consuming inside a yarn monorepo does not work with publish --update #254

Open
@comp615

Description

@comp615

In a Yarn monorepo, if you try and consume a yalc'ed package, you will not be able to use the --update command.

Actual
Yalc will try to run npm

Expected
Yalc should run yarn

Why
The working directory in this case is the submodule itself so {workspaceRoot}/libs/my-lib...that will have a package.json file where the yalc file link is correctly added.

However, the update command searches for the package manager lockfile only in the workingDir. Because this is a sub-module, it does not have a lockfile...that exists only at {workspaceRoot}. Presumably this would be a similar problem with any workspace-oriented package manager.

Options:

  • Search up the tree before giving up
  • Allow an arg to override the package manager

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions