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

@jsenv/import-map

Package Overview
Dependencies
Maintainers
2
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jsenv/import-map - npm Package Compare versions

Comparing version 6.13.0 to 6.13.1

20

dist/esmodule/main.js

@@ -711,4 +711,4 @@ var createDetailedMessage = function createDetailedMessage(message) {

if (typeof baseUrl !== "string") {
throw new TypeError(formulateBaseUrlMustBeAString({
if (isStringOrUrl(baseUrl)) {
throw new TypeError(formulateBaseUrlMustBeStringOrUrl({
baseUrl: baseUrl

@@ -726,2 +726,14 @@ }));

var isStringOrUrl = function isStringOrUrl(value) {
if (typeof value === "string") {
return true;
}
if (typeof URL === "function" && value instanceof URL) {
return true;
}
return false;
};
var normalizeMappings = function normalizeMappings(mappings, baseUrl) {

@@ -786,5 +798,5 @@ var mappingsNormalized = {};

var formulateBaseUrlMustBeAString = function formulateBaseUrlMustBeAString(_ref) {
var formulateBaseUrlMustBeStringOrUrl = function formulateBaseUrlMustBeStringOrUrl(_ref) {
var baseUrl = _ref.baseUrl;
return "baseUrl must be a string.\n--- base url ---\n".concat(baseUrl);
return "baseUrl must be a string or an url.\n--- base url ---\n".concat(baseUrl);
};

@@ -791,0 +803,0 @@

2

package.json
{
"name": "@jsenv/import-map",
"version": "6.13.0",
"version": "6.13.1",
"description": "Helpers to implement importmaps.",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -8,4 +8,5 @@ import { assertImportMap } from "./internal/assertImportMap.js"

assertImportMap(importMap)
if (typeof baseUrl !== "string") {
throw new TypeError(formulateBaseUrlMustBeAString({ baseUrl }))
if (isStringOrUrl(baseUrl)) {
throw new TypeError(formulateBaseUrlMustBeStringOrUrl({ baseUrl }))
}

@@ -21,2 +22,14 @@

const isStringOrUrl = (value) => {
if (typeof value === "string") {
return true
}
if (typeof URL === "function" && value instanceof URL) {
return true
}
return false
}
const normalizeMappings = (mappings, baseUrl) => {

@@ -90,3 +103,3 @@ const mappingsNormalized = {}

const formulateBaseUrlMustBeAString = ({ baseUrl }) => `baseUrl must be a string.
const formulateBaseUrlMustBeStringOrUrl = ({ baseUrl }) => `baseUrl must be a string or an url.
--- base url ---

@@ -93,0 +106,0 @@ ${baseUrl}`

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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