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

Add --error-on-warn to patch-package #736

Merged
merged 2 commits into from Nov 4, 2022
Merged

Conversation

kachkaev
Copy link
Contributor

@kachkaev kachkaev commented Nov 3, 2022

🌟 What is the purpose of this PR?

patch-package 6.5.0 got a new CLI flag that we can find useful. With --error-on-war added to in postinstall, CI in PRs like #734 will fail to flag a potential problem. Without the flag, we may merge Renovate PRs without noticing warnings like this:

Warning: patch-package detected a patch file version mismatch

  Don't worry! This is probably fine. The patch was still applied
  successfully. Here's the deets:

  Patch file created for

    @changesets/apply-release-plan@6.1.1

  applied to

    @changesets/apply-release-plan@6.1.2
  
  At path
  
    node_modules/@changesets/apply-release-plan

  This warning is just to give you a heads-up. There is a small chance of
  breakage even though the patch was applied successfully. Make sure the package
  still behaves like you expect (you wrote tests, right?) and then run

    patch-package @changesets/apply-release-plan

  to update the version in the patch file name and make this warning go away.

When the flag is added, the warning results exit code 1, so we'll always remember to update patches like in 4e68bce

🔗 Related links

⚠️ Known issues

Patches are not updated automatically, which would be possible to configure if we used self-hosted Renovate runners. I guess it's easier to just patch some packages manually for now.

🐾 Next steps

Check if --error-on-war works as expected in new PRs.

🛡 What tests cover this?

  • local manual tests

❓ How to test this?

Check CI in newly created PRs (in the upcoming days)

@github-actions github-actions bot added the area: infra Relates to version control, CI, CD or IaC (area) label Nov 3, 2022
@codecov
Copy link

codecov bot commented Nov 3, 2022

Codecov Report

Merging #736 (575e453) into main (2d78acf) will not change coverage.
The diff coverage is n/a.

❗ Current head 575e453 differs from pull request most recent head dddea1b. Consider uploading reports for the commit dddea1b to get more accurate results

@@           Coverage Diff           @@
##             main     #736   +/-   ##
=======================================
  Coverage   62.46%   62.46%           
=======================================
  Files         271      271           
  Lines        4252     4252           
  Branches     1003     1003           
=======================================
  Hits         2656     2656           
  Misses       1257     1257           
  Partials      339      339           
Flag Coverage Δ
site-integration-chrome 61.40% <ø> (+0.04%) ⬆️
site-integration-firefox 61.54% <ø> (+0.11%) ⬆️
site-integration-iphone 56.74% <ø> (ø)
site-integration-pixel 59.33% <ø> (ø)
site-integration-safari 57.40% <ø> (-0.10%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@kachkaev kachkaev marked this pull request as ready for review November 3, 2022 15:12
@kachkaev kachkaev enabled auto-merge (squash) November 3, 2022 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: infra Relates to version control, CI, CD or IaC (area)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants