Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
945a7ab
[core] Track size via build artifacts
eps1lon Feb 16, 2019
05735c0
[core] Fix size snapshot failing on ci
eps1lon Feb 16, 2019
d644e17
[ci] Fix size snapshot not being saved
eps1lon Feb 16, 2019
65a785d
[ci] Decouple size snapshot from test pipeline
eps1lon Feb 18, 2019
c6aacb5
[ci] Persist snapshot in s3 bucket
eps1lon Feb 19, 2019
322c77e
[ci] Add dangerfile
eps1lon Feb 19, 2019
2f94161
[ci] Fix pull requests not being recognized
eps1lon Feb 19, 2019
e9f0293
[ci] Proper dangerJS report
eps1lon Feb 19, 2019
b1aebd5
[ci] Silence non existing snapshots
eps1lon Feb 19, 2019
fac7fca
[ci] Print commit range to CI
eps1lon Feb 19, 2019
4d7ab85
[ci] Fix violation passed to danger js
eps1lon Feb 19, 2019
0bd59e4
[docs] explain scripts folder structure
eps1lon Feb 19, 2019
7b2eafb
[ci] Remove debug tasks
eps1lon Feb 19, 2019
c3c13dc
[ci] Report even with no changes
eps1lon Feb 19, 2019
d1b729c
[ci] Fix danger js violation if no important change
eps1lon Feb 19, 2019
04d3bb6
[ci] Fix no change being considered any change
eps1lon Feb 19, 2019
a389123
[ci] Improve review expierence
eps1lon Feb 19, 2019
d8294b4
[core] Remove rollup snapshot
eps1lon Feb 19, 2019
ba46066
[ci] improve config docs
eps1lon Feb 19, 2019
d4e50c8
[ci] Fix emoji in bundle changes details
eps1lon Feb 19, 2019
1a817d5
[ci] cleanup danger async runner
eps1lon Feb 19, 2019
e0a2ad2
[ci] reintriduce umd smoke test
eps1lon Feb 19, 2019
4249451
[ci] Fix lint errors
eps1lon Feb 20, 2019
c97eb00
[ci] Refactor code
eps1lon Feb 20, 2019
a1ec9ea
[ci] Use +-inf the mark added/removed snapshots
eps1lon Feb 20, 2019
1e02dfe
[ci] Fix new bundles being considered as reducing size
eps1lon Feb 20, 2019
7e23fa7
[ci] Consider non-existing as zero
eps1lon Feb 20, 2019
dad906d
[ci] Place change emoji after percent
eps1lon Feb 20, 2019
76579aa
[ci] Fix increase being displayed like reduction (triangle down)
eps1lon Feb 20, 2019
a24b8d3
[ci] Fix outdated code comments
eps1lon Feb 20, 2019
e056f26
[ci] Use upercase snakecase for constants
eps1lon Feb 21, 2019
1b2579a
[core] Remove legacy scripts
eps1lon Feb 21, 2019
006c7da
[ci] Improve destructuring semantics
eps1lon Feb 21, 2019
5eee75f
[ci] Exit with non-zero for any error in danger
eps1lon Feb 21, 2019
24a3f80
[scripts] Remove utils in favor of lodash
eps1lon Feb 21, 2019
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
Prev Previous commit
Next Next commit
[ci] Consider non-existing as zero
allows for more useful comparison:
- add means current.size abs change, +inf rel change
- remove means -prev.size abs change, -100% rel change
  • Loading branch information
eps1lon committed Feb 20, 2019
commit 7e23fa7e5668c09c93dafeec00ec7977efbc0491
12 changes: 4 additions & 8 deletions scripts/sizeSnapshot/loadComparison.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ async function loadSnapshot(commitId, ref = 'master') {
return response.json();
}

const nullSnapshot = { parsed: 0, gzip: 0 };

module.exports = async function loadComparison(parrentId, ref) {
const [currentSnapshot, previousSnapshot] = await Promise.all([
loadCurrentSnapshot(),
Expand All @@ -34,14 +36,8 @@ module.exports = async function loadComparison(parrentId, ref) {
bundleKeys.map(bundle => {
// if a bundle was added the change should be +inf
// if a bundle was removed the change should be -inf
const currentSize = currentSnapshot[bundle] || {
gzip: Number.POSITIVE_INFINITY,
parsed: Number.POSITIVE_INFINITY,
};
const previousSize = previousSnapshot[bundle] || {
gzip: Number.NEGATIVE_INFINITY,
parsed: Number.NEGATIVE_INFINITY,
};
const currentSize = currentSnapshot[bundle] || nullSnapshot;
const previousSize = previousSnapshot[bundle] || nullSnapshot;

return [
bundle,
Expand Down