New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ember-cli-bundlesize

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-cli-bundlesize - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

13

lib/helpers/compressed-size.js
const gzip = require('gzip-size');
const brotli = require('brotli-size');
let brotli;

@@ -11,2 +11,13 @@ module.exports = function getCompressedSize(data, compression) {

case 'brotli':
try {
// eslint-disable-next-line node/no-unpublished-require
brotli = require('brotli-size');
} catch (error) {
const SilentError = require('silent-error');
throw new SilentError(
`Missing optional dependency: brotli compression was configured, but the
"brotli-size" optional dependency is not installed. Install it with:
npm install --save-dev brotli-size`);
}
size = brotli.sync(data);

@@ -13,0 +24,0 @@ break;

6

package.json
{
"name": "ember-cli-bundlesize",
"version": "0.1.0",
"version": "0.2.0",
"description": "Make sure your Ember app stays small by testing its bundle size against a given size budget.",

@@ -23,3 +23,2 @@ "keywords": [

"dependencies": {
"brotli-size": "^0.0.3",
"bytes": "^3.0.0",

@@ -32,6 +31,7 @@ "chalk": "^2.4.1",

"rsvp": "^4.8.3",
"silent-error": "^1.1.0",
"silent-error": "^1.1.1",
"zlib": "^1.0.5"
},
"devDependencies": {
"brotli-size": "^0.1.0",
"chai": "^4.1.2",

@@ -38,0 +38,0 @@ "console-ui": "^2.2.2",

@@ -18,3 +18,10 @@ ember-cli-bundlesize

#### Optional dependency
If your app uses Brotli compression and the `brotli` option is set in your configuration (i.e `compression: 'brotli'`), you must install the optional dependency: `brotli-size`.
```
npm install --save-dev brotli-size
```
Usage

@@ -21,0 +28,0 @@ ------------------------------------------------------------------------------

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc