New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@parcel/runtime-js

Package Overview
Dependencies
Maintainers
0
Versions
899
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@parcel/runtime-js - npm Package Compare versions

Comparing version 2.0.0-canary.1769 to 2.0.0-canary.1770

14

lib/helpers/browser/css-loader.js

@@ -6,6 +6,13 @@ "use strict";

return new Promise(function (resolve, reject) {
if (typeof document === 'undefined') {
return resolve();
}
var link = document.createElement('link');
link.rel = 'stylesheet';
link.href = bundle;
// Don't insert the same link element twice (e.g. if it was already in the HTML)
var existingLinks = document.getElementsByTagName('link');
if ([].concat(existingLinks).some(function (link) {
return link.href === bundle && link.rel.indexOf('stylesheet') > -1;
if (Array.from(existingLinks).some(function (existing) {
return existing.href === link.href && existing.rel.indexOf('stylesheet') > -1;
})) {

@@ -15,5 +22,2 @@ resolve();

}
var link = document.createElement('link');
link.rel = 'stylesheet';
link.href = bundle;
link.onerror = function (e) {

@@ -20,0 +24,0 @@ link.onerror = link.onload = null;

{
"name": "@parcel/runtime-js",
"version": "2.0.0-canary.1769+337c31c68",
"version": "2.0.0-canary.1770+e3a2b726d",
"license": "MIT",

@@ -20,11 +20,11 @@ "publishConfig": {

"node": ">= 16.0.0",
"parcel": "^2.0.0-canary.1767+337c31c68"
"parcel": "^2.0.0-canary.1768+e3a2b726d"
},
"dependencies": {
"@parcel/diagnostic": "2.0.0-canary.1769+337c31c68",
"@parcel/plugin": "2.0.0-canary.1769+337c31c68",
"@parcel/utils": "2.0.0-canary.1769+337c31c68",
"@parcel/diagnostic": "2.0.0-canary.1770+e3a2b726d",
"@parcel/plugin": "2.0.0-canary.1770+e3a2b726d",
"@parcel/utils": "2.0.0-canary.1770+e3a2b726d",
"nullthrows": "^1.1.1"
},
"gitHead": "337c31c68ff350f1a971752746bb0e01583f5ef4"
"gitHead": "e3a2b726db9382a873834da82746671d54557d2b"
}

@@ -5,9 +5,19 @@ const cacheLoader = require('../cacheLoader');

return new Promise(function (resolve, reject) {
if (typeof document === 'undefined') {
return resolve();
}
var link = document.createElement('link');
link.rel = 'stylesheet';
link.href = bundle;
// Don't insert the same link element twice (e.g. if it was already in the HTML)
let existingLinks = document.getElementsByTagName('link');
let isCurrentBundle = function (link) {
return link.href === bundle && link.rel.indexOf('stylesheet') > -1;
let isCurrentBundle = function (existing) {
return (
existing.href === link.href && existing.rel.indexOf('stylesheet') > -1
);
};
if ([].concat(existingLinks).some(isCurrentBundle)) {
if (Array.from(existingLinks).some(isCurrentBundle)) {
resolve();

@@ -17,5 +27,2 @@ return;

var link = document.createElement('link');
link.rel = 'stylesheet';
link.href = bundle;
link.onerror = function (e) {

@@ -22,0 +29,0 @@ link.onerror = link.onload = null;

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