Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

do-you-even-lift

Package Overview
Dependencies
Maintainers
3
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

do-you-even-lift - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

11

CHANGELOG.md

@@ -5,3 +5,14 @@ # Change Log

<a name="1.1.0"></a>
# [1.1.0](https://github.com/npm/do-you-even-lift/compare/v1.0.0...v1.1.0) (2018-04-30)
### Features
* **bundle:** report which bundler succeeded ([5d5f94a](https://github.com/npm/do-you-even-lift/commit/5d5f94a))
* **error:** better reporting of fallthrough errors ([1df5dce](https://github.com/npm/do-you-even-lift/commit/1df5dce))
<a name="1.0.0"></a>
# 1.0.0 (2018-04-26)

36

index.js

@@ -38,2 +38,3 @@ 'use strict'

const bundle = await bundlePackage(pkgDir)
stats.bundler = bundle.bundler
stats.bundleSize = Buffer.from(bundle.code, 'utf8').length

@@ -70,3 +71,3 @@ const minifyResult = babel.transform(bundle.code, {

try {
return await (await rollup.rollup({
return Object.assign(await (await rollup.rollup({
input: entry,

@@ -81,4 +82,6 @@ onwarn: () => {},

]
})).generate({name: pkgJson.name, format: 'umd'})
} catch (err) {
})).generate({name: pkgJson.name, format: 'umd'}), {
bundler: 'rollup'
})
} catch (rollupError) {
const b = browserify(entry, {

@@ -89,12 +92,23 @@ bare: true,

})
return new Promise((resolve, reject) => {
b.bundle((err, buf) => {
if (err) {
reject(err)
} else {
resolve({code: buf, map: ''})
try {
return await new Promise((resolve, reject) => {
b.bundle((err, buf) => {
if (err) {
reject(err)
} else {
resolve({code: buf, map: '', bundler: 'browserify'})
}
})
})
} catch (browserifyError) {
throw Object.assign(
new Error(
`Bundle could not be built. All bundlers failed.\nRollup Error: ${rollupError.message}\nBrowserify Error: ${browserifyError.message}`
), {
browserifyError,
rollupError
}
})
})
)
}
}
}
{
"name": "do-you-even-lift",
"version": "1.0.0",
"version": "1.1.0",
"description": "Figure out an estimate of how heavy a particular npm package might be in various compression configurations",

@@ -30,3 +30,3 @@ "main": "index.js",

"dependencies": {
"babel-core": "^6.26.2",
"babel-core": "^6.26.3",
"babel-preset-minify": "^0.4.0",

@@ -33,0 +33,0 @@ "browserify": "^16.2.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