Socket
Socket
Sign inDemoInstall

size-limit

Package Overview
Dependencies
Maintainers
1
Versions
176
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 4.5.5 to 4.5.6

2

calc.js
module.exports = async function calc (plugins, config, createSpinner) {
process.setMaxListeners(config.checks.reduce((a, i) => a + i.path.length, 1))
process.setMaxListeners(config.checks.reduce((a, i) => a + i.files.length, 1))

@@ -4,0 +4,0 @@ async function step (number) {

@@ -77,2 +77,6 @@ let { green, red, yellow, bgRed, black, bold, gray } = require('colorette')

if (check.files && !check.files.length && check.path) {
print(yellow(`File not found: ${check.path}`))
}
let sizeNote

@@ -79,0 +83,0 @@ if (check.config) {

@@ -92,3 +92,3 @@ let { isAbsolute, dirname, join, relative } = require('path')

if (args.files.length > 0) {
config.checks = [{ path: args.files }]
config.checks = [{ files: args.files }]
} else {

@@ -113,10 +113,10 @@ let explorer = cosmiconfig('size-limit', {

if (check.path) {
check.path = await globby(check.path, { cwd: config.cwd })
check.files = await globby(check.path, { cwd: config.cwd })
} else if (!check.entry) {
if (pkg.packageJson.main) {
check.path = [
check.files = [
require.resolve(join(dirname(pkg.path), pkg.packageJson.main))
]
} else {
check.path = [join(dirname(pkg.path), 'index.js')]
check.files = [join(dirname(pkg.path), 'index.js')]
}

@@ -133,3 +133,3 @@ }

if (check.entry && !Array.isArray(check.entry)) check.entry = [check.entry]
if (!check.name) check.name = toName(check.entry || check.path, config.cwd)
if (!check.name) check.name = toName(check.entry || check.files, config.cwd)
if (args.limit) check.limit = args.limit

@@ -148,7 +148,9 @@ if (check.limit) {

}
if (check.path) check.path = check.path.map(i => toAbsolute(i, config.cwd))
if (check.files) {
check.files = check.files.map(i => toAbsolute(i, config.cwd))
}
if (check.config) check.config = toAbsolute(check.config, config.cwd)
if (typeof check.import === 'string') {
check.import = {
[check.path[0]]: check.import
[check.files[0]]: check.import
}

@@ -155,0 +157,0 @@ }

@@ -15,3 +15,3 @@ let { Plugins } = require('./load-plugins')

files = {
checks: [{ path: files }]
checks: [{ files }]
}

@@ -18,0 +18,0 @@ }

{
"name": "size-limit",
"version": "4.5.5",
"version": "4.5.6",
"description": "CLI tool for Size Limit",

@@ -22,10 +22,10 @@ "keywords": [

"bytes": "^3.1.0",
"chokidar": "^3.4.1",
"chokidar": "^3.4.2",
"ci-job-number": "^1.2.2",
"colorette": "^1.2.1",
"cosmiconfig": "^6.0.0",
"cosmiconfig": "^7.0.0",
"globby": "^11.0.1",
"ora": "^4.0.4",
"ora": "^5.0.0",
"read-pkg-up": "^7.0.1"
}
}
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