Skip to content

replace-fork: Cleanup after failure if no unstaged changes #22364

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

Merged
merged 1 commit into from
Sep 20, 2021

Conversation

bvaughn
Copy link
Contributor

@bvaughn bvaughn commented Sep 20, 2021

The replace-fork script shouldn't override pending changes if ESLint failed, but it's also not great for it to leave the workspace in a broken state. This PR introduces a compromise approach:

  1. Prompt and warn if there are unstaged changes when running the script.
  2. If the ESLint fails and there are no unstaged changes, cleanup the bad files. Otherwise warn that the cleanup needs to be done manually.

Follow up to #22348

@sizebot
Copy link

sizebot commented Sep 20, 2021

Comparing: 293059e...267c68f

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.min.js = 127.38 kB 127.38 kB = 40.58 kB 40.58 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 130.20 kB 130.20 kB = 41.50 kB 41.50 kB
facebook-www/ReactDOM-prod.classic.js = 405.21 kB 405.21 kB = 74.99 kB 74.99 kB
facebook-www/ReactDOM-prod.modern.js = 393.80 kB 393.80 kB = 73.28 kB 73.28 kB
facebook-www/ReactDOMForked-prod.classic.js = 405.21 kB 405.21 kB = 74.99 kB 74.99 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against 267c68f

@bvaughn bvaughn merged commit 57e4d68 into facebook:main Sep 20, 2021
@bvaughn bvaughn deleted the replace-fork-tweak branch September 20, 2021 15:10
zhengjitf pushed a commit to zhengjitf/react that referenced this pull request Apr 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants