Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
11 changes: 7 additions & 4 deletions scripts/circleci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@

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
# On master, download the bundle sizes from last master build so that
# the size printed in the CI logs for master commits is accurate.
# We don't do it for pull requests because those are compared against
# the merge base by Dangerfile instead. See https://github.com/facebook/react/pull/12606.
if [ -z "$CI_PULL_REQUEST" ]; then
curl -o scripts/rollup/results.json http://react.zpao.com/builds/master/latest/results.json
fi

yarn build --extract-errors
# Note: since we run the full build including extracting error codes,
Expand Down
Loading