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

common-shakeify

Package Overview
Dependencies
Maintainers
1
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.4.2 to 0.4.3

12

index.js

@@ -31,3 +31,4 @@ 'use strict'

const loc = reason.loc.start
console.warn('common-shake: bailed out: ', reason.reason, 'in', `${relative(basedir, resource.resource)}:${loc.line}:${loc.column}`)
const source = reason.source || resource.resource
console.warn('common-shake: bailed out: ', reason.reason, 'in', `${relative(basedir, source)}:${loc.line}:${loc.column}`)
})

@@ -83,3 +84,6 @@ }

let ast
const string = transformAst(source, { locations: true }, (node) => {
const string = transformAst(source, {
locations: true,
ecmaVersion: 9
}, (node) => {
if (node.type === 'Program') ast = node

@@ -183,3 +187,5 @@ })

// which is invalid.
node.right.type === 'AssignmentExpression') {
node.right.type === 'AssignmentExpression' ||
// Don't output a statement containing only `void () => {}`
node.right.type === 'ArrowFunctionExpression') {
prefix += 'void 0, '

@@ -186,0 +192,0 @@ }

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

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

@@ -8,2 +8,3 @@ (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){

exports.exports = function () {}
/* common-shake removed: exports.other = */ void 0, () => { console.log('other') }

@@ -10,0 +11,0 @@ console.log(/* common-shake removed: exports.a = */ 'hello world')

exports.exports = function () {}
exports.other = () => { console.log('other') }

@@ -3,0 +4,0 @@ console.log(exports.a = 'hello world')

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