bundlewatch
Advanced tools
Comparing version 0.1.2 to 0.2.0
@@ -11,5 +11,5 @@ 'use strict'; | ||
var _ciEnv = require('./ciEnv'); | ||
var _getCIVars = require('./getCIVars'); | ||
var _ciEnv2 = _interopRequireDefault(_ciEnv); | ||
var _getCIVars2 = _interopRequireDefault(_getCIVars); | ||
@@ -22,2 +22,4 @@ var _ensureValid = require('./ensureValid'); | ||
const ciVars = (0, _getCIVars2.default)(process.env); | ||
const defaultConfig = { | ||
@@ -27,8 +29,8 @@ files: [], | ||
ci: { | ||
githubAccessToken: _ciEnv2.default.githubAccessToken, | ||
repoOwner: _ciEnv2.default.repoOwner, | ||
repoName: _ciEnv2.default.repoName, | ||
repoCurrentBranch: _ciEnv2.default.repoCurrentBranch, | ||
repoBranchBase: _ciEnv2.default.repoBranchBase || 'master', // Branch PR is being merged into | ||
commitSha: _ciEnv2.default.commitSha, | ||
githubAccessToken: ciVars.githubAccessToken, | ||
repoOwner: ciVars.repoOwner, | ||
repoName: ciVars.repoName, | ||
repoCurrentBranch: ciVars.repoCurrentBranch, | ||
repoBranchBase: ciVars.repoBranchBase || 'master', // Branch PR is being merged into | ||
commitSha: ciVars.commitSha, | ||
trackBranches: ['master', 'develop'] | ||
@@ -35,0 +37,0 @@ }, |
@@ -19,2 +19,6 @@ 'use strict'; | ||
var _ValidationError = require('../errors/ValidationError'); | ||
var _ValidationError2 = _interopRequireDefault(_ValidationError); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -27,3 +31,3 @@ | ||
} catch (e) { | ||
throw new Error(`'brotli-size' package has not been installed, please install package to use this compression type`); | ||
throw new _ValidationError2.default(`'brotli-size' package has not been installed, please install package to use this compression type`); | ||
} | ||
@@ -30,0 +34,0 @@ return brotli.sync(data); |
{ | ||
"name": "bundlewatch", | ||
"version": "0.1.2", | ||
"version": "0.2.0", | ||
"description": "Keep watch of your bundle size", | ||
@@ -51,2 +51,3 @@ "repository": { | ||
"babel-preset-env": "^1.6.1", | ||
"coveralls": "^3.0.1", | ||
"eslint": "^4.9.0", | ||
@@ -65,3 +66,5 @@ "eslint-config-airbnb-base": "^12.1.0", | ||
"jest": { | ||
"testEnvironment": "node" | ||
"testEnvironment": "node", | ||
"collectCoverage": true, | ||
"coverageDirectory": "artifacts/test_results/jest/coverage" | ||
}, | ||
@@ -68,0 +71,0 @@ "engines": { |
@@ -14,2 +14,3 @@ <div align="center"> | ||
[![builds][builds]][builds-url] | ||
[![test][test]][test-url] | ||
[![licenses][licenses]][licenses-url] | ||
@@ -55,3 +56,3 @@ | ||
How to run: | ||
Usage: | ||
- NPM: `npm run bundlewatch` | ||
@@ -70,3 +71,11 @@ - Yarn: `yarn run bundlewatch` | ||
## CI Auth Variables Needed by BundleWatch: | ||
- `BUNDLEWATCH_GITHUB_TOKEN` | ||
You will need to give BundleWatch access to your GitHub Statuses, which can be done by heading to: | ||
https://service.bundlewatch.io/setup-github | ||
This will give you your `BUNDLEWATCH_GITHUB_TOKEN`. You will need to set this as an environment variable in CI. | ||
## CI Variables Needed by BundleWatch: | ||
@@ -76,4 +85,4 @@ The most efficient way to get this running is to ensure that some environment variables are available for BundleWatch to find. | ||
- `CI_REPO_NAME` github.com/facebook/**react** | ||
- `CI_COMMIT_SHA` | ||
- `CI_BRANCH` | ||
- `CI_COMMIT_SHA` | ||
@@ -85,12 +94,6 @@ If you're using, _Travis_, _CircleCI_ or _Wrecker_ these should all work out of the box. | ||
## CI Auth Variables Needed by BundleWatch: | ||
- `BUNDLEWATCH_GITHUB_TOKEN` | ||
You will need to give BundleWatch access to your GitHub Statuses, which can be done by heading to: | ||
https://service.bundlewatch.io/setup-github | ||
This will give you your `BUNDLEWATCH_GITHUB_TOKEN`. You will need to set this as an environment variable in CI. | ||
## That's It | ||
## Viewing the results breakdown | ||
After setting up the above you will have BuildStatus on your Pull Requests. Clicking the _details_ link on the reported status will show you a results file breakdown. | ||
@@ -147,2 +150,5 @@ <div align="center"> | ||
[test]: https://coveralls.io/repos/github/bundlewatch/bundlewatch/badge.svg?branch=master | ||
[test-url]: https://coveralls.io/github/bundlewatch/bundlewatch?branch=master | ||
[builds]: https://img.shields.io/circleci/project/github/bundlewatch/bundlewatch.svg | ||
@@ -149,0 +155,0 @@ [builds-url]: https://circleci.com/gh/bundlewatch/bundlewatch |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
48794
1018
153
18
5