Socket
Socket
Sign inDemoInstall

@availity/resolve-url

Package Overview
Dependencies
Maintainers
0
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@availity/resolve-url - npm Package Compare versions

Comparing version 2.0.6 to 2.0.7

4

CHANGELOG.md

@@ -5,2 +5,6 @@ # Changelog

## [2.0.7](https://github.com/Availity/sdk-js/compare/@availity/resolve-url@2.0.6...@availity/resolve-url@2.0.7) (2024-07-29)
## [2.0.6](https://github.com/Availity/sdk-js/compare/@availity/resolve-url@2.0.5...@availity/resolve-url@2.0.6) (2024-05-30)

@@ -7,0 +11,0 @@

@@ -12,2 +12,4 @@ interface ResolveOptions {

/* eslint-disable unicorn/prefer-export-from */
export { resolveUrl as default, isAbsoluteUrl, resolve as relativeToAbsolute };

17

dist/index.js

@@ -47,7 +47,7 @@ "use strict";

switch (path[i]) {
case "/":
case "/": {
if (path[i + 1] === ".") {
if (path[i + 2] === ".") {
if (!isCharacterAllowedAfterRelativePathSegment(path[i + 3])) {
segmentBuffers[segmentBuffers.length - 1].push(path.substr(i));
segmentBuffers.at(-1).push(path.substr(i));
i = path.length;

@@ -63,3 +63,3 @@ break;

if (!isCharacterAllowedAfterRelativePathSegment(path[i + 2])) {
segmentBuffers[segmentBuffers.length - 1].push(path.substr(i));
segmentBuffers.at(-1).push(path.substr(i));
i = path.length;

@@ -78,17 +78,20 @@ break;

break;
}
case "#":
case "?":
case "?": {
if (segmentBuffers.length === 0) {
segmentBuffers.push([]);
}
segmentBuffers[segmentBuffers.length - 1].push(path.substr(i));
segmentBuffers.at(-1).push(path.substr(i));
i = path.length;
break;
default:
}
default: {
if (segmentBuffers.length === 0) {
segmentBuffers.push([]);
}
segmentBuffers[segmentBuffers.length - 1].push(path[i]);
segmentBuffers.at(-1).push(path[i]);
i += 1;
break;
}
}

@@ -95,0 +98,0 @@ }

{
"name": "@availity/resolve-url",
"version": "2.0.6",
"version": "2.0.7",
"description": "Resolve absolute url from relative urls",

@@ -35,3 +35,3 @@ "keywords": [

"tsup": "^7.2.0",
"typescript": "^5.1.6"
"typescript": "^5.5.4"
},

@@ -38,0 +38,0 @@ "publishConfig": {

{
"root": "packages/resolve-url",
"name": "@availity/resolve-url",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "library",

@@ -7,6 +8,5 @@ "targets": {

"executor": "@nx/jest:jest",
"outputs": ["coverage/resolve-url"],
"outputs": ["{workspaceRoot}/coverage/resolve-url"],
"options": {
"jestConfig": "packages/resolve-url/jest.config.js",
"passWithNoTests": true
"jestConfig": "packages/resolve-url/jest.config.js"
}

@@ -19,3 +19,3 @@ },

"commitMessageFormat": "chore({projectName}): release version ${version} [skip ci]",
"tagPrefix": "@availity/{projectName}@",
"tagPrefix": "{projectName}@",
"baseBranch": "master",

@@ -26,6 +26,5 @@ "trackDeps": true

"lint": {
"executor": "@nx/linter:eslint",
"executor": "@nx/eslint:lint",
"options": {
"eslintConfig": ".eslintrc.yaml",
"lintFilePatterns": ["packages/resolve-url/**/*.{js,ts}"],
"silent": false,

@@ -32,0 +31,0 @@ "fix": false,

@@ -0,1 +1,2 @@

/* eslint-disable unicorn/prefer-export-from */
import resolveUrl from './resolve-url';

@@ -2,0 +3,0 @@ import isAbsoluteUrl from './is-absolute-url';

@@ -0,1 +1,2 @@

/* eslint-disable unicorn/prefer-export-from */
import resolveUrl from './resolve-url';

@@ -2,0 +3,0 @@ import isAbsoluteUrl from './is-absolute-url';

@@ -21,3 +21,3 @@ // Borrowed from https://github.com/rubensworks/relative-to-absolute-iri.js but refactored to work with IE11.

switch (path[i]) {
case '/':
case '/': {
if (path[i + 1] === '.') {

@@ -27,3 +27,3 @@ if (path[i + 2] === '.') {

if (!isCharacterAllowedAfterRelativePathSegment(path[i + 3])) {
segmentBuffers[segmentBuffers.length - 1].push(path.substr(i));
segmentBuffers.at(-1).push(path.substr(i));
i = path.length;

@@ -46,3 +46,3 @@ break;

if (!isCharacterAllowedAfterRelativePathSegment(path[i + 2])) {
segmentBuffers[segmentBuffers.length - 1].push(path.substr(i));
segmentBuffers.at(-1).push(path.substr(i));
i = path.length;

@@ -67,4 +67,5 @@ break;

break;
}
case '#':
case '?':
case '?': {
// Query and fragment string should be appended unchanged

@@ -74,7 +75,8 @@ if (segmentBuffers.length === 0) {

}
segmentBuffers[segmentBuffers.length - 1].push(path.substr(i));
segmentBuffers.at(-1).push(path.substr(i));
// Break the while loop
i = path.length;
break;
default:
}
default: {
// Not a special character, just append it to our buffer

@@ -84,5 +86,6 @@ if (segmentBuffers.length === 0) {

}
segmentBuffers[segmentBuffers.length - 1].push(path[i]);
segmentBuffers.at(-1).push(path[i]);
i += 1;
break;
}
}

@@ -89,0 +92,0 @@ }

@@ -17,3 +17,4 @@ import isAbsoluteUrl from './is-absolute-url';

// eslint-disable-next-line unicorn/prefer-export-from
export { isAbsoluteUrl };
export default resolveUrl;

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