yalc icon indicating copy to clipboard operation
yalc copied to clipboard

Fix yalc push always adding in pure mode for repos with workspaces

Open Blasz opened this issue 5 years ago • 2 comments

Fixes #75.

Blasz avatar Oct 16 '19 07:10 Blasz

It's working in pure mode even for a non-monorepo with no yarn workspaces defined. It tells me to use --no-pure to override, but when I do that it still prints out that it's operating "purely."

@wclr

Nantris avatar Oct 14 '23 00:10 Nantris

@Nantris Unfortunately only the "add" and "link" commands are set up to receive/process the "--pure" flag:

  • https://github.com/wclr/yalc/blob/3b834e488837e87df47414fd9917c10f07f0df08/src/yalc.ts#L170
  • https://github.com/wclr/yalc/blob/3b834e488837e87df47414fd9917c10f07f0df08/src/yalc.ts#L186

If you're using one of the other commands (eg. "restore"), the command doesn't look for the "pure" flag, so cannot pass it down to the underlying functions that it calls. (which I'm assuming is your scenario; I hit this issue when trying to use "yalc restore" in a monorepo, and wondering why "yalc restore --no-pure" had no difference/effect)

Venryx avatar Apr 23 '24 04:04 Venryx