Skip to content

Commit

Permalink
chore(ci): add bundlesize (#2492)
Browse files Browse the repository at this point in the history
* chore: add bundlesize
* chore: add command for bundlesize
  • Loading branch information
samouss authored and bobylito committed Oct 17, 2017
1 parent b3b9605 commit 6938753
Show file tree
Hide file tree
Showing 3 changed files with 152 additions and 41 deletions.
26 changes: 17 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
"version": "2.2.1",
"description": "instantsearch.js is a library of widgets to build high performance instant search experiences using Algolia",
"homepage": "https://community.algolia.com/instantsearch.js/",
"main": "dist-es5-module/index.js",
"author": "Algolia <support@algolia.com>",
"license": "MIT",
"main": "dist-es5-module/index.js",
"module": "./es/index.js",
"scripts": {
"build": "./scripts/build.sh",
Expand All @@ -21,6 +22,7 @@
"release": "./scripts/release.js",
"test": "jest",
"test:watch": "jest --watch --bail",
"test:size": "bundlesize",
"release-maintenance": "./scripts/release-maintenance.sh",
"test:functional": "wdio functional-tests/wdio.conf.js",
"test:functional:dev": "babel-node scripts/dev-functional-tests",
Expand Down Expand Up @@ -55,6 +57,7 @@
"babel-template": "6.26.0",
"babel-types": "6.26.0",
"bel": "5.1.3",
"bundlesize": "0.15.2",
"collect-json": "1.0.8",
"colors": "1.1.2",
"compression": "1.7.0",
Expand Down Expand Up @@ -109,13 +112,6 @@
"webpack": "3.6.0",
"webpack-dev-server": "2.8.2"
},
"jest": {
"testPathIgnorePatterns": [
"<rootDir>/node_modules/",
"<rootDir>/dist*",
"<rootDir>/functional-tests"
]
},
"dependencies": {
"algoliasearch": "^3.24.0",
"algoliasearch-helper": "^2.22.0",
Expand All @@ -129,5 +125,17 @@
"rheostat": "algolia/rheostat#dist-preact",
"to-factory": "^1.0.0"
},
"license": "MIT"
"jest": {
"testPathIgnorePatterns": [
"<rootDir>/node_modules/",
"<rootDir>/dist*",
"<rootDir>/functional-tests"
]
},
"bundlesize": [
{
"path": "./dist/instantsearch.min.js",
"maxSize": "100 kB"
}
]
}
3 changes: 3 additions & 0 deletions scripts/test-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ INDEX_PAGE=index npm run test:functional
# push the generated screenshots to Argos-CI.
npm run argos

# check if the next size of the bundle is inside the threshold
npm run test:size

if [ $TRAVIS_PULL_REQUEST == 'false' ] && [ $TRAVIS_BRANCH == 'master' ]; then
npm run finish-release
fi
164 changes: 132 additions & 32 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,19 @@ aws4@^1.2.1, aws4@^1.6.0:
version "1.6.0"
resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e"

axios@0.15.3:
version "0.15.3"
resolved "https://registry.yarnpkg.com/axios/-/axios-0.15.3.tgz#2c9d638b2e191a08ea1d6cc988eadd6ba5bdc053"
dependencies:
follow-redirects "1.0.0"

axios@^0.16.2:
version "0.16.2"
resolved "https://registry.yarnpkg.com/axios/-/axios-0.16.2.tgz#ba4f92f17167dfbab40983785454b9ac149c3c6d"
dependencies:
follow-redirects "^1.2.3"
is-buffer "^1.1.5"

babel-cli@6.26.0:
version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-cli/-/babel-cli-6.26.0.tgz#502ab54874d7db88ad00b887a06383ce03d002f1"
Expand Down Expand Up @@ -1195,6 +1208,14 @@ babel-plugin-transform-strict-mode@^6.24.1:
babel-runtime "^6.22.0"
babel-types "^6.24.1"

babel-polyfill@6.23.0:
version "6.23.0"
resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.23.0.tgz#8364ca62df8eafb830499f699177466c3b03499d"
dependencies:
babel-runtime "^6.22.0"
core-js "^2.4.0"
regenerator-runtime "^0.10.0"

babel-polyfill@^6.26.0:
version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.26.0.tgz#379937abc67d7895970adc621f284cd966cf2153"
Expand Down Expand Up @@ -1722,11 +1743,26 @@ builtins@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/builtins/-/builtins-1.0.3.tgz#cb94faeb61c8696451db36534e1422f94f0aee88"

bundlesize@0.15.2:
version "0.15.2"
resolved "https://registry.yarnpkg.com/bundlesize/-/bundlesize-0.15.2.tgz#56782be56d8c72f84d6bdb795a48c019425f2304"
dependencies:
axios "^0.16.2"
bytes "^3.0.0"
ci-env "^1.4.0"
commander "^2.11.0"
github-build "^1.2.0"
glob "^7.1.2"
gzip-size "^4.0.0"
opencollective "^1.0.3"
prettycli "^1.4.3"
read-pkg-up "^2.0.0"

