Skip to content

Conversation

arcanis
Copy link
Member

@arcanis arcanis commented Nov 3, 2023

What's the problem this PR addresses?

The changes in #4817 caused some breakages in how our users had setup their scripts. While it can be argued that the current behaviour is better by some measures, I'd prefer to avoid breaking anything, especially since it's not very well documented (and/or understood) what's the semantic of INIT_CWD when used with yarn workspace, yarn workspaces foreach, and global scripts.

Fixes #5750

How did you fix it?

I reverted #4817. I'll do a separate semver-minor PR to add extra environment variables with better semantic than INIT_CWD, but that will be in a second time.

Checklist

  • I have set the packages that need to be released for my changes to be effective.
  • I will check that all automated PR checks pass before the PR gets reviewed.

case `pnpm`: {
return {packageManagerField: true, packageManager: PackageManager.Pnpm, reason};
} break;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why, but my IDE constantly removes those statements by itself. It's technically correct, but really annoying to have those unrelated changes every time I update the file.

Copy link
Member

@merceyz merceyz Nov 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A global eslint config or a different extension perhaps?

@arcanis arcanis merged commit d375a7f into master Nov 3, 2023
@arcanis arcanis deleted the mael/revert-init-cwd-change branch November 3, 2023 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug?]: Breaking change in v4 - yarn workspace(s) and $INIT_CWD
2 participants