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

import-html-entry

Package Overview
Dependencies
Maintainers
1
Versions
93
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

import-html-entry - npm Package Compare versions

Comparing version 1.14.5 to 1.14.6

13

esm/process-tpl.js

@@ -28,3 +28,3 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";

function hasProtocol(url) {
return url.startsWith('//') || url.startsWith('http://') || url.startsWith('https://');
return url.startsWith('http://') || url.startsWith('https://');
}

@@ -132,9 +132,11 @@ function getEntirePath(path, baseURI) {

throw new SyntaxError('You should not set multiply entry script!');
} else {
// append the domain while the script not have an protocol prefix
if (matchedScriptSrc && !hasProtocol(matchedScriptSrc)) {
}
if (matchedScriptSrc) {
// append the domain while the script not have a protocol prefix
if (!hasProtocol(matchedScriptSrc)) {
matchedScriptSrc = getEntirePath(matchedScriptSrc, baseURI);
}
entry = entry || matchedScriptEntry && matchedScriptSrc;
matchedScriptSrc = parseUrl(matchedScriptSrc);
}
entry = entry || matchedScriptEntry && matchedScriptSrc;
if (scriptIgnore) {

@@ -148,3 +150,2 @@ return genIgnoreAssetReplaceSymbol(matchedScriptSrc || 'js file');

var asyncScript = !!scriptTag.match(SCRIPT_ASYNC_REGEX);
matchedScriptSrc = parseUrl(matchedScriptSrc);
scripts.push(asyncScript ? {

@@ -151,0 +152,0 @@ async: true,

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

function hasProtocol(url) {
return url.startsWith('//') || url.startsWith('http://') || url.startsWith('https://');
return url.startsWith('http://') || url.startsWith('https://');
}

@@ -146,9 +146,11 @@ function getEntirePath(path, baseURI) {

throw new SyntaxError('You should not set multiply entry script!');
} else {
// append the domain while the script not have an protocol prefix
if (matchedScriptSrc && !hasProtocol(matchedScriptSrc)) {
}
if (matchedScriptSrc) {
// append the domain while the script not have a protocol prefix
if (!hasProtocol(matchedScriptSrc)) {
matchedScriptSrc = getEntirePath(matchedScriptSrc, baseURI);
}
entry = entry || matchedScriptEntry && matchedScriptSrc;
matchedScriptSrc = (0, _utils.parseUrl)(matchedScriptSrc);
}
entry = entry || matchedScriptEntry && matchedScriptSrc;
if (scriptIgnore) {

@@ -162,3 +164,2 @@ return genIgnoreAssetReplaceSymbol(matchedScriptSrc || 'js file');

var asyncScript = !!scriptTag.match(SCRIPT_ASYNC_REGEX);
matchedScriptSrc = (0, _utils.parseUrl)(matchedScriptSrc);
scripts.push(asyncScript ? {

@@ -165,0 +166,0 @@ async: true,

{
"name": "import-html-entry",
"version": "1.14.5",
"version": "1.14.6",
"description": "import html and get the exports of entry",

@@ -5,0 +5,0 @@ "main": "./lib/index.js",

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