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

common-shakeify

Package Overview
Dependencies
Maintainers
38
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

common-shakeify - npm Package Compare versions

Comparing version 0.5.4 to 0.6.0

test/exclude/a.js

3

CHANGELOG.md

@@ -7,2 +7,5 @@ # common-shakeify change log

## 0.6.0
* Keep unused properties if `onExportDelete` returns false. ([@RedHatter](https://github.com/RedHatter) in [#26](https://github.com/browserify/common-shakeify/pull/26))
## 0.5.4

@@ -9,0 +12,0 @@ * Fix export bug with anonymous functions in assignment chains. ([@dy](https://github.com/dy) in [#25](https://github.com/browserify/common-shakeify/pull/25))

5

index.js

@@ -139,4 +139,5 @@ 'use strict'

if (!isUsed(decl.name)) {
opts.onExportDelete(row.sourceFile || row.file, decl.name)
remove(string, decl.ast)
if (opts.onExportDelete(row.sourceFile || row.file, decl.name) !== false) {
remove(string, decl.ast)
}
}

@@ -143,0 +144,0 @@ })

{
"name": "common-shakeify",
"version": "0.5.4",
"version": "0.6.0",
"description": "browserify tree shaking plugin using @indutny common-shake",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -85,3 +85,3 @@ # common-shakeify

Handler called for every exported identifier that is being removed.
`filename` is the path to the file that exports the identifier. `exportName` is the name of the identifier.
`filename` is the path to the file that exports the identifier. `exportName` is the name of the identifier. Return false to bail and keep the identifier.

@@ -88,0 +88,0 @@ ### `onModuleBailout(module, reasons)`

@@ -66,2 +66,5 @@ var test = require('tape')

})
test('exclude', function (t) {
runTest(t, 'exclude')
})
test('paren-exports', function (t) {

@@ -68,0 +71,0 @@ runTest(t, 'paren-exports')

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