@parcel/scope-hoisting
Advanced tools
Comparing version 2.0.0-nightly.608 to 2.0.0-nightly.609
@@ -68,2 +68,12 @@ "use strict"; | ||
function _diagnostic() { | ||
const data = require("@parcel/diagnostic"); | ||
_diagnostic = function () { | ||
return data; | ||
}; | ||
return data; | ||
} | ||
function _babylonWalk() { | ||
@@ -276,6 +286,6 @@ const data = require("@parcel/babylon-walk"); | ||
let relativePath = (0, _path().relative)(options.projectRoot, asset.filePath); | ||
throw (0, _utils().getThrowableDiagnosticForNode)(`${relativePath} couldn't be statically analyzed when importing '${exportSymbol}'`, entry.filePath, loc); | ||
throw (0, _utils().getThrowableDiagnosticForNode)((0, _diagnostic().md)`${relativePath} couldn't be statically analyzed when importing '${exportSymbol}'`, entry.filePath, loc); | ||
} else if (symbol !== false) { | ||
let relativePath = (0, _path().relative)(options.projectRoot, asset.filePath); | ||
throw (0, _utils().getThrowableDiagnosticForNode)(`${relativePath} does not export '${exportSymbol}'`, entry.filePath, loc); | ||
throw (0, _utils().getThrowableDiagnosticForNode)((0, _diagnostic().md)`${relativePath} does not export '${exportSymbol}'`, entry.filePath, loc); | ||
} | ||
@@ -742,3 +752,3 @@ } | ||
if (bundle.env.outputFormat !== 'commonjs') { | ||
throw (0, _utils().getThrowableDiagnosticForNode)("`require.resolve` calls for excluded assets are only supported with outputFormat: 'commonjs'", mapped.filePath, (0, _babelAstUtils().convertBabelLoc)(node.loc)); | ||
throw (0, _utils().getThrowableDiagnosticForNode)("'require.resolve' calls for excluded assets are only supported with outputFormat: 'commonjs'", mapped.filePath, (0, _babelAstUtils().convertBabelLoc)(node.loc)); | ||
} | ||
@@ -750,3 +760,3 @@ | ||
} else { | ||
throw (0, _utils().getThrowableDiagnosticForNode)("`require.resolve` calls for bundled modules or bundled assets aren't supported with scope hoisting", mapped.filePath, (0, _babelAstUtils().convertBabelLoc)(node.loc)); | ||
throw (0, _utils().getThrowableDiagnosticForNode)("'require.resolve' calls for bundled modules or bundled assets aren't supported with scope hoisting", mapped.filePath, (0, _babelAstUtils().convertBabelLoc)(node.loc)); | ||
} | ||
@@ -753,0 +763,0 @@ } else if (callee.name === '$parcel$exportWildcard') { |
{ | ||
"name": "@parcel/scope-hoisting", | ||
"version": "2.0.0-nightly.608+46af2476", | ||
"version": "2.0.0-nightly.609+d77a5647", | ||
"description": "Blazing fast, zero configuration web application bundler", | ||
@@ -27,11 +27,11 @@ "license": "MIT", | ||
"@babel/types": "^7.12.13", | ||
"@parcel/babel-ast-utils": "2.0.0-nightly.2230+46af2476", | ||
"@parcel/babylon-walk": "2.0.0-nightly.2230+46af2476", | ||
"@parcel/diagnostic": "2.0.0-nightly.608+46af2476", | ||
"@parcel/babel-ast-utils": "2.0.0-nightly.2231+d77a5647", | ||
"@parcel/babylon-walk": "2.0.0-nightly.2231+d77a5647", | ||
"@parcel/diagnostic": "2.0.0-nightly.609+d77a5647", | ||
"@parcel/source-map": "2.0.0-alpha.4.21", | ||
"@parcel/utils": "2.0.0-nightly.608+46af2476", | ||
"@parcel/utils": "2.0.0-nightly.609+d77a5647", | ||
"globals": "^13.2.0", | ||
"nullthrows": "^1.1.1" | ||
}, | ||
"gitHead": "46af2476ecb78921af21432f978d863fbffafd9d" | ||
"gitHead": "d77a564742998e59d65024356b57395a54b93753" | ||
} |
@@ -32,2 +32,3 @@ // @flow | ||
import * as t from '@babel/types'; | ||
import {md} from '@parcel/diagnostic'; | ||
import { | ||
@@ -248,3 +249,3 @@ isAssignmentExpression, | ||
throw getThrowableDiagnosticForNode( | ||
`${relativePath} couldn't be statically analyzed when importing '${exportSymbol}'`, | ||
md`${relativePath} couldn't be statically analyzed when importing '${exportSymbol}'`, | ||
entry.filePath, | ||
@@ -256,3 +257,3 @@ loc, | ||
throw getThrowableDiagnosticForNode( | ||
`${relativePath} does not export '${exportSymbol}'`, | ||
md`${relativePath} does not export '${exportSymbol}'`, | ||
entry.filePath, | ||
@@ -765,3 +766,3 @@ loc, | ||
throw getThrowableDiagnosticForNode( | ||
"`require.resolve` calls for excluded assets are only supported with outputFormat: 'commonjs'", | ||
"'require.resolve' calls for excluded assets are only supported with outputFormat: 'commonjs'", | ||
mapped.filePath, | ||
@@ -777,3 +778,3 @@ convertBabelLoc(node.loc), | ||
throw getThrowableDiagnosticForNode( | ||
"`require.resolve` calls for bundled modules or bundled assets aren't supported with scope hoisting", | ||
"'require.resolve' calls for bundled modules or bundled assets aren't supported with scope hoisting", | ||
mapped.filePath, | ||
@@ -780,0 +781,0 @@ convertBabelLoc(node.loc), |
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
254823
6953