Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@parcel/babel-ast-utils

Package Overview
Dependencies
Maintainers
1
Versions
379
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@parcel/babel-ast-utils - npm Package Compare versions

Comparing version 2.0.0-nightly.1849 to 2.0.0-nightly.1850

28

lib/index.js

@@ -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 @@

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