Socket
Socket
Sign inDemoInstall

common-shakeify

Package Overview
Dependencies
Maintainers
39
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.1 to 0.5.2

test/paren-exports/a.js

3

CHANGELOG.md

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

## 0.5.2
* Fix removing exports that are parenthesized expressions. ([#20](https://github.com/browserify/common-shakeify/pull/20))
## 0.5.1

@@ -9,0 +12,0 @@ * Fix file names in source maps. ([#16](https://github.com/browserify/common-shakeify/pull/16))

@@ -197,3 +197,11 @@ 'use strict'

}
string.overwrite(node.start, node.right.start, prefix)
// Acorn silently strips parens, and node.right.start might be after one
// or more parenthesis that we need to keep. Eg, exports.a = (1+1)
if (node.right.end !== node.end) {
// Replace entire expression. node.start - node.end will wrap the entire expression.
string.overwrite(node.start, node.end, prefix + '(' + node.right.getSource() + ')')
} else {
string.overwrite(node.start, node.right.start, prefix)
}
return

@@ -200,0 +208,0 @@ } else if (node.type === 'Property') {

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

@@ -19,2 +19,7 @@ "main": "index.js",

"author": "Renée Kooi <renee@kooi.me>",
"contributors": [
"Damian Krzeminski (https://github.com/pirxpilot)",
"Seph Gentle (https://github.com/josephg)",
"Titus (https://github.com/wooorm)"
],
"license": "MIT",

@@ -21,0 +26,0 @@ "bugs": {

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

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

@@ -68,0 +71,0 @@ test('external', function (t) {

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