-
Notifications
You must be signed in to change notification settings - Fork 47.4k
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
[DevTools] Disable sizeBot on DevTools Rull Request #21885
[DevTools] Disable sizeBot on DevTools Rull Request #21885
Conversation
Because DevTools code doesn't affect production bundle size. Meaningless sizeBot comment give us frastration within Pull Request discussion.
dangerfile.js
Outdated
@@ -113,6 +113,10 @@ function row(result) { | |||
return; | |||
} | |||
|
|||
// Disable sizeBot in a Devtools PR like bellow title. Because that doesn't affect production bundle size. | |||
// [Fix DevTools console announcement being suppressed by Fast Refresh #21864](https://github.com/facebook/react/pull/21864) | |||
if (new RegExp('devtools?', 'i').test(danger.github.pr.title)) return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea of this pull request, but I think maybe we shouldn't rely on the name of the title. (There may be DevTools-focused PRs that also change things in non-DevTools code.)
If we can instead look at the list of changed files and skip it if all files are in packages/react-devtools*
then that would be okay.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bvaughn Thank you for your decent review!
Totally I agree with you, actually I could only achieved by this way in a short spare time 😅
look at the list of changed files and skip it if all files are in packages/react-devtools* then that would be okay.
I'll follow and implement this safety way and then I'll mention you review request again.
To making detect only packages/react-devtools*
files logic I wanna little bit explore codebase for seek something effective util code in this situation.
So might be I'll update my work within about a week.
misc. I searched about toplevel return statement in node.js and stackoverflow says that equivalent to process.exit()
.
I learned return
process.exit(0)
process.exit()
are all equivalent exit status today 🤗
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll follow and implement this safety way and then I'll mention you review request again.
To making detect onlypackages/react-devtools*
files logic I wanna little bit explore codebase for seek something effective util code in this situation.
So might be I'll update my work within about a week.
Sounds good 👍🏼
71642bd
to
078a28f
Compare
@bvaughn I implemented logic to check wether Devtools package files only committed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice
Thank you for your review! |
* [DevTools] Disable sizeBot on DevTools Rull Request Because DevTools code doesn't affect production bundle size. Meaningless sizeBot comment give us frastration within Pull Request discussion. * Revert "[DevTools] Disable sizeBot on DevTools Rull Request" This reverts commit a43aab9. * check whether devtools package file only committed
Because DevTools code doesn't affect production bundle size.
Meaningless sizeBot comment give us frastration within Pull Request discussion.