Socket
Socket
Sign inDemoInstall

size-limit

Package Overview
Dependencies
Maintainers
1
Versions
175
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

size-limit - npm Package Compare versions

Comparing version 8.1.2 to 8.2.0

2

package.json
{
"name": "size-limit",
"version": "8.1.2",
"version": "8.2.0",
"description": "CLI tool for Size Limit",

@@ -5,0 +5,0 @@ "keywords": [

@@ -38,9 +38,16 @@ let SizeLimitError = require('./size-limit-error')

} else if (arg === '--why') {
if (!plugins.has('webpack') || !plugins.has('webpack-why')) {
throw new SizeLimitError('argWithoutWebpack', 'why')
if (plugins.has('esbuild')) {
if (!plugins.has('esbuild-why')) {
throw new SizeLimitError('argWithoutAnalyzer', 'why', 'esbuild')
}
}
// current code assume either esbuild or webpack must be present.
// this should be improved to work with any bundler.
else if (!plugins.has('webpack') || !plugins.has('webpack-why')) {
throw new SizeLimitError('argWithoutAnalyzer', 'why', 'webpack')
}
args.why = true
} else if (arg === '--compare-with') {
if (!plugins.has('webpack') || !plugins.has('webpack-why')) {
throw new SizeLimitError('argWithoutWebpack', 'compare-with')
throw new SizeLimitError('argWithoutAnalyzer', 'compare-with', 'webpack', 'webpack-why')
}

@@ -47,0 +54,0 @@ if (!args.why) {

@@ -10,8 +10,6 @@ const MESSAGES = {

`or *@size-limit/${mod2}* plugin`,
argWithoutWebpack: arg =>
`Argument *--${arg}* works only with *@size-limit/webpack* plugin` +
(arg === 'why' || arg === 'compare-with'
? ' and *@size-limit/webpack-why* plugin. You can add Bundle ' +
'Analyzer to you own bundler.'
: ''),
argWithoutAnalyzer: (arg, bundler, analyzer = `${bundler}-${arg}`) =>
`Argument *--${arg}* works only with *@size-limit/${bundler}* plugin` +
` and *@size-limit/${analyzer}* plugin. You can add Bundle ` +
`Analyzer to you own bundler.`,
argWithoutAnotherArg: (arg, anotherArg) =>

@@ -18,0 +16,0 @@ `Argument *--${arg}* works only with *--${anotherArg}* argument`,

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