New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@parcel/scope-hoisting

Package Overview
Dependencies
Maintainers
1
Versions
293
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@parcel/scope-hoisting - npm Package Compare versions

Comparing version 2.0.0-nightly.102 to 2.0.0-nightly.107

22

lib/concat.js

@@ -73,3 +73,3 @@ "use strict";

enter(asset, context) {
if (shouldExcludeAsset(asset, usedExports, bundleGraph)) {
if (shouldExcludeAsset(asset, usedExports)) {
return context;

@@ -85,3 +85,3 @@ }

exit(asset, context) {
if (!context || shouldExcludeAsset(asset, usedExports, bundleGraph)) {
if (!context || shouldExcludeAsset(asset, usedExports)) {
return;

@@ -199,2 +199,16 @@ }

}
} // If the asset is referenced by another bundle, include all exports.
if (bundleGraph.isAssetReferencedByAssetType(asset, 'js')) {
markUsed(asset, '*');
for (let {
asset: a,
symbol
} of bundleGraph.getExportedSymbols(asset)) {
if (symbol) {
markUsed(a, symbol);
}
}
}

@@ -218,4 +232,4 @@ });

function shouldExcludeAsset(asset, usedExports, bundleGraph) {
return asset.sideEffects === false && !asset.meta.isCommonJS && !bundleGraph.isAssetReferencedByAssetType(asset, 'js') && (!usedExports.has(asset.id) || (0, _nullthrows.default)(usedExports.get(asset.id)).size === 0);
function shouldExcludeAsset(asset, usedExports) {
return asset.sideEffects === false && !asset.meta.isCommonJS && (!usedExports.has(asset.id) || (0, _nullthrows.default)(usedExports.get(asset.id)).size === 0);
}

@@ -222,0 +236,0 @@

8

package.json
{
"name": "@parcel/scope-hoisting",
"version": "2.0.0-nightly.102+28f7bfd1",
"version": "2.0.0-nightly.107+b2851080",
"description": "Blazing fast, zero configuration web application bundler",

@@ -24,8 +24,8 @@ "license": "MIT",

"@babel/types": "^7.3.3",
"@parcel/diagnostic": "2.0.0-nightly.102+28f7bfd1",
"@parcel/utils": "2.0.0-nightly.102+28f7bfd1",
"@parcel/diagnostic": "2.0.0-nightly.107+b2851080",
"@parcel/utils": "2.0.0-nightly.107+b2851080",
"babylon-walk": "^1.0.2",
"nullthrows": "^1.1.1"
},
"gitHead": "28f7bfd13f0c03317b75cb70c433681250a70518"
"gitHead": "b2851080dd7c4c1df22b2c512ce50d7424c36927"
}

@@ -56,3 +56,3 @@ // @flow

enter(asset, context) {
if (shouldExcludeAsset(asset, usedExports, bundleGraph)) {
if (shouldExcludeAsset(asset, usedExports)) {
return context;

@@ -67,3 +67,3 @@ }

exit(asset, context) {
if (!context || shouldExcludeAsset(asset, usedExports, bundleGraph)) {
if (!context || shouldExcludeAsset(asset, usedExports)) {
return;

@@ -181,2 +181,12 @@ }

}
// If the asset is referenced by another bundle, include all exports.
if (bundleGraph.isAssetReferencedByAssetType(asset, 'js')) {
markUsed(asset, '*');
for (let {asset: a, symbol} of bundleGraph.getExportedSymbols(asset)) {
if (symbol) {
markUsed(a, symbol);
}
}
}
});

@@ -202,3 +212,2 @@

usedExports: Map<string, Set<Symbol>>,
bundleGraph: BundleGraph,
) {

@@ -208,3 +217,2 @@ return (

!asset.meta.isCommonJS &&
!bundleGraph.isAssetReferencedByAssetType(asset, 'js') &&
(!usedExports.has(asset.id) ||

@@ -211,0 +219,0 @@ nullthrows(usedExports.get(asset.id)).size === 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