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.242 to 2.0.0-nightly.249

13

lib/link.js

@@ -289,7 +289,10 @@ "use strict";

function addBundleImport(mod, path) {
// Find the first bundle containing this asset, and create an import for it if needed.
// An asset may be duplicated in multiple bundles, so try to find one that matches
// the current environment if possible and fall back to the first one.
let bundles = bundleGraph.findBundlesWithAsset(mod);
let importedBundle = bundles.find(b => b.env.context === bundle.env.context) || bundles[0];
// Find a bundle that's reachable from the current bundle (sibling or ancestor)
// containing this asset, and create an import for it if needed.
let importedBundle = bundleGraph.findReachableBundleWithAsset(bundle, mod);
if (!importedBundle) {
throw new Error(`No reachable bundle found containing ${(0, _path.relative)(options.inputFS.cwd(), mod.filePath)}`);
}
let filePath = (0, _nullthrows.default)(importedBundle.filePath);

@@ -296,0 +299,0 @@ let imported = importedFiles.get(filePath);

{
"name": "@parcel/scope-hoisting",
"version": "2.0.0-nightly.242+ac5e8071",
"version": "2.0.0-nightly.249+e63c77c8",
"description": "Blazing fast, zero configuration web application bundler",

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

"@babel/types": "^7.3.3",
"@parcel/babylon-walk": "2.0.0-nightly.1864+ac5e8071",
"@parcel/diagnostic": "2.0.0-nightly.242+ac5e8071",
"@parcel/babylon-walk": "2.0.0-nightly.1871+e63c77c8",
"@parcel/diagnostic": "2.0.0-nightly.249+e63c77c8",
"@parcel/source-map": "2.0.0-alpha.4.9",
"@parcel/utils": "2.0.0-nightly.242+ac5e8071",
"@parcel/utils": "2.0.0-nightly.249+e63c77c8",
"nullthrows": "^1.1.1"
},
"gitHead": "ac5e807141df2ab1d83853b631551b28643b5869"
"gitHead": "e63c77c800f95d64b835212632d1a9ed2db9f381"
}

@@ -332,8 +332,14 @@ // @flow

function addBundleImport(mod, path) {
// Find the first bundle containing this asset, and create an import for it if needed.
// An asset may be duplicated in multiple bundles, so try to find one that matches
// the current environment if possible and fall back to the first one.
let bundles = bundleGraph.findBundlesWithAsset(mod);
let importedBundle =
bundles.find(b => b.env.context === bundle.env.context) || bundles[0];
// Find a bundle that's reachable from the current bundle (sibling or ancestor)
// containing this asset, and create an import for it if needed.
let importedBundle = bundleGraph.findReachableBundleWithAsset(bundle, mod);
if (!importedBundle) {
throw new Error(
`No reachable bundle found containing ${relative(
options.inputFS.cwd(),
mod.filePath,
)}`,
);
}
let filePath = nullthrows(importedBundle.filePath);

@@ -340,0 +346,0 @@ let imported = importedFiles.get(filePath);

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