@parcel/babel-ast-utils
Advanced tools
Comparing version 2.0.0-nightly.1849 to 2.0.0-nightly.1850
@@ -27,3 +27,3 @@ "use strict"; | ||
function parse({ | ||
async function parse({ | ||
asset, | ||
@@ -33,13 +33,17 @@ code, | ||
}) { | ||
return { | ||
type: 'babel', | ||
version: '7.0.0', | ||
program: (0, _parser.parse)(code, { | ||
sourceFilename: (0, _utils.relativeUrl)(options.projectRoot, asset.filePath), | ||
allowReturnOutsideFunction: true, | ||
strictMode: false, | ||
sourceType: 'module', | ||
plugins: ['exportDefaultFrom', 'exportNamespaceFrom', 'dynamicImport'] | ||
}) | ||
}; | ||
try { | ||
return { | ||
type: 'babel', | ||
version: '7.0.0', | ||
program: (0, _parser.parse)(code, { | ||
sourceFilename: (0, _utils.relativeUrl)(options.projectRoot, asset.filePath), | ||
allowReturnOutsideFunction: true, | ||
strictMode: false, | ||
sourceType: 'module', | ||
plugins: ['exportDefaultFrom', 'exportNamespaceFrom', 'dynamicImport'] | ||
}) | ||
}; | ||
} catch (e) { | ||
throw await (0, _babelErrorUtils.babelErrorEnhancer)(e, asset); | ||
} | ||
} | ||
@@ -46,0 +50,0 @@ |
{ | ||
"name": "@parcel/babel-ast-utils", | ||
"version": "2.0.0-nightly.1849+a98be591", | ||
"version": "2.0.0-nightly.1850+7c0aa3d2", | ||
"description": "Blazing fast, zero configuration web application bundler", | ||
@@ -22,5 +22,5 @@ "license": "MIT", | ||
"@parcel/source-map": "2.0.0-alpha.4.9", | ||
"@parcel/utils": "2.0.0-nightly.227+a98be591" | ||
"@parcel/utils": "2.0.0-nightly.228+7c0aa3d2" | ||
}, | ||
"gitHead": "a98be59141fd8d4769010c6ea936252cb07f8056" | ||
"gitHead": "7c0aa3d2b9cd4a8d3cb6135e6b07d05f33406389" | ||
} |
@@ -13,3 +13,3 @@ // @flow strict-local | ||
export function parse({ | ||
export async function parse({ | ||
asset, | ||
@@ -22,14 +22,18 @@ code, | ||
options: PluginOptions, | ||
|}): AST { | ||
return { | ||
type: 'babel', | ||
version: '7.0.0', | ||
program: babelParse(code, { | ||
sourceFilename: relativeUrl(options.projectRoot, asset.filePath), | ||
allowReturnOutsideFunction: true, | ||
strictMode: false, | ||
sourceType: 'module', | ||
plugins: ['exportDefaultFrom', 'exportNamespaceFrom', 'dynamicImport'], | ||
}), | ||
}; | ||
|}): Promise<AST> { | ||
try { | ||
return { | ||
type: 'babel', | ||
version: '7.0.0', | ||
program: babelParse(code, { | ||
sourceFilename: relativeUrl(options.projectRoot, asset.filePath), | ||
allowReturnOutsideFunction: true, | ||
strictMode: false, | ||
sourceType: 'module', | ||
plugins: ['exportDefaultFrom', 'exportNamespaceFrom', 'dynamicImport'], | ||
}), | ||
}; | ||
} catch (e) { | ||
throw await babelErrorEnhancer(e, asset); | ||
} | ||
} | ||
@@ -36,0 +40,0 @@ |
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
6043
162