bytes@2.5.0:
version "2.5.0"
resolved "https://registry.yarnpkg.com/bytes/-/bytes-2.5.0.tgz#4c9423ea2d252c270c41b2bdefeff9bb6b62c06a"

bytes@3.0.0:
bytes@3.0.0, bytes@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048"

Expand Down Expand Up @@ -1825,17 +1861,7 @@ center-align@^0.1.1:
align-text "^0.1.3"
lazy-cache "^1.0.3"

chalk@^0.5.0, chalk@^0.5.1:
version "0.5.1"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-0.5.1.tgz#663b3a648b68b55d04690d49167aa837858f2174"
dependencies:
ansi-styles "^1.1.0"
escape-string-regexp "^1.0.0"
has-ansi "^0.1.0"
strip-ansi "^0.3.0"
supports-color "^0.2.0"

chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3:
chalk@1.1.3, chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98"
dependencies:
Expand All @@ -1845,14 +1871,24 @@ chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3:
strip-ansi "^3.0.0"
supports-color "^2.0.0"

chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0:
chalk@2.1.0, chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.1.0.tgz#ac5becf14fa21b99c6c92ca7a7d7cfd5b17e743e"
dependencies:
ansi-styles "^3.1.0"
escape-string-regexp "^1.0.5"
supports-color "^4.0.0"

chalk@^0.5.0, chalk@^0.5.1:
version "0.5.1"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-0.5.1.tgz#663b3a648b68b55d04690d49167aa837858f2174"
dependencies:
ansi-styles "^1.1.0"
escape-string-regexp "^1.0.0"
has-ansi "^0.1.0"
strip-ansi "^0.3.0"
supports-color "^0.2.0"

character-entities-html4@^1.0.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/character-entities-html4/-/character-entities-html4-1.1.1.tgz#359a2a4a0f7e29d3dc2ac99bdbe21ee39438ea50"
Expand Down Expand Up @@ -1905,6 +1941,10 @@ chokidar@^1.6.0, chokidar@^1.6.1, chokidar@^1.7.0:
optionalDependencies:
fsevents "^1.0.0"

ci-env@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/ci-env/-/ci-env-1.4.0.tgz#7e4c4ed1d10cedce734293e04dde94fcdfe74d67"

ci-info@^1.0.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.1.1.tgz#47b44df118c48d2597b56d342e7e25791060171a"
Expand Down Expand Up @@ -2755,7 +2795,7 @@ dateformat@^1.0.11, dateformat@^1.0.12:
get-stdin "^4.0.1"
meow "^3.3.0"

debug@2, debug@2.6.9, debug@^2.1.1, debug@^2.1.3, debug@^2.2.0, debug@^2.6.3, debug@^2.6.6, debug@^2.6.8:
debug@2, debug@2.6.9, debug@^2.1.1, debug@^2.1.3, debug@^2.2.0, debug@^2.6.3, debug@^2.6.6, debug@^2.6.8, debug@^2.6.9:
version "2.6.9"
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
dependencies:
Expand Down Expand Up @@ -3058,6 +3098,10 @@ duplexer3@^0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2"

duplexer@^0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1"

duplexify@^3.2.0:
version "3.5.1"
resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.5.1.tgz#4e1516be68838bc90a49994f0b39a6e5960befcd"
Expand Down Expand Up @@ -3902,6 +3946,18 @@ follow-redirects@0.0.7:
debug "^2.2.0"
stream-consume "^0.1.0"

follow-redirects@1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.0.0.tgz#8e34298cbd2e176f254effec75a1c78cc849fd37"
dependencies:
debug "^2.2.0"

follow-redirects@^1.2.3:
version "1.2.5"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.2.5.tgz#ffd3e14cbdd5eaa72f61b6368c1f68516c2a26cc"
dependencies:
debug "^2.6.9"

for-each@^0.3.2:
version "0.3.2"
resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.2.tgz#2c40450b9348e97f281322593ba96704b9abd4d4"
Expand Down Expand Up @@ -4208,6 +4264,12 @@ gitconfiglocal@^1.0.0:
dependencies:
ini "^1.3.2"

github-build@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/github-build/-/github-build-1.2.0.tgz#b0bdb705ae4088218577e863c1a301030211051f"
dependencies:
axios "0.15.3"

github@^11.0.0:
version "11.0.0"
resolved "https://registry.yarnpkg.com/github/-/github-11.0.0.tgz#edb32df5efb33cad004ebf0bdd2a4b30bb63a854"
Expand Down Expand Up @@ -4427,6 +4489,13 @@ growly@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081"

