@parcel/runtime-js
Advanced tools
Comparing version 2.0.0-nightly.321 to 2.0.0-nightly.322
@@ -229,3 +229,3 @@ "use strict"; | ||
if (bundle.env.outputFormat === 'global') { | ||
loaders += `.then(() => parcelRequire('${bundleGroup.entryAssetId}')${// In global output with scope hoisting, functions return exports are | ||
loaders += `.then(() => parcelRequire('${bundleGraph.getAssetById(bundleGroup.entryAssetId).publicId}')${// In global output with scope hoisting, functions return exports are | ||
// always returned. Otherwise, the exports are returned. | ||
@@ -274,3 +274,3 @@ bundle.env.scopeHoist ? '()' : ''})`; | ||
idToName[getPublicBundleId(bundle)] = (0, _nullthrows.default)(bundle.name); | ||
idToName[bundle.publicId] = (0, _nullthrows.default)(bundle.name); | ||
@@ -287,3 +287,3 @@ if (bundle !== entryBundle && isNewContext(bundle, bundleGraph)) { | ||
if (shouldUseRuntimeManifest(from)) { | ||
return `require('./relative-path')(${JSON.stringify(getPublicBundleId(from))}, ${JSON.stringify(getPublicBundleId(to))})`; | ||
return `require('./relative-path')(${JSON.stringify(from.publicId)}, ${JSON.stringify(to.publicId)})`; | ||
} | ||
@@ -299,6 +299,2 @@ | ||
return !env.isLibrary && env.outputFormat === 'global' && env.isBrowser(); | ||
} | ||
function getPublicBundleId(bundle) { | ||
return bundle.id.slice(-16); | ||
} |
{ | ||
"name": "@parcel/runtime-js", | ||
"version": "2.0.0-nightly.321+457a9c5f", | ||
"version": "2.0.0-nightly.322+78b79101", | ||
"license": "MIT", | ||
@@ -23,7 +23,7 @@ "publishConfig": { | ||
"dependencies": { | ||
"@parcel/plugin": "2.0.0-nightly.321+457a9c5f", | ||
"@parcel/utils": "2.0.0-nightly.321+457a9c5f", | ||
"@parcel/plugin": "2.0.0-nightly.322+78b79101", | ||
"@parcel/utils": "2.0.0-nightly.322+78b79101", | ||
"nullthrows": "^1.1.1" | ||
}, | ||
"gitHead": "457a9c5f5f2fbd7b1a70388c19f545e011d27c7b" | ||
"gitHead": "78b7910149440f34faa7eb636263e98967a8eb22" | ||
} |
@@ -262,3 +262,5 @@ // @flow strict-local | ||
if (bundle.env.outputFormat === 'global') { | ||
loaders += `.then(() => parcelRequire('${bundleGroup.entryAssetId}')${ | ||
loaders += `.then(() => parcelRequire('${ | ||
bundleGraph.getAssetById(bundleGroup.entryAssetId).publicId | ||
}')${ | ||
// In global output with scope hoisting, functions return exports are | ||
@@ -326,3 +328,3 @@ // always returned. Otherwise, the exports are returned. | ||
idToName[getPublicBundleId(bundle)] = nullthrows(bundle.name); | ||
idToName[bundle.publicId] = nullthrows(bundle.name); | ||
@@ -345,4 +347,4 @@ if (bundle !== entryBundle && isNewContext(bundle, bundleGraph)) { | ||
return `require('./relative-path')(${JSON.stringify( | ||
getPublicBundleId(from), | ||
)}, ${JSON.stringify(getPublicBundleId(to))})`; | ||
from.publicId, | ||
)}, ${JSON.stringify(to.publicId)})`; | ||
} | ||
@@ -357,5 +359,1 @@ | ||
} | ||
function getPublicBundleId(bundle: NamedBundle): string { | ||
return bundle.id.slice(-16); | ||
} |
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
41868
1205