Skip to content

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

Open
emmenko wants to merge 3 commits into
GravitywellUK:masterfrom
emmenko:nm-fix-no-postinstall
Open

refactor: upgrade yarn, respect yarn options to not run postinstall#5
emmenko wants to merge 3 commits into
GravitywellUK:masterfrom
emmenko:nm-fix-no-postinstall

Conversation

@emmenko
Copy link
Copy Markdown

@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 thread sources/commands/postinstall.ts Outdated
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
Copy Markdown
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 thread sources/commands/postinstall.ts Outdated
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
Copy Markdown
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

@dimaosipa
Copy link
Copy Markdown

@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