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

[Danger] Minor fixes #12606

Merged
merged 4 commits into from
Apr 11, 2018
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions dangerfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,12 @@ function git(args) {
previousBuildResults
);

const percentToWarrentShowing = 1;
const packagesToShow = results
.filter(
r =>
Math.abs(r.prevFileSizeChange) >= percentToWarrentShowing ||
Math.abs(r.prevGzipSizeChange) >= percentToWarrentShowing
Math.abs(r.prevFileSizeAbsoluteChange) >= 300 || // bytes
Math.abs(r.prevGzipSizeAbsoluteChange) >= 100 // bytes
)

.map(r => r.packageName);

if (packagesToShow.length) {
Expand Down
5 changes: 0 additions & 5 deletions scripts/circleci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@

set -e

# Update the local size measurements to the master version
# so that the size diff printed at the end of the build is
# accurate.
curl -o scripts/rollup/results.json http://react.zpao.com/builds/master/latest/results.json

yarn build --extract-errors
# Note: since we run the full build including extracting error codes,
# it is important that we *don't* reset the change to `scripts/error-codes/codes.json`.
Expand Down
2 changes: 2 additions & 0 deletions scripts/rollup/stats.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,11 @@ function generateResultsArray(current, prevResults) {
prevSize: filesize(prevSize),
prevFileSize: filesize(size),
prevFileSizeChange: fractionalChange(prevSize, size),
prevFileSizeAbsoluteChange: size - prevSize,
prevGzip: filesize(prevGzip),
prevGzipSize: filesize(gzip),
prevGzipSizeChange: fractionalChange(prevGzip, gzip),
prevGzipSizeAbsoluteChange: gzip - prevGzip,
};
// Strip any nulls
})
Expand Down