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.2.4 to 8.2.5

4

create-help.js

@@ -1,2 +0,2 @@

let { bold: b, yellow: y, red } = require('picocolors')
let { bold: b, red, yellow: y } = require('picocolors')
let { existsSync } = require('fs')

@@ -104,3 +104,3 @@ let { join } = require('path')

return { showVersion, showHelp, showMigrationGuide }
return { showHelp, showMigrationGuide, showVersion }
}
let {
bgGreen,
yellow,
bgRed,
black,
green,
bold,
gray,
red
green,
red,
yellow
} = require('picocolors')

@@ -11,0 +11,0 @@ let { join } = require('path')

module.exports = {
results(process, args, config) {
error(process, args, config) {
if (args && args.debug) {
process.stdout.write(JSON.stringify(config, null, 2) + '\n')
process.stderr.write(JSON.stringify(config, null, 2) + '\n')
}
},
error(process, args, config) {
results(process, args, config) {
if (args && args.debug) {
process.stderr.write(JSON.stringify(config, null, 2) + '\n')
process.stdout.write(JSON.stringify(config, null, 2) + '\n')
}
}
}

@@ -1,2 +0,2 @@

let { isAbsolute, dirname, join, relative } = require('path')
let { dirname, isAbsolute, join, relative } = require('path')
let { lilconfig } = require('lilconfig')

@@ -9,21 +9,21 @@ let globby = require('globby')

let OPTIONS = {
name: true,
path: true,
limit: true,
module: true,
brotli: 'file',
compareWith: 'webpack',
config: ['webpack', 'esbuild'],
disableModuleConcatenation: 'webpack',
entry: 'webpack',
config: ['webpack', 'esbuild'],
modifyWebpackConfig: 'webpack',
modifyEsbuildConfig: 'esbuild',
webpack: 'webpack',
gzip: 'file',
hidePassed: false,
highlightLess: false,
ignore: ['webpack', 'esbuild'],
import: ['webpack', 'esbuild'],
brotli: 'file',
gzip: 'file',
limit: true,
modifyEsbuildConfig: 'esbuild',
modifyWebpackConfig: 'webpack',
module: true,
name: true,
path: true,
running: 'time',
disableModuleConcatenation: 'webpack',
hidePassed: false,
highlightLess: false,
compareWith: 'webpack',
uiReports: 'webpack'
uiReports: 'webpack',
webpack: 'webpack'
}

@@ -30,0 +30,0 @@

{
"name": "size-limit",
"version": "8.2.4",
"version": "8.2.5",
"description": "CLI tool for Size Limit",

@@ -24,3 +24,3 @@ "keywords": [

"globby": "^11.1.0",
"lilconfig": "^2.0.6",
"lilconfig": "^2.1.0",
"nanospinner": "^1.1.0",

@@ -27,0 +27,0 @@ "picocolors": "^1.0.0"

@@ -1,2 +0,2 @@

let { writeFile, mkdir } = require('fs').promises
let { mkdir, writeFile } = require('fs').promises
let { join } = require('path')

@@ -3,0 +3,0 @@

@@ -1,2 +0,2 @@

let { resolve, parse, dirname } = require('path')
let { dirname, parse, resolve } = require('path')
let { existsSync } = require('fs')

@@ -3,0 +3,0 @@ let { readFile } = require('fs').promises

@@ -11,4 +11,4 @@ let { existsSync } = require('fs')

} else {
await fs.rm(dir, { recursive: true, force: true })
await fs.rm(dir, { force: true, recursive: true })
}
}
const MESSAGES = {
noPackage: () =>
'Size Limit didn’t find *package.json*. ' +
'Create npm package and run Size Limit there.',
unknownArg: arg =>
`Unknown argument *${arg}*. Check command for typo and read docs.`,
argWithoutPlugins: (arg, mod1, mod2) =>
`Argument *--${arg}* needs *@size-limit/${mod1}* ` +
`or *@size-limit/${mod2}* plugin`,
argWithoutAnalyzer: (arg, bundler, analyzer = `${bundler}-${arg}`) =>

@@ -18,36 +10,44 @@ `Argument *--${arg}* works only with *@size-limit/${bundler}* plugin` +

`Missing parameter *${parameter}* for *--${arg}* argument`,
argWithoutPlugins: (arg, mod1, mod2) =>
`Argument *--${arg}* needs *@size-limit/${mod1}* ` +
`or *@size-limit/${mod2}* plugin`,
brotliUnsupported: () =>
'Update your Node.js to version >= v11.7.0 to use Brotli',
bundleDirNotEmpty: dir =>
`The directory *${dir}* is not empty. ` +
'Pass *--clean-dir* if you want to remove it',
cmdError: (cmd, error) => (error ? `${cmd} error: ${error}` : `${cmd} error`),
emptyConfig: () => 'Size Limit config must *not be empty*',
entryNotString: () =>
'The *entry* in Size Limit config ' +
'must be *a string* or *an array of strings*',
missedPlugin: mod => `Add *@size-limit/${mod}* plugin to Size Limit`,
multiPluginlessConfig: (opt, mod1, mod2) =>
`Config option *${opt}* needs *@size-limit/${mod1}* ` +
`or *@size-limit/${mod2}* plugin`,
noArrayConfig: () => 'Size Limit config must contain *an array*',
noConfig: () => 'Create Size Limit config in *package.json*',
noArrayConfig: () => 'Size Limit config must contain *an array*',
emptyConfig: () => 'Size Limit config must *not be empty*',
noObjectCheck: () => 'Size Limit config array should contain *only objects*',
noPackage: () =>
'Size Limit didn’t find *package.json*. ' +
'Create npm package and run Size Limit there.',
pathNotString: () =>
'The *path* in Size Limit config ' +
'must be *a string* or *an array of strings*',
entryNotString: () =>
'The *entry* in Size Limit config ' +
'must be *a string* or *an array of strings*',
pluginlessConfig: (opt, mod) =>
`Config option *${opt}* needs *@size-limit/${mod}* plugin`,
multiPluginlessConfig: (opt, mod1, mod2) =>
`Config option *${opt}* needs *@size-limit/${mod1}* ` +
`or *@size-limit/${mod2}* plugin`,
timeWithoutPlugin: () => 'Add *@size-limit/time* plugin to use time limit',
unknownOption: opt =>
`Unknown option *${opt}* in config. Check Size Limit docs and version.`,
missedPlugin: mod => `Add *@size-limit/${mod}* plugin to Size Limit`,
unknownArg: arg =>
`Unknown argument *${arg}*. Check command for typo and read docs.`,
unknownEntry: entry =>
`Size Limit didn’t find *${entry}* entry in custom Webpack config`,
brotliUnsupported: () =>
'Update your Node.js to version >= v11.7.0 to use Brotli',
cmdError: (cmd, error) => (error ? `${cmd} error: ${error}` : `${cmd} error`),
bundleDirNotEmpty: dir =>
`The directory *${dir}* is not empty. ` +
'Pass *--clean-dir* if you want to remove it'
unknownOption: opt =>
`Unknown option *${opt}* in config. Check Size Limit docs and version.`
}
const ADD_CONFIG_EXAMPLE = {
emptyConfig: true,
noArrayConfig: true,
noConfig: true,
emptyConfig: true,
noObjectCheck: true,
noArrayConfig: true,
pathNotString: true

@@ -54,0 +54,0 @@ }

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