Socket
Socket
Sign inDemoInstall

@jridgewell/resolve-uri

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jridgewell/resolve-uri - npm Package Compare versions

Comparing version 3.0.1 to 3.0.2

6

dist/resolve-uri.umd.js

@@ -17,3 +17,3 @@ (function (global, factory) {

*/
const urlRegex = /^([\w+.-]+:)\/\/([^@]*@)?([^:/]+)(:\d+)?(\/[^#?]*)?/;
const urlRegex = /^([\w+.-]+:)\/\/([^@]*@)?([^:/]*)(:\d+)?(\/[^#?]*)?/;
function isAbsoluteUrl(input) {

@@ -153,3 +153,3 @@ return schemeRegex.test(input);

// If there's no host, then we were just a path.
if (!url.host) {
if (!url.host || baseUrl.scheme === 'file:') {
// The host, user, and port are joined, you can't copy one without the others.

@@ -176,3 +176,3 @@ url.user = baseUrl.user;

// If there's no host (and no scheme/user/port), then we need to output an absolute path.
if (!url.host)
if (!url.scheme && !url.host)
return url.path;

@@ -179,0 +179,0 @@ // We're outputting either an absolute URL, or a protocol relative one.

{
"name": "@jridgewell/resolve-uri",
"version": "3.0.1",
"version": "3.0.2",
"description": "Resolve a URI relative to an optional base URI",

@@ -5,0 +5,0 @@ "keywords": [

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