gzip-size@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-4.0.0.tgz#a80e13e18938bcb2e6702fec606f5cf8b666db3a"
dependencies:
duplexer "^0.1.1"
pify "^3.0.0"

handle-thing@^1.2.5:
version "1.2.5"
resolved "https://registry.yarnpkg.com/handle-thing/-/handle-thing-1.2.5.tgz#fd7aad726bf1a5fd16dfc29b2f7a6601d27139c4"
Expand Down Expand Up @@ -4864,6 +4933,24 @@ inline-style-prefixer@^3.0.6:
bowser "^1.7.3"
css-in-js-utils "^2.0.0"

inquirer@3.0.6, inquirer@~3.0.6:
version "3.0.6"
resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.0.6.tgz#e04aaa9d05b7a3cb9b0f407d04375f0447190347"
dependencies:
ansi-escapes "^1.1.0"
chalk "^1.0.0"
cli-cursor "^2.1.0"
cli-width "^2.0.0"
external-editor "^2.0.1"
figures "^2.0.0"
lodash "^4.3.0"
mute-stream "0.0.7"
run-async "^2.2.0"
rx "^4.1.0"
string-width "^2.0.0"
strip-ansi "^3.0.0"
through "^2.3.6"

inquirer@3.3.0, inquirer@^3.0.6:
version "3.3.0"
resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.3.0.tgz#9dd2f2ad765dcab1ff0443b491442a20ba227dc9"
Expand Down Expand Up @@ -4901,24 +4988,6 @@ inquirer@^0.12.0:
strip-ansi "^3.0.0"
through "^2.3.6"

inquirer@~3.0.6:
version "3.0.6"
resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.0.6.tgz#e04aaa9d05b7a3cb9b0f407d04375f0447190347"
dependencies:
ansi-escapes "^1.1.0"
chalk "^1.0.0"
cli-cursor "^2.1.0"
cli-width "^2.0.0"
external-editor "^2.0.1"
figures "^2.0.0"
lodash "^4.3.0"
mute-stream "0.0.7"
run-async "^2.2.0"
rx "^4.1.0"
string-width "^2.0.0"
strip-ansi "^3.0.0"
through "^2.3.6"

internal-ip@^2.0.2:
version "2.0.3"
resolved "https://registry.yarnpkg.com/internal-ip/-/internal-ip-2.0.3.tgz#ed3cf9b671ac7ff23037bfacad42eb439cd9546c"
Expand Down Expand Up @@ -6599,6 +6668,13 @@ node-emoji@^1.4.1:
dependencies:
lodash.toarray "^4.4.0"

node-fetch@1.6.3:
version "1.6.3"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.6.3.tgz#dc234edd6489982d58e8f0db4f695029abcd8c04"
dependencies:
encoding "^0.1.11"
is-stream "^1.0.1"

node-fetch@^1.0.1, node-fetch@^1.7.0:
version "1.7.3"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef"
Expand Down Expand Up @@ -6970,6 +7046,24 @@ onetime@^2.0.0:
dependencies:
mimic-fn "^1.0.0"

opencollective@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/opencollective/-/opencollective-1.0.3.tgz#aee6372bc28144583690c3ca8daecfc120dd0ef1"
dependencies:
babel-polyfill "6.23.0"
chalk "1.1.3"
inquirer "3.0.6"
minimist "1.2.0"
node-fetch "1.6.3"
opn "4.0.2"

opn@4.0.2:
version "4.0.2"
resolved "https://registry.yarnpkg.com/opn/-/opn-4.0.2.tgz#7abc22e644dff63b0a96d5ab7f2790c0f01abc95"
dependencies:
object-assign "^4.0.1"
pinkie-promise "^2.0.0"

opn@^5.1.0:
version "5.1.0"
resolved "https://registry.yarnpkg.com/opn/-/opn-5.1.0.tgz#72ce2306a17dbea58ff1041853352b4a8fc77519"
Expand Down Expand Up @@ -7690,6 +7784,12 @@ pretty-format@^3.5.1:
version "3.8.0"
resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-3.8.0.tgz#bfbed56d5e9a776645f4b1ff7aa1a3ac4fa3c385"

prettycli@^1.4.3:
version "1.4.3"
resolved "https://registry.yarnpkg.com/prettycli/-/prettycli-1.4.3.tgz#b28ec2aad9de07ae1fd75ef294fb54cbdee07ed5"
dependencies:
chalk "2.1.0"

private@^0.1.6, private@^0.1.7:
version "0.1.7"
resolved "https://registry.yarnpkg.com/private/-/private-0.1.7.tgz#68ce5e8a1ef0a23bb570cc28537b5332aba63ef1"
Expand Down

0 comments on commit 6938753

Please sign in to comment.