siddharthkp / bundlesize

Keep your bundle size in check
MIT License
4.47k stars 180 forks source link

Support for for comparing bundlesize against branches other than master #217

Open jakebolam opened 6 years ago

jakebolam commented 6 years ago

Do you want to request a feature or report a bug? feature

What is the current behavior? Bundlesize always compares against master

If this is a feature request, what is motivation or use case for changing the behavior? A powerful feature of bundlesize is its comparison to master. It would be useful to support use cases where the branch being merged is not against master. E.g. you're merging a branch into another branch. This would also allow support for workflows which involve develop/staging/hotfixes which is common when pure CI/CD cannot be reached and processes require 'release' candidates.

Proposed implementation

  1. Flag on CLI or ENV which dictates which branch to compare against. e.g. UPSTREAM_BRANCH
  2. Update store to account for this. I'm not sure of the current limits on the firebase store, but this work would also include logic to ensure you can't store more than a certain amount of UPSTREAM_BRANCH data, e.g. 20, deleting the last unused/least relevant data on a new update.

@siddharthkp let me know your thoughts and I'll get a PR up ASAP.

quantizor commented 6 years ago

We'd love this functionality now that 4.0 is under active development for styled-components! We're using a non-master branch for it.

Drapegnik commented 6 years ago

@jakebolam, @siddharthkp @pvdlg/env-ci allow read prBranch for AppVeyor, CircleCI, Drone, Semaphore, Travis CI, Wercker and more