@parcel/scope-hoisting
Advanced tools
Comparing version 2.0.0-nightly.266 to 2.0.0-nightly.268
{ | ||
"name": "@parcel/scope-hoisting", | ||
"version": "2.0.0-nightly.266+4210f2fb", | ||
"version": "2.0.0-nightly.268+f65aa4c5", | ||
"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.1888+4210f2fb", | ||
"@parcel/diagnostic": "2.0.0-nightly.266+4210f2fb", | ||
"@parcel/babylon-walk": "2.0.0-nightly.1890+f65aa4c5", | ||
"@parcel/diagnostic": "2.0.0-nightly.268+f65aa4c5", | ||
"@parcel/source-map": "2.0.0-alpha.4.9", | ||
"@parcel/utils": "2.0.0-nightly.266+4210f2fb", | ||
"@parcel/utils": "2.0.0-nightly.268+f65aa4c5", | ||
"nullthrows": "^1.1.1" | ||
}, | ||
"gitHead": "4210f2fbf1f5973be24fa268a7bb9b6d52ba326b" | ||
"gitHead": "f65aa4c53ab130debfc88f4628eb001f52fb5f63" | ||
} |
@@ -5,5 +5,5 @@ // @flow | ||
Asset, | ||
Bundle, | ||
BundleGraph, | ||
PluginOptions, | ||
NamedBundle, | ||
Symbol, | ||
@@ -67,4 +67,4 @@ } from '@parcel/types'; | ||
}: {| | ||
bundle: Bundle, | ||
bundleGraph: BundleGraph, | ||
bundle: NamedBundle, | ||
bundleGraph: BundleGraph<NamedBundle>, | ||
options: PluginOptions, | ||
@@ -166,3 +166,3 @@ wrappedAssets: Set<string>, | ||
options: PluginOptions, | ||
bundle: Bundle, | ||
bundle: NamedBundle, | ||
asset: Asset, | ||
@@ -202,4 +202,4 @@ wrappedAssets: Set<string>, | ||
function getUsedExports( | ||
bundle: Bundle, | ||
bundleGraph: BundleGraph, | ||
bundle: NamedBundle, | ||
bundleGraph: BundleGraph<NamedBundle>, | ||
): Map<string, Set<Symbol>> { | ||
@@ -270,3 +270,3 @@ let usedExports: Map<string, Set<Symbol>> = new Map(); | ||
function shouldSkipAsset( | ||
bundleGraph: BundleGraph, | ||
bundleGraph: BundleGraph<NamedBundle>, | ||
asset: Asset, | ||
@@ -296,4 +296,4 @@ usedExports: Map<string, Set<Symbol>>, | ||
}: {| | ||
bundle: Bundle, | ||
bundleGraph: BundleGraph, | ||
bundle: NamedBundle, | ||
bundleGraph: BundleGraph<NamedBundle>, | ||
asset: Asset, | ||
@@ -328,4 +328,4 @@ result: Array<Asset>, | ||
function findRequires( | ||
bundle: Bundle, | ||
bundleGraph: BundleGraph, | ||
bundle: NamedBundle, | ||
bundleGraph: BundleGraph<NamedBundle>, | ||
asset: Asset, | ||
@@ -332,0 +332,0 @@ ast: Node, |
@@ -5,5 +5,5 @@ // @flow | ||
Asset, | ||
Bundle, | ||
BundleGraph, | ||
PluginOptions, | ||
NamedBundle, | ||
Symbol, | ||
@@ -143,3 +143,3 @@ } from '@parcel/types'; | ||
export function generateBundleImports( | ||
from: Bundle, | ||
from: NamedBundle, | ||
{bundle, assets}: ExternalBundle, | ||
@@ -188,3 +188,3 @@ path: NodePath<Program>, | ||
export function generateExternalImport( | ||
bundle: Bundle, | ||
bundle: NamedBundle, | ||
external: ExternalModule, | ||
@@ -374,4 +374,4 @@ path: NodePath<Program>, | ||
export function generateExports( | ||
bundleGraph: BundleGraph, | ||
bundle: Bundle, | ||
bundleGraph: BundleGraph<NamedBundle>, | ||
bundle: NamedBundle, | ||
referencedAssets: Set<Asset>, | ||
@@ -378,0 +378,0 @@ path: NodePath<Program>, |
@@ -7,2 +7,3 @@ // @flow strict-local | ||
BundleGraph, | ||
NamedBundle, | ||
PluginOptions, | ||
@@ -41,3 +42,3 @@ Symbol, | ||
export function generateBundleImports( | ||
from: Bundle, | ||
from: NamedBundle, | ||
{bundle, assets}: ExternalBundle, | ||
@@ -125,3 +126,3 @@ path: NodePath<Program>, | ||
export function generateExports( | ||
bundleGraph: BundleGraph, | ||
bundleGraph: BundleGraph<NamedBundle>, | ||
bundle: Bundle, | ||
@@ -128,0 +129,0 @@ referencedAssets: Set<Asset>, |
// @flow | ||
import type {Asset, Bundle, BundleGraph, Symbol} from '@parcel/types'; | ||
import type { | ||
Asset, | ||
Bundle, | ||
BundleGraph, | ||
NamedBundle, | ||
Symbol, | ||
} from '@parcel/types'; | ||
import type {NodePath} from '@babel/traverse'; | ||
@@ -47,3 +53,3 @@ import type { | ||
export function generateBundleImports( | ||
from: Bundle, | ||
from: NamedBundle, | ||
{bundle, assets}: ExternalBundle, | ||
@@ -79,4 +85,4 @@ path: NodePath<Program>, | ||
export function generateExports( | ||
bundleGraph: BundleGraph, | ||
bundle: Bundle, | ||
bundleGraph: BundleGraph<NamedBundle>, | ||
bundle: NamedBundle, | ||
referencedAssets: Set<Asset>, | ||
@@ -83,0 +89,0 @@ path: NodePath<Program>, |
// @flow | ||
import type {Asset, Bundle, BundleGraph, PluginOptions} from '@parcel/types'; | ||
import type { | ||
Asset, | ||
BundleGraph, | ||
NamedBundle, | ||
PluginOptions, | ||
} from '@parcel/types'; | ||
import type { | ||
ArrayExpression, | ||
@@ -48,4 +53,4 @@ ExpressionStatement, | ||
}: {| | ||
bundleGraph: BundleGraph, | ||
bundle: Bundle, | ||
bundleGraph: BundleGraph<NamedBundle>, | ||
bundle: NamedBundle, | ||
ast: File, | ||
@@ -52,0 +57,0 @@ options: PluginOptions, |
@@ -5,4 +5,4 @@ // @flow | ||
Asset, | ||
Bundle, | ||
BundleGraph, | ||
NamedBundle, | ||
PluginOptions, | ||
@@ -84,4 +84,4 @@ Symbol, | ||
}: {| | ||
bundle: Bundle, | ||
bundleGraph: BundleGraph, | ||
bundle: NamedBundle, | ||
bundleGraph: BundleGraph<NamedBundle>, | ||
ast: File, | ||
@@ -88,0 +88,0 @@ options: PluginOptions, |
// @flow strict-local | ||
import type { | ||
Asset, | ||
Bundle, | ||
BundleGraph, | ||
ModuleSpecifier, | ||
NamedBundle, | ||
PluginOptions, | ||
@@ -22,3 +22,3 @@ Symbol, | ||
export type ExternalBundle = {| | ||
bundle: Bundle, | ||
bundle: NamedBundle, | ||
assets: Set<Asset>, | ||
@@ -30,3 +30,3 @@ loc?: ?SourceLocation, | ||
generateBundleImports( | ||
from: Bundle, | ||
from: NamedBundle, | ||
external: ExternalBundle, | ||
@@ -36,3 +36,3 @@ path: NodePath<Program>, | ||
generateExternalImport( | ||
bundle: Bundle, | ||
bundle: NamedBundle, | ||
external: ExternalModule, | ||
@@ -42,4 +42,4 @@ path: NodePath<Program>, | ||
generateExports( | ||
bundleGraph: BundleGraph, | ||
bundle: Bundle, | ||
bundleGraph: BundleGraph<NamedBundle>, | ||
bundle: NamedBundle, | ||
referencedAssets: Set<Asset>, | ||
@@ -46,0 +46,0 @@ path: NodePath<Program>, |
// @flow | ||
import type { | ||
Asset, | ||
Bundle, | ||
BundleGraph, | ||
MutableAsset, | ||
NamedBundle, | ||
SourceLocation, | ||
@@ -62,3 +62,6 @@ } from '@parcel/types'; | ||
export function needsPrelude(bundle: Bundle, bundleGraph: BundleGraph) { | ||
export function needsPrelude( | ||
bundle: NamedBundle, | ||
bundleGraph: BundleGraph<NamedBundle>, | ||
) { | ||
if (bundle.env.outputFormat !== 'global') { | ||
@@ -83,3 +86,6 @@ return false; | ||
export function isEntry(bundle: Bundle, bundleGraph: BundleGraph) { | ||
export function isEntry( | ||
bundle: NamedBundle, | ||
bundleGraph: BundleGraph<NamedBundle>, | ||
) { | ||
// If there is no parent JS bundle (e.g. in an HTML page), or environment is isolated (e.g. worker) | ||
@@ -92,3 +98,6 @@ // then this bundle is an "entry" | ||
export function isReferenced(bundle: Bundle, bundleGraph: BundleGraph) { | ||
export function isReferenced( | ||
bundle: NamedBundle, | ||
bundleGraph: BundleGraph<NamedBundle>, | ||
) { | ||
let isReferenced = false; | ||
@@ -110,4 +119,4 @@ bundle.traverseAssets((asset, _, actions) => { | ||
export function hasAsyncDescendant( | ||
bundle: Bundle, | ||
bundleGraph: BundleGraph, | ||
bundle: NamedBundle, | ||
bundleGraph: BundleGraph<NamedBundle>, | ||
): boolean { | ||
@@ -114,0 +123,0 @@ let _hasAsyncDescendant = false; |
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
225321
6014