common-shakeify
Advanced tools
Comparing version 0.5.4 to 0.6.0
@@ -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)) |
@@ -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') |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
38553
64
739
37