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

@parcel/packager-html

Package Overview
Dependencies
Maintainers
1
Versions
890
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@parcel/packager-html - npm Package Compare versions

Comparing version 2.0.0-nightly.72 to 2.0.0-nightly.79

22

lib/HTMLPackager.js

@@ -47,3 +47,6 @@ "use strict";

return p.concat(bundles);
}, []);
}, []); // Add bundles in the same bundle group that are not inline. For example, if two inline
// bundles refer to the same library that is extracted into a shared bundle.
bundles = bundles.concat(bundleGraph.getSiblingBundles(bundle).filter(b => !b.isInline));
let {

@@ -78,3 +81,6 @@ html

const bundleResult = await getInlineBundleContents(inlineBundle, bundleGraph);
return bundleResult.contents;
return {
bundle: inlineBundle,
contents: bundleResult.contents
};
}

@@ -99,4 +105,13 @@

if (newContent != null) {
node.content = newContent; // remove attr from output
let {
contents,
bundle
} = newContent;
node.content = contents;
if (bundle.env.outputFormat === 'esmodule') {
node.attrs.type = 'module';
} // remove attr from output
delete node.attrs['data-parcel-key'];

@@ -129,2 +144,3 @@ }

attrs: {
type: bundle.env.outputFormat === 'esmodule' ? 'module' : undefined,
src: (0, _utils.urlJoin)((_nullthrows$publicUrl2 = (0, _nullthrows.default)(bundle.target).publicUrl) !== null && _nullthrows$publicUrl2 !== void 0 ? _nullthrows$publicUrl2 : '/', (0, _nullthrows.default)(bundle.name))

@@ -131,0 +147,0 @@ }

10

package.json
{
"name": "@parcel/packager-html",
"version": "2.0.0-nightly.72+a0d19756",
"version": "2.0.0-nightly.79+287ac639",
"license": "MIT",

@@ -19,9 +19,9 @@ "publishConfig": {

"dependencies": {
"@parcel/plugin": "2.0.0-nightly.72+a0d19756",
"@parcel/types": "2.0.0-nightly.72+a0d19756",
"@parcel/utils": "2.0.0-nightly.72+a0d19756",
"@parcel/plugin": "2.0.0-nightly.79+287ac639",
"@parcel/types": "2.0.0-nightly.79+287ac639",
"@parcel/utils": "2.0.0-nightly.79+287ac639",
"nullthrows": "^1.1.1",
"posthtml": "^0.11.3"
},
"gitHead": "a0d19756a842b80ae8114b9e664a3b84057fcb70"
"gitHead": "287ac6397ade28595d56ac73971edb832bda8ff7"
}
// @flow strict-local
import type {Blob, Bundle, BundleGraph} from '@parcel/types';
import type {Bundle, BundleGraph} from '@parcel/types';

@@ -50,2 +50,8 @@ import assert from 'assert';

// Add bundles in the same bundle group that are not inline. For example, if two inline
// bundles refer to the same library that is extracted into a shared bundle.
bundles = bundles.concat(
bundleGraph.getSiblingBundles(bundle).filter(b => !b.isInline),
);
let {html} = await posthtml([

@@ -72,3 +78,3 @@ insertBundleReferences.bind(this, bundles),

assetId,
): Promise<?Blob> {
) {
let inlineBundle: ?Bundle;

@@ -89,3 +95,3 @@ bundleGraph.traverseBundles((bundle, context, {stop}) => {

return bundleResult.contents;
return {bundle: inlineBundle, contents: bundleResult.contents};
}

@@ -117,4 +123,9 @@

if (newContent != null) {
node.content = newContent;
let {contents, bundle} = newContent;
node.content = contents;
if (bundle.env.outputFormat === 'esmodule') {
node.attrs.type = 'module';
}
// remove attr from output

@@ -147,2 +158,3 @@ delete node.attrs['data-parcel-key'];

attrs: {
type: bundle.env.outputFormat === 'esmodule' ? 'module' : undefined,
src: urlJoin(

@@ -149,0 +161,0 @@ nullthrows(bundle.target).publicUrl ?? '/',

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