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

@parcel/scope-hoisting

Package Overview
Dependencies
Maintainers
1
Versions
293
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@parcel/scope-hoisting - npm Package Compare versions

Comparing version 2.0.0-nightly.97 to 2.0.0-nightly.101

6

lib/generate.js

@@ -16,7 +16,7 @@ "use strict";

function generate(bundleGraph, bundle, ast, options) {
function generate(bundleGraph, bundle, ast) {
let {
code
} = (0, _generator.default)(ast, {
minified: options.minify,
minified: bundle.env.minify,
comments: true // retain /*@__PURE__*/ comments for terser

@@ -31,3 +31,3 @@

if (!options.minify && (isAsync || bundle.env.outputFormat === 'global')) {
if (!bundle.env.minify && (isAsync || bundle.env.outputFormat === 'global')) {
code = `\n${code}`;

@@ -34,0 +34,0 @@ } // Wrap async bundles in a closure and register with parcelRequire so they are executed

{
"name": "@parcel/scope-hoisting",
"version": "2.0.0-nightly.97+a63f3fc9",
"version": "2.0.0-nightly.101+fa36fe82",
"description": "Blazing fast, zero configuration web application bundler",

@@ -24,7 +24,8 @@ "license": "MIT",

"@babel/types": "^7.3.3",
"@parcel/utils": "2.0.0-nightly.97+a63f3fc9",
"@parcel/diagnostic": "2.0.0-nightly.101+fa36fe82",
"@parcel/utils": "2.0.0-nightly.101+fa36fe82",
"babylon-walk": "^1.0.2",
"nullthrows": "^1.1.1"
},
"gitHead": "a63f3fc9726483219412920faeb255e035f90747"
"gitHead": "fa36fe822604e5bc19789cd5c1e89b090c3a7471"
}
// @flow
import type {AST, Bundle, BundleGraph, PluginOptions} from '@parcel/types';
import type {AST, Bundle, BundleGraph} from '@parcel/types';
import babelGenerate from '@babel/generator';

@@ -8,10 +8,5 @@ import nullthrows from 'nullthrows';

export function generate(
bundleGraph: BundleGraph,
bundle: Bundle,
ast: AST,
options: PluginOptions,
) {
export function generate(bundleGraph: BundleGraph, bundle: Bundle, ast: AST) {
let {code} = babelGenerate(ast, {
minified: options.minify,
minified: bundle.env.minify,
comments: true, // retain /*@__PURE__*/ comments for terser

@@ -28,3 +23,3 @@ });

let isAsync = entry && !isEntry(bundle, bundleGraph);
if (!options.minify && (isAsync || bundle.env.outputFormat === 'global')) {
if (!bundle.env.minify && (isAsync || bundle.env.outputFormat === 'global')) {
code = `\n${code}`;

@@ -31,0 +26,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