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

@parcel/transformer-html

Package Overview
Dependencies
Maintainers
1
Versions
885
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@parcel/transformer-html - npm Package Compare versions

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

2

lib/HTMLTransformer.js

@@ -50,3 +50,3 @@ "use strict";

(0, _dependencies.default)(asset, options);
return [asset, ...(0, _inline.default)(asset)];
return [asset, ...(0, _inline.default)(asset, options)];
},

@@ -53,0 +53,0 @@

@@ -21,6 +21,7 @@ "use strict";

'application/ld+json': 'jsonld',
'text/html': false
'text/html': false,
module: 'js'
};
function extractInlineAssets(asset) {
function extractInlineAssets(asset, options) {
let ast = (0, _nullthrows.default)(asset.ast);

@@ -38,3 +39,3 @@ let program = ast.program;

if (value != null) {
let type;
let type, env;

@@ -58,2 +59,8 @@ if (node.tag === 'style') {

}
if (node.attrs.type === 'module' && options.scopeHoist) {
env = {
outputFormat: 'esmodule'
};
}
} else {

@@ -86,2 +93,3 @@ type = 'js';

isInline: true,
env,
meta: {

@@ -88,0 +96,0 @@ type: 'tag',

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

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

"dependencies": {
"@parcel/plugin": "2.0.0-nightly.72+a0d19756",
"@parcel/utils": "2.0.0-nightly.72+a0d19756",
"@parcel/plugin": "2.0.0-nightly.79+287ac639",
"@parcel/utils": "2.0.0-nightly.79+287ac639",
"nullthrows": "^1.1.1",

@@ -28,3 +28,3 @@ "posthtml": "^0.11.3",

},
"gitHead": "a0d19756a842b80ae8114b9e664a3b84057fcb70"
"gitHead": "287ac6397ade28595d56ac73971edb832bda8ff7"
}

@@ -30,3 +30,3 @@ // @flow

collectDependencies(asset, options);
return [asset, ...extractInlineAssets(asset)];
return [asset, ...extractInlineAssets(asset, options)];
},

@@ -33,0 +33,0 @@

// @flow strict-local
import type {MutableAsset, TransformerResult} from '@parcel/types';
import type {
MutableAsset,
PluginOptions,
TransformerResult,
} from '@parcel/types';
import {md5FromString} from '@parcel/utils';

@@ -16,2 +20,3 @@ import type {PostHTMLNode} from 'posthtml';

'text/html': false,
module: 'js',
};

@@ -21,2 +26,3 @@

asset: MutableAsset,
options: PluginOptions,
): Array<TransformerResult> {

@@ -34,3 +40,3 @@ let ast = nullthrows(asset.ast);

if (value != null) {
let type;
let type, env;

@@ -54,2 +60,8 @@ if (node.tag === 'style') {

}
if (node.attrs.type === 'module' && options.scopeHoist) {
env = {
outputFormat: 'esmodule',
};
}
} else {

@@ -87,2 +99,3 @@ type = 'js';

isInline: true,
env,
meta: {

@@ -89,0 +102,0 @@ type: 'tag',

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