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

refactor: upgrade yarn, respect yarn options to not run postinstall #5

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

emmenko
Copy link

@emmenko emmenko commented Aug 29, 2022

Fixes #3
Fixes #4

Additionally fixes the command to always be executed from the workspace root folder.

Other notable changes:

  • Updated the Yarn binary to v3
  • Updated dependencies
  • Updated Husky to v8
  • Improved a bit logs and files structure
  • Removed .yarn/cache from git
  • Improved output to use Yarn reporter
    image
  • Included the plugin itself in this repo

Comment on lines 9 to 14
// Respect the variable `YARN_ENABLE_SCRIPTS`.
// https://github.com/renovatebot/renovate/discussions/17442#discussioncomment-3498940
if (process.env.YARN_ENABLE_SCRIPTS === "0") {
console.log(`Skipping postinstall because of "YARN_ENABLE_SCRIPTS=0"`);
return;
}
Copy link
Author

Choose a reason for hiding this comment

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

This is the fix for #3

Comment on lines 16 to 21
// Respect the mode `skip-build`.
// https://github.com/renovatebot/renovate/discussions/17442#discussioncomment-3499080
if (options?.mode === InstallMode.SkipBuild) {
console.log(`Skipping postinstall because of "--mode=skip-build"`);
return;
}
Copy link
Author

Choose a reason for hiding this comment

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

This is the fix for #4

@bomjkolyadun
Copy link

@emmenko, thanks for your pull request! Hope this change will be merged eventually. Meanwhile, I'll switch to your fork

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.

Don't run postinstall when --mode=skip-build postinstall shouldn't run when YARN_ENABLE_SCRIPTS=0
2 participants